![]() |
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) | |
| checkOutputContainer (self, containerName) | |
| 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 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 182 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 214 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 811 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.addOutputContainer | ( | self, | |
| containerName, | |||
| outputContainerName ) |
register a copy of a container used in outputs
Definition at line 843 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 868 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.addPrivateTool | ( | self, | |
| propertyName, | |||
| toolType ) |
add a private tool to the current algorithm
Definition at line 510 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 830 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 400 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 346 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 209 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.campaign | ( | self | ) |
the MC campaign we run on
Definition at line 369 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.checkOutputContainer | ( | self, | |
| containerName ) |
check whether a given container has been registered in outputs
Definition at line 852 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 570 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 435 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 484 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 458 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.dataType | ( | self | ) |
the data type we run on (data, fullsim, fastsim)
Definition at line 353 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.dataYear | ( | self | ) |
for data, the corresponding year; for MC, zero
Definition at line 377 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.defaultHistogramStream | ( | self | ) |
the default histogram stream to be used for output histograms
Definition at line 389 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.dsid | ( | self | ) |
the mcChannelNumber or DSID of the sample we run on
Definition at line 365 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.flags | ( | self | ) |
Athena configuration flags
Definition at line 341 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 381 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.geometry | ( | self | ) |
the LHC Run period we run on
Definition at line 361 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 424 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 635 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 822 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 713 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 857 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.getOutputVars | ( | self, | |
| containerName ) |
get the output variables for the given container
Definition at line 882 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 692 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 782 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 891 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.hltSummary | ( | self | ) |
the HLTSummary configuration to be used for the trigger decision tool
Definition at line 385 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 661 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.isPhyslite | ( | self | ) |
whether we run on PHYSLITE
Definition at line 357 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.noSystematics | ( | self | ) |
noSystematics flag used by CommonServices block
Definition at line 336 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 621 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 558 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 672 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 592 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.runNumber | ( | self | ) |
the MC runNumber
Definition at line 373 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 408 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 649 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 393 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setExtraInputs | ( | self, | |
| inputs ) |
set extra input dependencies for the current algorithm
Definition at line 514 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.setExtraOutputs | ( | self, | |
| outputs ) |
set extra output dependencies for the current algorithm
Definition at line 519 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 524 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 578 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 543 of file ConfigAccumulator.py.
|
protected |
Definition at line 316 of file ConfigAccumulator.py.
|
protected |
Definition at line 312 of file ConfigAccumulator.py.
|
protected |
Definition at line 334 of file ConfigAccumulator.py.
|
protected |
Definition at line 309 of file ConfigAccumulator.py.
|
protected |
Definition at line 314 of file ConfigAccumulator.py.
|
protected |
Definition at line 317 of file ConfigAccumulator.py.
|
protected |
Definition at line 302 of file ConfigAccumulator.py.
|
protected |
Definition at line 313 of file ConfigAccumulator.py.
|
protected |
Definition at line 321 of file ConfigAccumulator.py.
|
protected |
Definition at line 225 of file ConfigAccumulator.py.
|
protected |
Definition at line 304 of file ConfigAccumulator.py.
|
staticprotected |
Definition at line 204 of file ConfigAccumulator.py.
|
protected |
Definition at line 303 of file ConfigAccumulator.py.
|
protected |
Definition at line 311 of file ConfigAccumulator.py.
|
protected |
Definition at line 310 of file ConfigAccumulator.py.
|
protected |
Definition at line 315 of file ConfigAccumulator.py.
|
protected |
Definition at line 318 of file ConfigAccumulator.py.
|
staticprotected |
Definition at line 206 of file ConfigAccumulator.py.
| python.ConfigAccumulator.ConfigAccumulator.CA = None |
Definition at line 322 of file ConfigAccumulator.py.