ATLAS Offline Software
Classes | Functions | Variables
ActsCollectionsConfig Namespace Reference

Classes

class  TrackBackends
 

Functions

ComponentAccumulator ActsTrackReaderAlgCfg (flags, str prefix)
 
ComponentAccumulator ActsPoolReadCfg (flags)
 

Variables

 flags
 
 cfg
 
 status
 

Function Documentation

◆ ActsPoolReadCfg()

ComponentAccumulator ActsCollectionsConfig.ActsPoolReadCfg (   flags)

Definition at line 78 of file ActsCollectionsConfig.py.

78 def ActsPoolReadCfg(flags) -> ComponentAccumulator:
79  acc = ComponentAccumulator()
80 
81  # Reader for InDet objects (i.e. xAOD SpacePoints and Measurements)
82  from InDetConfig.InDetPoolReadConfig import InDetPoolReadCfg
83  acc.merge(InDetPoolReadCfg(flags))
84 
85  StoredTracks = dict()
86  typedCollections = flags.Input.TypedCollections
87 
88  for typedCollection in typedCollections:
89  [colType, colName] = typedCollection.split('#')
90 
91  # Track Backend Collections
92  if colType in TrackBackends.types:
93  prefix = TrackBackends.extractPrefix(collection=colName)
94  StoredTracks[prefix] = StoredTracks.get(prefix, TrackBackends())
95  StoredTracks[prefix].addCollection(collection=colName)
96  continue
97 
98  for (key, backends) in StoredTracks.items():
99  if not backends.isValid():
100  raise Exception(f'Track backends with prefix {key} are not consistent. Be sure all the backends have been properly persistified in the file: {backends}')
101 
102  acc.merge(ActsTrackReaderAlgCfg(flags, key))
103 
104  return acc
105 

◆ ActsTrackReaderAlgCfg()

ComponentAccumulator ActsCollectionsConfig.ActsTrackReaderAlgCfg (   flags,
str  prefix 
)

Definition at line 63 of file ActsCollectionsConfig.py.

63 def ActsTrackReaderAlgCfg(flags,
64  prefix: str) -> ComponentAccumulator:
65  assert isinstance(prefix, str)
66  """
67  Setup algorithm that reads xAOD track backends and produced TrackContainer
68  name - the collections prefix, for consistency it also is the prefix of the output container name
69  """
70  acc = ComponentAccumulator()
71  from ActsConfig.ActsGeometryConfig import ActsTrackingGeometryToolCfg
72  acc.addEventAlgo(CompFactory.ActsTrk.TrackContainerReader(f"{prefix}TrackContainerReaderAlg",
73  TrackContainer=prefix+"Tracks",
74  TrackingGeometryTool=acc.popToolsAndMerge(ActsTrackingGeometryToolCfg(flags))
75  ))
76  return acc
77 

Variable Documentation

◆ cfg

ActsCollectionsConfig.cfg

Definition at line 115 of file ActsCollectionsConfig.py.

◆ flags

ActsCollectionsConfig.flags

Definition at line 110 of file ActsCollectionsConfig.py.

◆ status

ActsCollectionsConfig.status

Definition at line 119 of file ActsCollectionsConfig.py.

python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
ActsCollectionsConfig.ActsPoolReadCfg
ComponentAccumulator ActsPoolReadCfg(flags)
Definition: ActsCollectionsConfig.py:78
ActsGeometryConfig.ActsTrackingGeometryToolCfg
ComponentAccumulator ActsTrackingGeometryToolCfg(flags, str name="ActsTrackingGeometryTool")
Definition: ActsGeometryConfig.py:100
python.InDetPoolReadConfig.InDetPoolReadCfg
ComponentAccumulator InDetPoolReadCfg(flags)
Definition: InDetPoolReadConfig.py:5
Muon::IDC_Helper::addCollection
IDC::IDENTIFIABLE * addCollection(const Identifier collId, IDC *idc, const IDHELPER &idHelper, MsgStream &log)
ActsCollectionsConfig.ActsTrackReaderAlgCfg
ComponentAccumulator ActsTrackReaderAlgCfg(flags, str prefix)
Definition: ActsCollectionsConfig.py:63