ATLAS Offline Software
|
Public Member Functions | |
def | __init__ (self) |
def | setBlockName (self, name) |
def | getBlockName (self, name) |
def | addDependency (self, dependencyName, required=True) |
def | hasDependencies (self) |
def | getDependencies (self) |
def | addOption (self, name, defaultValue, *type, info='', noneAction='ignore', required=False) |
def | setOptionValue (self, name, value) |
def | getOptionValue (self, name) |
def | getOptions (self) |
def | printOptions (self, verbose=False, width=60, indent=" ") |
def | hasOption (self, name) |
def | __eq__ (self, blockName) |
def | __str__ (self) |
Private Attributes | |
_blockName | |
_dependencies | |
_options | |
the base class for classes implementing individual blocks of configuration A configuration block is a sequence of one or more algorithms that should always be scheduled together, e.g. the muon four momentum corrections could be a single block, muon selection could then be another block. The blocks themselves generally have their own configuration options/properties specific to the block, and will perform a dynamic configuration based on those options as well as the overall job. The actual configuration of the algorithms in the block will depend on what other blocks are scheduled before and afterwards, most importantly some algorithms will introduce shallow copies that subsequent algorithms will need to run on, and some algorithms will add selection decorations that subquent algorithms should use as preselections. The algorithms get created in a multi-step process (that may be extended in the future): As a first step each block retrieves references to the containers it uses (essentially marking its spot in the processing chain) and also registering any shallow copies that will be made. In the second/last step each block then creates the fully configured algorithms. One goal is that when the algorithms get created they will have their final configuration and there needs to be no meta-configuration data attached to the algorithms, essentially an inversion of the approach in AnaAlgSequence in which the algorithms got created first with associated meta-configuration and then get modified in susequent configuration steps. For now this is mostly an empty base class, but another goal of this approach is to make it easier to build another configuration layer on top of this one, and this class will likely be extended and get data members at that point. The child class needs to implement two methods, `collectReferences` and `makeAlgs` which are each given a single `ConfigAccumulator` type argument. The first is for the first configuration step, and should only collect references to the containers to be used. The second is for the second configuration step, and should create the actual algorithms.
Definition at line 42 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.__init__ | ( | self | ) |
Definition at line 89 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.__eq__ | ( | self, | |
blockName | |||
) |
Implementation of == operator. Used for seaching configSeque. E.g. if blockName in configSeq:
Definition at line 238 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.__str__ | ( | self | ) |
Definition at line 246 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.addDependency | ( | self, | |
dependencyName, | |||
required = True |
|||
) |
Add a dependency for the block. Dependency is corresponds to the blockName of another block. If required is True, will throw an error if dependency is not present; otherwise will move this block after the required block. If required is False, will do nothing if required block is not present; otherwise, it will move block after required block.
Definition at line 122 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.addOption | ( | self, | |
name, | |||
defaultValue, | |||
* | type, | ||
info = '' , |
|||
noneAction = 'ignore' , |
|||
required = False |
|||
) |
declare the given option on the configuration block This should only be called in the constructor of the configuration block. NOTE: The backend to option handling is slated to be replaced at some point. This particular function should essentially stay the same, but some behavior may change.
Definition at line 145 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getBlockName | ( | self, | |
name | |||
) |
Get blockName
Definition at line 118 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getDependencies | ( | self | ) |
Return the list of dependencies.
Definition at line 141 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getOptions | ( | self | ) |
Return a copy of the options associated with the block
Definition at line 201 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getOptionValue | ( | self, | |
name | |||
) |
Returns config option value, if present; otherwise return None
Definition at line 195 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.hasDependencies | ( | self | ) |
def python.ConfigBlock.ConfigBlock.hasOption | ( | self, | |
name | |||
) |
whether the configuration block has the given option WARNING: The backend to option handling is slated to be replaced at some point. This particular function may change behavior, interface or be removed/replaced entirely.
Definition at line 228 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.printOptions | ( | self, | |
verbose = False , |
|||
width = 60 , |
|||
indent = " " |
|||
) |
def python.ConfigBlock.ConfigBlock.setBlockName | ( | self, | |
name | |||
) |
Set blockName
Definition at line 114 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.setOptionValue | ( | self, | |
name, | |||
value | |||
) |
set the given option on the configuration block NOTE: The backend to option handling is slated to be replaced at some point. This particular function should essentially stay the same, but some behavior may change.
Definition at line 168 of file ConfigBlock.py.
|
private |
Definition at line 90 of file ConfigBlock.py.
|
private |
Definition at line 91 of file ConfigBlock.py.
|
private |
Definition at line 92 of file ConfigBlock.py.