ATLAS Offline Software
Loading...
Searching...
No Matches
MdtCondTester.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3def MdtConditionsTestCfg(flags, name="MdtConditionsTest", **kwargs):
4 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5 result = ComponentAccumulator()
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from MuonConfig.MuonCondAlgConfig import MdtCondDbAlgCfg
8 result.merge(MdtCondDbAlgCfg(flags))
9 from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg
10 result.merge(MuonIdHelperSvcCfg(flags))
11 the_alg = CompFactory.MdtConditionsTestAlg(name, **kwargs)
12 result.addEventAlgo(the_alg, primary = True)
13 return result
14
15
16if __name__ == "__main__":
17 from AthenaConfiguration.AllConfigFlags import initConfigFlags
18 from MuonCondTest.MdtCablingTester import SetupArgParser
19 from AthenaConfiguration.TestDefaults import defaultTestFiles
20 from MuonConfig.MuonConfigUtils import executeTest, SetupMuonStandaloneCA, configureCondTag
21
22
23
24 parser = SetupArgParser()
25 parser.add_argument("--LogName", default="LogFile",
26 help="If the test is run multiple times to ensure reproducibility, then the dump of the test can be resteered")
27 parser.set_defaults(inputFile=defaultTestFiles.ESD_RUN3_MC)
28 args = parser.parse_args()
29
30 flags = initConfigFlags()
31 flags.Concurrency.NumThreads = 1
32 flags.Concurrency.NumConcurrentEvents = 1
33 flags.Output.ESDFileName = args.output
34 flags.Input.Files = args.inputFile
35 configureCondTag(flags)
36 flags.lock()
37 flags.dump()
38
39 cfg = SetupMuonStandaloneCA(flags)
40 cfg.merge(MdtConditionsTestCfg(flags, LogName = args.LogName))
41 executeTest(cfg)
MdtConditionsTestCfg(flags, name="MdtConditionsTest", **kwargs)