5 '''Function to configure LVL1 Overview algorithm in the monitoring system.'''
7 from AthenaConfiguration.Enums
import Format
10 from AthenaConfiguration.ComponentFactory
import CompFactory
11 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
15 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
16 helper = L1CaloMonitorCfgHelper(inputFlags,CompFactory.OverviewMonitorAlgorithm,
'OverviewMonAlg')
19 OverviewMonAlg = helper.alg
22 groupName =
'OverviewMonitor'
23 OverviewMonAlg.PackageName = groupName
26 isOnline=inputFlags.Trigger.Online.isPartition
and inputFlags.Input.Format
is Format.BS
29 histPath_exp =
'Expert/PpmTrex/Overview/'
30 histPath_det =
'Expert/PpmTrex/Overview/detail'
33 global_labels = [
"Processed Events"]
34 helper.defineHistogram(
'n_processed;l1calo_1d_NumberOfEvents',
36 title=
'Number of processed events',
40 "description":
"Number of processed events."
42 xbins=1,xmin=0,xmax=1, xlabels=global_labels)
46 NumberOfGlobalErrors=15
47 globalStatus_xlabels = [
64 globalStatus_ylabels = []
65 for crate
in range(14):
71 type =
"PP " if (crate < 8)
else "CP " if (crate < 12)
else "JEP "
72 globalStatus_ylabels.append(type)
74 helper.defineHistogram(
'globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverview',
75 title=
'L1Calo Global Error Overview;;',
80 "algorithm" :
"Histogram_Empty",
81 "display" :
"SetPalette(1),SetGridx,SetGridy",
82 "description" :
"L1Calo Global Error Overview."
84 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,
85 ybins=14,ymin=0.,ymax=14,
86 xlabels=globalStatus_xlabels, ylabels=globalStatus_ylabels,
90 helper.defineHistogram(
'globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverviewRecent',
91 title=
'L1Calo Global Error Overview Last 10 LumiBlocks;;',
96 "algorithm" :
"Histogram_Empty",
97 "display" :
"SetPalette(1),SetGridx,SetGridy",
98 "description":
"L1Calo Global Error Overview Last 10 LumiBlocks."
100 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,
101 ybins=14,ymin=0.,ymax=14,
102 xlabels=globalStatus_xlabels, ylabels=globalStatus_ylabels,
103 opt=
'kLBNHistoryDepth=10,kAlwaysCreate')
106 helper.defineHistogram(
'lb_errors;l1calo_1d_ErrorsByLumiblock',
107 title=
'Events with Errors by Lumiblock;Lumi Block;Number of Events;',
112 "description":
"Events with Errors by Lumiblock."
114 xbins=3000,xmin=0,xmax=3000,
115 weight=
'n_lb_errors',
118 acc = helper.result()
123 if __name__==
'__main__':
125 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
129 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')
132 flags.Input.Files = inputs
133 flags.Output.HISTFileName =
'ExampleMonitorOutput_LVL1.root'
138 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
139 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
144 cfg.merge(OverviewMonitorCfg)
147 OverviewMonitorCfg.getEventAlgo(
'OverviewMonAlg').OutputLevel = 2
149 cfg.printConfig(withDetails=
False, summariseProps =
True)