ATLAS Offline Software
PlotNSWGeo.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 
5 def NSWGeoPlottingAlgCfg(flags, name = "NSWGeoPlottingAlg", **kwargs):
6  result = ComponentAccumulator()
7  event_algo = CompFactory.MuonGM.NSWGeoPlottingAlg(name, **kwargs)
8  result.addEventAlgo(event_algo, primary = True)
9  return result
10 
11 if __name__ == "__main__":
12  from AthenaConfiguration.AllConfigFlags import initConfigFlags
13  from MuonCondTest.MdtCablingTester import SetupArgParser
14  parser = SetupArgParser()
15  parser.set_defaults(inputFile=["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/MuonRecRTT/EVGEN_ParticleGun_FourMuon_Pt10to500.root"])
16  args = parser.parse_args()
17 
18  flags = initConfigFlags()
19  flags.Concurrency.NumThreads = args.threads
20  flags.Concurrency.NumConcurrentEvents = args.threads # Might change this later, but good enough for the moment.
21  flags.Output.ESDFileName = args.output
22  flags.Input.Files = args.inputFile
23  flags.Muon.applyMMPassivation = True
24  from AthenaConfiguration.TestDefaults import defaultConditionsTags, defaultGeometryTags
25  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
26  flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_MC
27  flags.lock()
28 
29  from MuonCondTest.MdtCablingTester import setupServicesCfg
30  cfg = setupServicesCfg(flags)
31 
32  cfg.merge(NSWGeoPlottingAlgCfg(flags))
33 
34  msgService = cfg.getService('MessageSvc')
35 
36  cfg.printConfig(withDetails=True, summariseProps=True)
37 
38  flags.dump()
39 
40  sc = cfg.run(1)
41  if not sc.isSuccess():
42  import sys
43  sys.exit("Execution failed")
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MdtCablingTester.SetupArgParser
def SetupArgParser()
Definition: MdtCablingTester.py:3
MdtCablingTester.setupServicesCfg
def setupServicesCfg(flags)
Definition: MdtCablingTester.py:17
PlotNSWGeo.NSWGeoPlottingAlgCfg
def NSWGeoPlottingAlgCfg(flags, name="NSWGeoPlottingAlg", **kwargs)
Definition: PlotNSWGeo.py:5
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19