![]() |
ATLAS Offline Software
|
Public Member Functions | |
| beginJob (cls) | |
| __init__ (self, *, flags=None, algSeq=None, noSysSuffix=False, noSystematics=None, dataType=None, isPhyslite=None, geometry=None, dsid=0, campaign=None, runNumber=None, autoconfigFromFlags=None, dataYear=0) | |
| noSystematics (self) | |
| flags (self) | |
| autoconfigFlags (self) | |
| dataType (self) | |
| isPhyslite (self) | |
| geometry (self) | |
| dsid (self) | |
| campaign (self) | |
| runNumber (self) | |
| dataYear (self) | |
| generatorInfo (self) | |
| hltSummary (self) | |
| defaultHistogramStream (self) | |
| setDefaultHistogramStream (self, str streamName) | |
| algPostfix (self) | |
| setAlgPostfix (self, str postfix) | |
| getAlgorithm (self, str name) | |
| createAlgorithm (self, type, name, reentrant=False) | |
| createService (self, type, name, isSingleton=True) | |
| createPublicTool (self, type, name, isSingleton=True) | |
| addPrivateTool (self, propertyName, toolType) | |
| setExtraInputs (self, inputs) | |
| setExtraOutputs (self, outputs) | |
| setSourceName (self, containerName, sourceName, *, originalName=None, isMet=False) | |
| writeName (self, containerName, *, isMet=None) | |
| readName (self, containerName, *, nominal=False) | |
| copyName (self, containerName) | |
| wantCopy (self, containerName) | |
| renameFinalContainers (self) | |
| originalName (self, containerName) | |
| getContainerMeta (self, containerName, metaField, defaultValue=None, *, failOnMiss=False) | |
| setContainerMeta (self, containerName, metaField, value, *, allowOverwrite=False) | |
| isMetContainer (self, containerName) | |
| readNameAndSelection (self, containerName, *, excludeFrom=None) | |
| getPreselection (self, containerName, selectionName, *, asList=False) | |
| getFullSelection (self, containerName, selectionName, *, skipBase=False, excludeFrom=None) | |
| getSelectionCutFlow (self, containerName, selectionName) | |
| addEventCutFlow (self, selection, decorations) | |
| getEventCutFlow (self, selection) | |
| addSelection (self, containerName, selectionName, decoration, **kwargs) | |
| addOutputContainer (self, containerName, outputContainerName) | |
| getOutputContainerOrigin (self, outputContainerName) | |
| addOutputVar (self, containerName, variableName, outputName, *, noSys=False, enabled=True, auxType=None) | |
| getOutputVars (self, containerName) | |
| getSelectionNames (self, containerName, excludeFrom=None) | |
Public Attributes | |
| CA = None | |
Protected Member Functions | |
| _createServiceOrTool (self, type, name, isSingleton, kind, create, add) | |
Protected Attributes | |
| _flags = flags | |
| _dataType = dataType | |
| _isPhyslite = isPhyslite | |
| _hltSummary = hltSummary | |
| _algSeq = algSeq | |
| _noSystematics = noSystematics | |
| _noSysSuffix = noSysSuffix | |
| str | _algPostfix = '' |
| str | _defaultHistogramStream = 'ANALYSIS' |
| dict | _containerConfig = {} |
| dict | _outputContainers = {} |
| dict | _algorithms = {} |
| _currentAlg = None | |
| _selectionNameExpr = re.compile ('[A-Za-z_][A-Za-z_0-9]*') | |
| dict | _eventcutflow = {} |
| str | _algPrefix = f'seq{self._instance_counter}_' |
Static Protected Attributes | |
| int | _instance_counter = 0 |
| dict | _singleton_registry = {} |
a class that accumulates a configuration from blocks into an algorithm sequence This is used as argument to the ConfigurationBlock methods, which need to be called in the correct order. This class will track all meta-information that needs to be communicated between blocks during configuration, and also add the created algorithms to the sequence. Use/access of containers in the event store is handled via references that this class hands out. This happens in a separate step before the algorithms are created, as the naming of containers will depend on where in the chain the container is used. All arguments passed to the ConfigAccumulator constructor are used as they are. The only exception is the systematics flag: If not explicitly set the decision to run systematics or not will be taken depending on the CommonServicesConfig setup.
Definition at line 187 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.__init__ | ( | self, | |
| * | , | ||
| flags = None, | |||
| algSeq = None, | |||
| noSysSuffix = False, | |||
| noSystematics = None, | |||
| dataType = None, | |||
| isPhyslite = None, | |||
| geometry = None, | |||
| dsid = 0, | |||
| campaign = None, | |||
| runNumber = None, | |||
| autoconfigFromFlags = None, | |||
| dataYear = 0 ) |
Definition at line 219 of file ConfigAccumulator.py.
|
protected |
shared implementation of createService and createPublicTool
Definition at line 463 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.addEventCutFlow | ( | self, | |
| selection, | |||
| decorations ) |
register a new event cutflow, adding it to the dictionary with key 'selection' and value 'decorations', a list of decorated selections
Definition at line 807 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.addOutputContainer | ( | self, | |
| containerName, | |||
| outputContainerName ) |
register a copy of a container used in outputs
Definition at line 839 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.addOutputVar | ( | self, | |
| containerName, | |||
| variableName, | |||
| outputName, | |||
| * | , | ||
| noSys = False, | |||
| enabled = True, | |||
| auxType = None ) |
add an output variable for the given container to the output
Definition at line 859 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.addPrivateTool | ( | self, | |
| propertyName, | |||
| toolType ) |
add a private tool to the current algorithm
Definition at line 503 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.addSelection | ( | self, | |
| containerName, | |||
| selectionName, | |||
| decoration, | |||
| ** | kwargs ) |
add another selection decoration to the selection of the given name for the given container
Definition at line 826 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.algPostfix | ( | self | ) |
the current postfix to be appended to algorithm names Blocks should not call this directly, but rather implement the instanceName method, which will be used to generate the postfix automatically.
Definition at line 405 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.autoconfigFlags | ( | self | ) |
Athena configuration flags This is a backward compatibility version of the flags property, which is preferred.
Definition at line 351 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.beginJob | ( | cls | ) |
Helper class method to fully reset the counters, call once before building a new job sequence.
Definition at line 214 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.campaign | ( | self | ) |
the MC campaign we run on
Definition at line 374 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.copyName | ( | self, | |
| containerName ) |
register that a copy of the container will be made and return its name
Definition at line 566 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.createAlgorithm | ( | self, | |
| type, | |||
| name, | |||
| reentrant = False ) |
create a new algorithm and register it as the current algorithm
Definition at line 440 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.createPublicTool | ( | self, | |
| type, | |||
| name, | |||
| isSingleton = True ) |
create a new public tool and register it as the "current algorithm"
Definition at line 496 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.createService | ( | self, | |
| type, | |||
| name, | |||
| isSingleton = True ) |
create a new service and register it as the "current algorithm"
Definition at line 489 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.dataType | ( | self | ) |
the data type we run on (data, fullsim, fastsim)
Definition at line 358 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.dataYear | ( | self | ) |
for data, the corresponding year; for MC, zero
Definition at line 382 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.defaultHistogramStream | ( | self | ) |
the default histogram stream to be used for output histograms
Definition at line 394 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.dsid | ( | self | ) |
the mcChannelNumber or DSID of the sample we run on
Definition at line 370 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.flags | ( | self | ) |
Athena configuration flags
Definition at line 346 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.generatorInfo | ( | self | ) |
the dictionary of MC generators and their versions for the sample we run on
Definition at line 386 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.geometry | ( | self | ) |
the LHC Run period we run on
Definition at line 366 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getAlgorithm | ( | self, | |
| str | name ) |
get the algorithm with the given name Despite the name this will also return services and tools. It is mostly meant for internal use, particularly for the property overrides.
Definition at line 429 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getContainerMeta | ( | self, | |
| containerName, | |||
| metaField, | |||
| defaultValue = None, | |||
| * | , | ||
| failOnMiss = False ) |
get the meta information for the given container This is used to pass down meta-information from the configuration to the algorithms.
Definition at line 631 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getEventCutFlow | ( | self, | |
| selection ) |
get the list of decorated selections for an event cutflow, corresponding to key 'selection'
Definition at line 818 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getFullSelection | ( | self, | |
| containerName, | |||
| selectionName, | |||
| * | , | ||
| skipBase = False, | |||
| excludeFrom = None ) |
get the selection string for the given selection on the given
container
This can handle both individual selections or selection
expressions (e.g. `loose||tight`) with the later being
properly expanded. Either way the base selection (i.e. the
selection without a name) will always be applied on top.
containerName --- the container the selection is defined on
selectionName --- the name of the selection, or a selection
expression based on multiple named selections
skipBase --- will avoid the base selection, and should normally
not be used by the end-user.
excludeFrom --- a set of string names of selection sources to exclude
e.g. to exclude OR selections from MET
Definition at line 709 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getOutputContainerOrigin | ( | self, | |
| outputContainerName ) |
Get the name of the actual container, for which an output is registered
Definition at line 848 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getOutputVars | ( | self, | |
| containerName ) |
get the output variables for the given container
Definition at line 876 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getPreselection | ( | self, | |
| containerName, | |||
| selectionName, | |||
| * | , | ||
| asList = False ) |
get the preselection string for the given selection on the given container
Definition at line 688 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getSelectionCutFlow | ( | self, | |
| containerName, | |||
| selectionName ) |
get the individual selections as a list for producing the cutflow for the given selection on the given container This can only handle individual selections, not selection expressions (e.g. `loose||tight`).
Definition at line 778 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getSelectionNames | ( | self, | |
| containerName, | |||
| excludeFrom = None ) |
Retrieve set of unique selections defined for a given container
Definition at line 885 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.hltSummary | ( | self | ) |
the HLTSummary configuration to be used for the trigger decision tool
Definition at line 390 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.isMetContainer | ( | self, | |
| containerName ) |
whether the given container is registered as a MET container This is mostly/exclusively used for determining whether to write out the whole container or just a single MET term.
Definition at line 657 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.isPhyslite | ( | self | ) |
whether we run on PHYSLITE
Definition at line 362 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.noSystematics | ( | self | ) |
noSystematics flag used by CommonServices block
Definition at line 341 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.originalName | ( | self, | |
| containerName ) |
get the "original" name of the given container This is mostly/exclusively used for jet containers, so that subsequent configurations know which jet container they operate on.
Definition at line 617 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.readName | ( | self, | |
| containerName, | |||
| * | , | ||
| nominal = False ) |
get the name of the "current copy" of the given container As extra copies get created during processing this will track the correct name of the current copy. Optionally one can pass in the name of the container before the first copy.
Definition at line 551 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.readNameAndSelection | ( | self, | |
| containerName, | |||
| * | , | ||
| excludeFrom = None ) |
get the name of the "current copy" of the given container, and the selection string This is mostly meant for MET and OR for whom the actual object selection is relevant, and which as such allow to pass in the working point as "ObjectName.WorkingPoint".
Definition at line 668 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.renameFinalContainers | ( | self | ) |
post-process the configured algorithms, tools and services to strip the auto-generated `_STEP<n>` suffix from each container's *final* name in every property value. This is mostly needed in case the user has further downstream algorithms that rely on the exact name of containers in the event store. For anything configured through the `ConfigAccumulator` this doesn't matter, as the names are configured consistently.
Definition at line 588 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.runNumber | ( | self | ) |
the MC runNumber
Definition at line 378 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setAlgPostfix | ( | self, | |
| str | postfix ) |
set the current postfix to be appended to algorithm names Blocks should not call this directly, but rather implement the instanceName method, which will be used to generate the postfix automatically.
Definition at line 413 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setContainerMeta | ( | self, | |
| containerName, | |||
| metaField, | |||
| value, | |||
| * | , | ||
| allowOverwrite = False ) |
set the meta information for the given container This is used to pass down meta-information from the configuration to the algorithms.
Definition at line 645 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setDefaultHistogramStream | ( | self, | |
| str | streamName ) |
set the default histogram stream to be used for output histograms As an advanced option this is not directly exposed by the constructor, but can be set by the user if needed before configuring the job.
Definition at line 398 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setExtraInputs | ( | self, | |
| inputs ) |
set extra input dependencies for the current algorithm
Definition at line 507 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setExtraOutputs | ( | self, | |
| outputs ) |
set extra output dependencies for the current algorithm
Definition at line 512 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setSourceName | ( | self, | |
| containerName, | |||
| sourceName, | |||
| * | , | ||
| originalName = None, | |||
| isMet = False ) |
set the (default) name of the source/original container This is essentially meant to allow using e.g. the muon configuration and the user not having to manually specify that they want to use the Muons/AnalysisMuons container from the input file. In addition it allows to set the original name of the container (which may be different from the source name), which is mostly/exclusively used for jet containers, so that subsequent configurations know which jet container they operate on.
Definition at line 517 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.wantCopy | ( | self, | |
| containerName ) |
ask whether we want/need a copy of the container This usually only happens if no copy of the container has been made yet and the copy is needed to allow modifications, etc.
Definition at line 574 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.writeName | ( | self, | |
| containerName, | |||
| * | , | ||
| isMet = None ) |
register that the given container will be made and return its name
Definition at line 536 of file ConfigAccumulator.py.
|
protected |
Definition at line 321 of file ConfigAccumulator.py.
|
protected |
Definition at line 317 of file ConfigAccumulator.py.
|
protected |
Definition at line 339 of file ConfigAccumulator.py.
|
protected |
Definition at line 314 of file ConfigAccumulator.py.
|
protected |
Definition at line 319 of file ConfigAccumulator.py.
|
protected |
Definition at line 322 of file ConfigAccumulator.py.
|
protected |
Definition at line 307 of file ConfigAccumulator.py.
|
protected |
Definition at line 318 of file ConfigAccumulator.py.
|
protected |
Definition at line 326 of file ConfigAccumulator.py.
|
protected |
Definition at line 230 of file ConfigAccumulator.py.
|
protected |
Definition at line 309 of file ConfigAccumulator.py.
|
staticprotected |
Definition at line 209 of file ConfigAccumulator.py.
|
protected |
Definition at line 308 of file ConfigAccumulator.py.
|
protected |
Definition at line 316 of file ConfigAccumulator.py.
|
protected |
Definition at line 315 of file ConfigAccumulator.py.
|
protected |
Definition at line 320 of file ConfigAccumulator.py.
|
protected |
Definition at line 323 of file ConfigAccumulator.py.
|
staticprotected |
Definition at line 211 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.CA = None |
Definition at line 327 of file ConfigAccumulator.py.