ATLAS Offline Software
Loading...
Searching...
No Matches
python.ConfigSequence Namespace Reference

Classes

class  ConfigSequence

Functions

 groupBlocks (func)

Variables

 logCPAlgCfgSeq = logging.getLogger('CPAlgCfgSeq')
 _instanceNameExpr = re.compile ('^[_a-zA-Z0-9]*$')

Function Documentation

◆ groupBlocks()

groupBlocks ( func)
Decorates a configSequence or function with 'seq' as a
argument.

Sets groupName to the name of the decorated function or
class plus an integer for each ConfigBlock in the configSequence.

Blocks with the same groupName can be configured together.

Definition at line 13 of file ConfigSequence.py.

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

Variable Documentation

◆ _instanceNameExpr

python.ConfigSequence._instanceNameExpr = re.compile ('^[_a-zA-Z0-9]*$')
protected

Definition at line 11 of file ConfigSequence.py.

◆ logCPAlgCfgSeq

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

Definition at line 5 of file ConfigSequence.py.