ATLAS Offline Software
Loading...
Searching...
No Matches
ActsCollectionsConfig Namespace Reference

Classes

class  TrackBackends

Functions

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

Variables

 flags = initConfigFlags()
 cfg = MainServicesCfg(flags)
 status = cfg.run()

Function Documentation

◆ ActsPoolReadCfg()

ComponentAccumulator ActsCollectionsConfig.ActsPoolReadCfg ( flags)

Definition at line 78 of file ActsCollectionsConfig.py.

78def 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.

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.getPrimaryAndMerge(ActsTrackingGeometryToolCfg(flags))
75 ))
76 return acc
77

Variable Documentation

◆ cfg

ActsCollectionsConfig.cfg = MainServicesCfg(flags)

Definition at line 115 of file ActsCollectionsConfig.py.

◆ flags

ActsCollectionsConfig.flags = initConfigFlags()

Definition at line 110 of file ActsCollectionsConfig.py.

◆ status

ActsCollectionsConfig.status = cfg.run()

Definition at line 119 of file ActsCollectionsConfig.py.