ATLAS Offline Software
Loading...
Searching...
No Matches
MdtMezzExtraction.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3def MdtCablMezzAlgCfg(flags, name = "MdtCablMezzAlg", **kwargs):
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6
7 result = ComponentAccumulator()
8 from MuonConfig.MuonCablingConfig import MDTCablingConfigCfg
9 result.merge(MDTCablingConfigCfg(flags))
10 event_algo = CompFactory.MdtCablingJsonDumpAlg(name,**kwargs)
11 result.addEventAlgo(event_algo, primary = True)
12 return result
13
14if __name__ == "__main__":
15 from AthenaConfiguration.AllConfigFlags import initConfigFlags
16 from MuonCondTest.MdtCablingTester import SetupArgParser
17 from MuonConfig.MuonConfigUtils import executeTest, configureCondTag, SetupMuonStandaloneCA
18
19 parser = SetupArgParser()
20 parser.set_defaults(output="SummaryFile.txt")
21 parser.set_defaults(mezzMap="MezzMapping.json")
22 parser.set_defaults(cablingMap="MdtCabling.json")
23
24 args = parser.parse_args()
25 flags = initConfigFlags()
26 flags.Concurrency.NumThreads = 1
27 flags.Concurrency.NumConcurrentEvents = 1
28 flags.Exec.MaxEvents = 1
29 flags.Input.Files = args.inputFile
30 if not flags.GeoModel.AtlasVersion:
31 flags.GeoModel.AtlasVersion = args.geoTag
32 configureCondTag(flags)
33 flags.lock()
34 flags.dump(evaluate=True)
35
36 cfg = SetupMuonStandaloneCA(flags)
37 cfg.merge( MdtCablMezzAlgCfg(flags,
38 SummaryFile=args.output,
39 OutMezzanineJSON=args.mezzMap,
40 OutCablingJSON=args.cablingMap))
41 executeTest(cfg)
42
43
MdtCablMezzAlgCfg(flags, name="MdtCablMezzAlg", **kwargs)