ATLAS Offline Software
MdtTwinTester.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 def 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 
12 if __name__ == "__main__":
13  from MuonGeoModelTestR4.testGeoModel import setupGeoR4TestCfg, SetupArgParser, executeTest, geoModelFileDefault
14  parser = SetupArgParser()
15  parser.add_argument("--setupRun4", default=True, action="store_true")
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  args.geoModelFile = geoModelFileDefault(args.setupRun4)
25  flags, cfg = setupGeoR4TestCfg(args)
26  from MuonConfig.MuonCablingConfig import MdtTwinTubeMapCondAlgCfg
27  cfg.merge(MdtTwinTubeMapCondAlgCfg(flags, JSONFile = args.cablingJSON))
28  cfg.merge(MdtTwinCablingTestCfg(flags))
29  executeTest(cfg)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MuonCablingConfig.MdtTwinTubeMapCondAlgCfg
def MdtTwinTubeMapCondAlgCfg(flags, name="MdtTwinTubeCondAlg", **kwargs)
Definition: MuonCablingConfig.py:150
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
python.testGeoModel.geoModelFileDefault
def geoModelFileDefault(useR4Layout=False)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:5
python.testGeoModel.executeTest
def executeTest(cfg)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:192
python.testGeoModel.setupGeoR4TestCfg
def setupGeoR4TestCfg(args, flags=None)
Definition: MuonPhaseII/MuonDetDescr/MuonGeoModelTestR4/python/testGeoModel.py:103
python.MdtTwinTester.MdtTwinCablingTestCfg
def MdtTwinCablingTestCfg(flags, name="MdtTwinMappingTestAlg", **kwargs)
Definition: MdtTwinTester.py:3