ATLAS Offline Software
NswDcsAlgTest.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 def NSWDcsAlgTest(flags,alg_name="NSWDcsTestAlg", **kwargs):
4  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
5  result = ComponentAccumulator()
6  from AthenaConfiguration.ComponentFactory import CompFactory
7  from MuonConfig.MuonCondAlgConfig import NswDcsDbAlgCfg
8  result.merge(NswDcsDbAlgCfg(flags))
9  the_alg = CompFactory.NswDcsTestAlg(alg_name, **kwargs)
10  result.addEventAlgo(the_alg, primary=True)
11  return result
12 
13 
14 if __name__ == "__main__":
15  from AthenaConfiguration.AllConfigFlags import initConfigFlags
16  from .MdtCablingTester import SetupArgParser, setupServicesCfg
17 
18  parser = SetupArgParser()
19  parser.set_defaults(inputFile=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/data23/ESD/data23_cos.00448208.express_express.recon.ESD.x721/73events.data23_cos.00448208.express_express.recon.ESD.x721._lb0003._SFO-ALL._0001.1"])
20 
21  parser.add_argument("--LogName", default="LogFile",
22  help="If the test is run multiple times to ensure reproducibility, then the dump of the test can be resteered")
23  args = parser.parse_args()
24 
25  flags = initConfigFlags()
26  flags.Concurrency.NumThreads = args.threads
27  flags.Concurrency.NumConcurrentEvents = args.threads # Might change this later, but good enough for the moment.
28  flags.Output.ESDFileName = args.output
29  flags.Input.Files = args.inputFile
30  flags.lock()
31 
32  cfg = setupServicesCfg(flags)
33  cfg.merge(NSWDcsAlgTest(flags, LogName = args.LogName))
34  cfg.printConfig(withDetails=True, summariseProps=True)
35 
36  flags.dump()
37 
38  sc = cfg.run(1)
39  if not sc.isSuccess():
40  import sys
41  sys.exit("Execution failed")
42 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MdtCablingTester.setupServicesCfg
def setupServicesCfg(flags)
Definition: MdtCablingTester.py:17
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
python.MuonCondAlgConfig.NswDcsDbAlgCfg
def NswDcsDbAlgCfg(flags, **kwargs)
Definition: MuonCondAlgConfig.py:349
python.NswDcsAlgTest.NSWDcsAlgTest
def NSWDcsAlgTest(flags, alg_name="NSWDcsTestAlg", **kwargs)
Definition: NswDcsAlgTest.py:3
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19