ATLAS Offline Software
NSWMonitorAlgorithm.py
Go to the documentation of this file.
1 #
2 #Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 from AthenaConfiguration.ComponentFactory import CompFactory
6 
7 def NSWMonitoringCfg(inputFlags):
8  '''Function to configures some algorithms in the monitoring system.'''
9 
10 
13  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
14  result = ComponentAccumulator()
15  # Make sure muon geometry is configured
16  from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
17 
18  result.merge(MuonGeoModelCfg(inputFlags))
19 
20  # The following class will make a sequence, configure algorithms, and link
21  # them to GenericMonitoringTools
22 
23  from AthenaMonitoring import AthMonitorCfgHelper
24  helper = AthMonitorCfgHelper(inputFlags,'NSWAthMonitorCfg')
25 
26  # Adding an algorithm to the helper.
27 
28  nswMonAlg = helper.addAlgorithm(CompFactory.NSWDataMonAlg,'NSWMonAlg')
29  nswMonAlg.DoESD = True
30 
31 
32  acc = helper.result()
33  result.merge(acc)
34  return result
35 
36 if __name__=='__main__':
37  from AthenaCommon.Constants import DEBUG
38 
39  # Set the Athena configuration flags
40  from AthenaConfiguration.AllConfigFlags import initConfigFlags
41  flags = initConfigFlags()
42 
43  flags.Input.Files =[
44  "/eos/atlas/atlastier0/rucio/data23_hi/express_express/00463414/data23_hi.00463414.express_express.recon.ESD.x798/data23_hi.00463414.express_express.recon.ESD.x798._lb0501._SFO-ALL._0001.1",
45  ]
46  flags.Output.HISTFileName = 'monitor_nsw.root'
47 
48  flags.Detector.GeometryMM=True
49  flags.DQ.useTrigger=False
50  flags.Input.isMC = False
51  if not flags.Input.isMC:
52  flags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2022-10"
53 
54  flags.lock()
55  flags.dump()
56  # Initialize configuration object, add accumulator, merge, and run.
57  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
58  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
59  cfg = MainServicesCfg(flags)
60  cfg.merge(PoolReadCfg(flags))
61 
62  nswMonitorAcc = NSWMonitoringCfg(flags)
63  nswMonitorAcc.OutputLevel=DEBUG
64  cfg.merge(nswMonitorAcc)
65 
66  cfg.run(100)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
Constants
some useful constants -------------------------------------------------—
NSWMonitorAlgorithm.NSWMonitoringCfg
def NSWMonitoringCfg(inputFlags)
Definition: NSWMonitorAlgorithm.py:7
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69