94def RunTrackConversion(flags, track_collections = [], outputfile='dump.json'):
95 from TrkConfig.TrackCollectionReadConfig import TrackCollectionReadCfg
96 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
97 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
98
99 cfg = MainServicesCfg(flags)
100
101
102 cfg.merge(PoolReadCfg(flags))
103 for collection in track_collections:
104 cfg.merge(TrackCollectionReadCfg(flags, collection))
105
106
107 from TrkEventCnvTools.TrkEventCnvToolsConfig import TrkEventCnvSuperToolCfg
108 cfg.merge(TrkEventCnvSuperToolCfg(flags))
109
110
111 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
112 cfg.merge(MuonGeoModelCfg(flags))
113
114
115 acc = TrkToActsConvertorAlgCfg(
116 flags, OutputLevel=1, TrackCollectionKeys=track_collections)
117 cfg.merge(acc)
118
119
120 from DumpEventDataToJSON.DumpEventDataToJSONConfig import DumpEventDataToJSONAlgCfg
121 acc = DumpEventDataToJSONAlgCfg(
122 flags, doExtrap=False, OutputLevel=1,
123 TrackCollectionKeys=track_collections,
124 CscPrepRawDataKey="",
125 MMPrepRawDataKey="",
126 sTgcPrepRawDataKey="",
127 MdtPrepRawDataKey="",
128 RpcPrepRawDataKey="",
129 TgcPrepRawDataKey="",
130 PixelPrepRawDataKey="",
131 SctPrepRawDataKey="",
132 TrtPrepRawDataKey="",
133 CaloCellContainerKey=[""],
134 CaloClusterContainerKeys=[""],
135 MuonContainerKeys=[""],
136 JetContainerKeys=[""],
137 TrackParticleContainerKeys=[""],
138 OutputLocation=outputfile,
139 )
140 cfg.merge(acc)
141 cfg.printConfig(withDetails=True, summariseProps=True)
143
148 cfg.getCondAlgo("AtlasTrackingGeometryCondAlg").OutputLevel = FATAL
149
150 sc = cfg.run()
151 if not sc.isSuccess():
152 import sys
153 sys.exit("Execution failed")
154
155