ATLAS Offline Software
Classes | Functions | Variables
python.ConfigSequence Namespace Reference

Classes

class  ConfigSequence
 

Functions

def groupBlocks (func)
 
def filter_dsids (filterList, config)
 

Variables

 logCPAlgCfgSeq = logging.getLogger('CPAlgCfgSeq')
 

Function Documentation

◆ filter_dsids()

def python.ConfigSequence.filter_dsids (   filterList,
  config 
)
check whether the sample being run passes a
possible DSID filter on the block

Definition at line 28 of file ConfigSequence.py.

28 def filter_dsids (filterList, config) :
29  """check whether the sample being run passes a"""
30  """possible DSID filter on the block"""
31  if len(filterList) == 0:
32  return True
33  for dsid_filter in filterList:
34  # Check if the pattern is enclosed in regex delimiters (e.g., starts with '^' or contains regex metacharacters)
35  if any(char in dsid_filter for char in "^$*+?.()|[]{}\\"):
36  pattern = re.compile(dsid_filter)
37  if pattern.match(str(config.dsid())):
38  return True
39  else:
40  # Otherwise it's an exact DSID (but could be int or string)
41  if str(dsid_filter) == str(config.dsid()):
42  return True
43  return False
44 

◆ groupBlocks()

def python.ConfigSequence.groupBlocks (   func)
Decorates a configSequence or function with 'seq' as a
arguement.

Sets groupName to the name of the decorated funtion  or
calss plus and integer for each ConfigBlock in the configSequence.

Blocks with the same groupName can be configured together.

Definition at line 10 of file ConfigSequence.py.

10 def groupBlocks(func):
11  """
12  Decorates a configSequence or function with 'seq' as a
13  arguement.
14 
15  Sets groupName to the name of the decorated funtion or
16  calss plus and integer for each ConfigBlock in the configSequence.
17 
18  Blocks with the same groupName can be configured together.
19  """
20  @wraps(func)
21  def wrapper(**kwargs):
22  func(**kwargs)
23  groupName = f"{func.__name__}_{randrange(10**8):08}"
24  for block in kwargs['seq']:
25  block.setOptionValue('groupName', groupName)
26  return wrapper
27 

Variable Documentation

◆ logCPAlgCfgSeq

python.ConfigSequence.logCPAlgCfgSeq = logging.getLogger('CPAlgCfgSeq')

Definition at line 4 of file ConfigSequence.py.

python.ConfigSequence.filter_dsids
def filter_dsids(filterList, config)
Definition: ConfigSequence.py:28
python.ConfigSequence.groupBlocks
def groupBlocks(func)
Definition: ConfigSequence.py:10
str
Definition: BTagTrackIpAccessor.cxx:11