4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from MuonConfig.MuonCondAlgConfig
import NswCalibDbAlgCfg
9 the_alg = CompFactory.NswCondTestAlg(alg_name, **kwargs)
10 result.addEventAlgo(the_alg, primary=
True)
14 if __name__ ==
"__main__":
15 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
16 from MuonCondTest.MdtCablingTester
import SetupArgParser, setupServicesCfg
19 parser.add_argument(
"--LogName", default=
"LogFile",
20 help=
"If the test is run multiple times to ensure reproducibility, then the dump of the test can be resteered")
21 parser.add_argument(
"--isMC", action =
'store_true', default=
False)
22 parser.set_defaults(inputFile=[])
23 args = parser.parse_args()
25 mcInputFile =
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/UnitTestInput/Run3MC.ESD.pool.root"
26 dataInputFile =
"/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/UnitTestInput/Run3Data.ESD.pool.root"
28 if(
not args.inputFile):
30 args.inputFile = [mcInputFile]
32 args.inputFile = [dataInputFile]
36 flags.Concurrency.NumThreads = args.threads
37 flags.Concurrency.NumConcurrentEvents = args.threads
38 flags.Output.ESDFileName = args.output
39 flags.Input.Files = args.inputFile
40 flags.Muon.Calib.applyMmT0Correction =
not args.isMC
44 msgService = cfg.getService(
'MessageSvc')
45 msgService.Format =
"S:%s E:%e % F%128W%S%7W%R%T %0W%M"
47 cfg.merge(
NSWCondAlgTest(flags, LogName = args.LogName, isMC = flags.Input.isMC))
48 cfg.printConfig(withDetails=
True, summariseProps=
True)
53 if not sc.isSuccess():
55 sys.exit(
"Execution failed")