This guide describes Athena configuration system that is intended to be used for Run 3 and later. It is also known as ComponentAccumulator based configuration or New Job Options.
The configuration system of Athena allows us to assemble and customize components (algorithms, services and tools) for a workflow. It is done by creation and manipulation of python objects. Result of the configuration process is a set of settings that are used by Athena to instantiate and appropriately configure C++ components. Even in a small workflow the number of settings can easily be a few hundreds and in a complete reconstruction or HLT setup the number of settings reaches tens of thousands. Such a set of information needs to be properly managed.
For help, contact: atlas-sw-jobconfig@cern.ch
In broad terms the configuration system works as follows.
The steps marked with (*) are places where developer intervention is needed. That is to define configurable parameters and to prepare scripts setting them. Other steps are automatized.
The python infrastructure for the new configuration system lives in the package Control/AthenaConfiguration
In comparison to the Run 1-2 configuration system the procedure is technically different in some steps. However the only non-technical change concerned step 4.
For consistency, and to make a clear distinction between legacy configuration files and the Component Accumulator (CA) system, the following conventions are used:
Config.py
ComponentAccumulator
instance) should normally start with the name of the main component they configure and must end with Cfg
.athena.py
add a shebang to the first line (#!/usr/bin/env athena
). This allows athena to recognize the file as a CA configuration as opposed to legacy job options. def myComponentCfg(flags, **kwargs):
def myComponentCfg(flags, name = "MyComponentVersionA", **kwargs):
def Trig_TRT_TrackExtensionAlgCfg(flags, inputTracks, name = 'TrigTrackExtensionAlg', **kwargs):
MyComponentCfg
) we would normally pass kwargs
as the last argument to configure the Gaudi properties of that component, for example TrackSlimmerCfg:
def TrackSlimmerCfg(flags, name="TrackSlimmer", **kwargs):
acc = ComponentAccumulator()
if "TrackSlimmingTool" not in kwargs:
from TrkConfig.TrkTrackSlimmingToolConfig import TrackSlimmingToolCfg
TrackSlimmingTool = acc.popToolsAndMerge(TrackSlimmingToolCfg(flags))
acc.addPublicTool(TrackSlimmingTool)
kwargs.setdefault("TrackSlimmingTool", TrackSlimmingTool)
acc.addEventAlgo(CompFactory.Trk.TrackSlimmer(name, **kwargs))
return acc
kwargs
argument can be potentially omitted from the inputs of the configuration function. A baseline configuration function of this component should be provided in that case, including kwargs
as input, and ideally used in the specialised config. For example Trig_SCT_ClusteringToolCfg:
def Trig_SCT_ClusteringToolCfg(flags, name="Trig_SCT_ClusteringTool"):
acc = ComponentAccumulator()
from SCT_ConditionsTools.SCT_ConditionsToolsConfig import (
SCT_ConditionsSummaryToolCfg)
conditionsTool = acc.popToolsAndMerge(SCT_ConditionsSummaryToolCfg(
flags, withFlaggedCondTool=False, withTdaqTool=False))
acc.setPrivateTools(acc.popToolsAndMerge(SCT_ClusteringToolCfg(
flags, name,
conditionsTool=conditionsTool,
SCTDetElStatus=""
)))
return acc
kwargs
should not be used.
AlgTool
).
You can find some more examples in the later section which describes in detail how to write configuration methods.