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 AthenaMonitoring
import AthMonitorCfgHelper
16 helper = AthMonitorCfgHelper(inputFlags,
'OverviewMonitoringCfg')
19 OverviewMonAlg = helper.addAlgorithm(CompFactory.OverviewMonitorAlgorithm,
'OverviewMonAlg')
23 groupName =
'OverviewMonitor'
24 OverviewMonAlg.PackageName = groupName
29 myGroup = helper.addGroup(OverviewMonAlg, groupName , mainDir)
32 isOnline=inputFlags.Trigger.Online.isPartition
and inputFlags.Input.Format
is Format.BS
35 global_labels = [
"Processed Events"]
36 myGroup.defineHistogram(
'n_processed;l1calo_1d_NumberOfEvents',
37 title=
'Number of processed events',
40 xbins=1,xmin=0,xmax=1, xlabels=global_labels)
44 trigPath =
'Overview/Errors/'
45 NumberOfGlobalErrors=15
46 globalStatus_xlabels = [
63 globalStatus_ylabels = []
64 for crate
in range(14):
70 type =
"PP " if (crate < 8)
else "CP " if (crate < 12)
else "JEP "
71 globalStatus_ylabels.append(type)
73 myGroup.defineHistogram(
'globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverview',title=
'L1Calo Global Error Overview;;',
76 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,
77 ybins=14,ymin=0.,ymax=14, xlabels=globalStatus_xlabels, ylabels=globalStatus_ylabels,
78 duration=
'' if isOnline
else 'lb',
82 myGroup.defineHistogram(
'globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverviewRecent',
83 title=
'L1Calo Global Error Overview Last 10 LumiBlocks;;',
86 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,
87 ybins=14,ymin=0.,ymax=14, xlabels=globalStatus_xlabels, ylabels=globalStatus_ylabels,
88 opt=
'kLBNHistoryDepth=10,kAlwaysCreate')
91 myGroup.defineHistogram(
'lb_errors;l1calo_1d_ErrorsByLumiblock',
92 title=
'Events with Errors by Lumiblock;Lumi Block;Number of Events;',
95 xbins=3000,xmin=0,xmax=3000,
100 acc = helper.result()
105 if __name__==
'__main__':
107 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
111 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')
114 flags.Input.Files = inputs
115 flags.Output.HISTFileName =
'ExampleMonitorOutput_LVL1.root'
120 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
121 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
126 cfg.merge(OverviewMonitorCfg)
129 OverviewMonitorCfg.getEventAlgo(
'OverviewMonAlg').OutputLevel = 2
131 cfg.printConfig(withDetails=
False, summariseProps =
True)