ATLAS Offline Software
EfexInputMonitorAlgorithm.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
5  '''Function to configure LVL1 EfexInput algorithm in the monitoring system.'''
6 
7  # get the component factory - used for getting the algorithms
8  from AthenaConfiguration.ComponentFactory import CompFactory
9  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
10  result = ComponentAccumulator()
11 
12  from LArBadChannelTool.LArBadChannelConfig import LArMaskedSCCfg
13 
14  result.merge(LArMaskedSCCfg(flags))
15 
16  # use L1Calo's special MonitoringCfgHelper
17  from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig import L1CaloMonitorCfgHelper
18  helper = L1CaloMonitorCfgHelper(flags,CompFactory.EfexInputMonitorAlgorithm,'EfexInputMonAlg')
19 
20  helper.defineHistogram('LBNString,Error;h_summary',title='EfexInput Monitoring summary;LBN;Error',
21  fillGroup="errors",
22  type='TH2I',
23  xlabels=[""],
24  ybins=1,ymin=0,ymax=1,ylabels=[""],
25  opt=['kCanRebin','kAlwaysCreate'],merge="merge")
26 
27  helper.defineHistogram('LBN,TowerEta,TowerCount;h_dataTowers_ecal',title='DataTowers ECAL Average;LBN;Eta',
28  fillGroup="ecal",
29  type='TProfile2D',
30  xbins=1,xmin=0,xmax=1,
31  ybins=50,ymin=-2.5,ymax=2.5,
32  opt=['kAddBinsDynamically','kAlwaysCreate'],merge="merge")
33  helper.defineHistogram('LBN,TowerEta,TowerCount;h_dataTowers_hcal',title='DataTowers HCAL Average;LBN;Eta',
34  fillGroup="hcal",
35  type='TProfile2D',
36  xbins=1,xmin=0,xmax=1,
37  ybins=50,ymin=-2.5,ymax=2.5,
38  opt=['kAddBinsDynamically','kAlwaysCreate'],merge="merge")
39  helper.defineTree('LBNString,Error,EventNumber,TowerId,TowerEta,TowerPhi,TowerEmstatus,TowerHadstatus,TowerSlot,TowerCount,RefTowerCount,SlotSCID,timeSince,timeUntil;errors',
40  "lbnString/string:error/string:eventNumber/l:id/I:eta/F:phi/F:em_status/i:had_status/i:slot/I:count/I:ref_count/I:scid/string:timeSince/I:timeUntil/I",
41  title="errors tree;LBN;Error",fillGroup="errors")
42 
43 
44  result.merge(helper.result())
45  return result
46 
47 
48 if __name__=='__main__':
49  # set input file and config options
50  from AthenaConfiguration.AllConfigFlags import initConfigFlags
51  import glob
52 
53  inputs = glob.glob('/eos/atlas/atlastier0/rucio/data18_13TeV/physics_Main/00354311/data18_13TeV.00354311.physics_Main.recon.ESD.f1129/data18_13TeV.00354311.physics_Main.recon.ESD.f1129._lb0013._SFO-8._0001.1')
54 
55  flags = initConfigFlags()
56  flags.Input.Files = inputs
57  flags.Output.HISTFileName = 'ExampleMonitorOutput_LVL1_MC.root'
58 
59  flags.lock()
60  flags.dump() # print all the configs
61 
62  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
63  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
64  cfg = MainServicesCfg(flags)
65  cfg.merge(PoolReadCfg(flags))
66 
67  EfexInputMonitorCfg = EfexInputMonitoringConfig(flags)
68  cfg.merge(EfexInputMonitorCfg)
69 
70  # options - print all details of algorithms, very short summary
71  cfg.printConfig(withDetails=False, summariseProps = True)
72 
73  nevents=10
74  cfg.run(nevents)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
EfexInputMonitorAlgorithm.EfexInputMonitoringConfig
def EfexInputMonitoringConfig(flags)
Definition: EfexInputMonitorAlgorithm.py:4
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:256
python.LArBadChannelConfig.LArMaskedSCCfg
def LArMaskedSCCfg(configFlags)
Definition: LArBadChannelConfig.py:59
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69