ATLAS Offline Software
MicroMegaCablingTester.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 def MicroMegaCablingTestAlgCfg(flags, name = "MMCablingTestAlg"):
4  from AthenaConfiguration.ComponentFactory import CompFactory
5  from MuonCondTest.MdtCablingTester import setupServicesCfg
6  result = setupServicesCfg(flags)
7  from MuonConfig.MuonCablingConfig import NswCablingCfg
8  from AthenaCommon.Constants import DEBUG
9  result.merge(NswCablingCfg(flags, JSONFile = "MMGZebraShift.json", OutputLevel = DEBUG ))
10  event_algo = CompFactory.MMCablingTestAlg(name, OutputLevel = DEBUG)
11  result.addEventAlgo(event_algo, primary = True)
12  return result
13 
14 if __name__ == "__main__":
15  from AthenaConfiguration.AllConfigFlags import initConfigFlags
16  from MuonCondTest.MdtCablingTester import SetupArgParser
17  parser = SetupArgParser()
18  parser.set_defaults(inputFile=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/UnitTestInput/Run3Data.ESD.pool.root"])
19  args = parser.parse_args()
20 
21  import os
22  os.system("python -m MuonMM_Cabling.zebraShift")
23 
24  flags = initConfigFlags()
25  flags.Concurrency.NumThreads = args.threads
26  flags.Concurrency.NumConcurrentEvents = args.threads # Might change this later, but good enough for the moment.
27  flags.Output.ESDFileName = args.output
28  flags.Input.Files = args.inputFile
29  flags.lock()
30 
32  cfg.printConfig(withDetails=True, summariseProps=True)
33  flags.dump()
34 
35  sc = cfg.run(1)
36  if not sc.isSuccess():
37  import sys
38  sys.exit("Execution failed")
39 
40 
python.MdtCablingTester.setupServicesCfg
def setupServicesCfg(flags)
Definition: MdtCablingTester.py:17
python.MuonCablingConfig.NswCablingCfg
def NswCablingCfg(flags, name="MuonNSW_CablingAlg", **kwargs)
Definition: MuonCablingConfig.py:176
python.MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
python.MicroMegaCablingTester.MicroMegaCablingTestAlgCfg
def MicroMegaCablingTestAlgCfg(flags, name="MMCablingTestAlg")
Definition: MicroMegaCablingTester.py:3
Constants
some useful constants -------------------------------------------------—
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19