ATLAS Offline Software
Loading...
Searching...
No Matches
MdtTwinTester.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3def MdtTwinCablingTestCfg(flags, name="MdtTwinMappingTestAlg", **kwargs):
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 result = ComponentAccumulator()
7 the_alg = CompFactory.Muon.MdtTwinTubeTestAlg(name=name, **kwargs)
8 result.addEventAlgo(the_alg, primary = True)
9 return result
10
11
12if __name__ == "__main__":
13 from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser
14 from MuonConfig.MuonConfigUtils import executeTest
15 parser = SetupArgParser()
16 parser.add_argument("--cablingJSON", help="Location of the twin tube cabling file to test", type=str, default="")
17 parser.set_defaults(nEvents = 1)
18 parser.set_defaults(noMM=True)
19 parser.set_defaults(noSTGC=True)
20 parser.set_defaults(noRpc=True)
21 parser.set_defaults(noTgc=True)
22
23 args = parser.parse_args()
24 flags, cfg = setupGeoR4TestCfg(args)
25 from MuonConfig.MuonCablingConfig import MdtTwinTubeMapCondAlgCfg
26 cfg.merge(MdtTwinTubeMapCondAlgCfg(flags, JSONFile = args.cablingJSON))
27 cfg.merge(MdtTwinCablingTestCfg(flags))
28 executeTest(cfg)
MdtTwinCablingTestCfg(flags, name="MdtTwinMappingTestAlg", **kwargs)