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 MuonCondTest.MdtCablingTester import SetupArgParser
17  from AthenaConfiguration.TestDefaults import defaultTestFiles, defaultGeometryTags
18  from MuonConfig.MuonConfigUtils import executeTest, SetupMuonStandaloneCA, configureCondTag
19 
20  parser = SetupArgParser()
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.Input.Files = defaultTestFiles.RAW_RUN3_DATA24
27 
28  flags.Concurrency.NumThreads = 1
29  flags.Concurrency.NumConcurrentEvents = 1
30  flags.Exec.MaxEvents = 1
31  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
32 
33  configureCondTag(flags)
34  flags.lock()
35  flags.dump()
36 
37  cfg = SetupMuonStandaloneCA(flags)
38  cfg.merge(NSWDcsAlgTest(flags, LogName = args.LogName))
39 
40  executeTest(cfg)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
MuonConfigUtils.executeTest
def executeTest(cfg)
Definition: MuonConfigUtils.py:15
MuonConfigUtils.configureCondTag
def configureCondTag(flags)
Definition: MuonConfigUtils.py:19
MuonConfigUtils.SetupMuonStandaloneCA
def SetupMuonStandaloneCA(flags)
Definition: MuonConfigUtils.py:79
MuonCondAlgConfig.NswDcsDbAlgCfg
def NswDcsDbAlgCfg(flags, **kwargs)
Definition: MuonCondAlgConfig.py:358
NswDcsAlgTest.NSWDcsAlgTest
def NSWDcsAlgTest(flags, alg_name="NSWDcsTestAlg", **kwargs)
Definition: NswDcsAlgTest.py:3
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19