ATLAS Offline Software
|
Public Member Functions | |
def | __init__ (self) |
def | setBlockName (self, name) |
def | getBlockName (self) |
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) |
def | get_instance_count (cls) |
Static Public Attributes | |
dictionary | instance_counts = {} |
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 43 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.__init__ | ( | self | ) |
Definition at line 93 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 257 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.__str__ | ( | self | ) |
Definition at line 265 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 141 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 164 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.get_instance_count | ( | cls | ) |
Definition at line 270 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getBlockName | ( | self | ) |
Get blockName
Definition at line 137 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getDependencies | ( | self | ) |
Return the list of dependencies.
Definition at line 160 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getOptions | ( | self | ) |
Return a copy of the options associated with the block
Definition at line 220 of file ConfigBlock.py.
def python.ConfigBlock.ConfigBlock.getOptionValue | ( | self, | |
name | |||
) |
Returns config option value, if present; otherwise return None
Definition at line 214 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 247 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 133 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 187 of file ConfigBlock.py.
|
private |
Definition at line 94 of file ConfigBlock.py.
|
private |
Definition at line 95 of file ConfigBlock.py.
|
private |
Definition at line 96 of file ConfigBlock.py.
|
static |
Definition at line 91 of file ConfigBlock.py.