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')
22 groupName =
'OverviewMonitor'
23 OverviewMonAlg.PackageName = groupName
28 myGroup = helper.addGroup(OverviewMonAlg, groupName , mainDir)
31 isOnline=inputFlags.Trigger.Online.isPartition
and inputFlags.Input.Format
is Format.BS
34 global_labels = [
"Processed Events"]
35 myGroup.defineHistogram(
'n_processed;l1calo_1d_NumberOfEvents',
36 title=
'Number of processed events',
39 xbins=1,xmin=0,xmax=1, xlabels=global_labels)
43 trigPath =
'Overview/Errors/'
44 NumberOfGlobalErrors=15
45 globalStatus_xlabels = [
62 globalStatus_ylabels = []
63 for crate
in range(14):
69 type =
"PP " if (crate < 8)
else "CP " if (crate < 12)
else "JEP "
70 globalStatus_ylabels.append(type)
72 myGroup.defineHistogram(
'globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverview',title=
'L1Calo Global Error Overview;;',
75 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,
76 ybins=14,ymin=0.,ymax=14, xlabels=globalStatus_xlabels, ylabels=globalStatus_ylabels,
77 duration=
'' if isOnline
else 'lb',
81 myGroup.defineHistogram(
'globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverviewRecent',
82 title=
'L1Calo Global Error Overview Last 10 LumiBlocks;;',
85 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,
86 ybins=14,ymin=0.,ymax=14, xlabels=globalStatus_xlabels, ylabels=globalStatus_ylabels,
87 opt=
'kLBNHistoryDepth=10,kAlwaysCreate')
90 myGroup.defineHistogram(
'lb_errors;l1calo_1d_ErrorsByLumiblock',
91 title=
'Events with Errors by Lumiblock;Lumi Block;Number of Events;',
94 xbins=3000,xmin=0,xmax=3000,
104 if __name__==
'__main__':
106 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
110 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')
113 flags.Input.Files = inputs
114 flags.Output.HISTFileName =
'ExampleMonitorOutput_LVL1.root'
119 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
120 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
125 cfg.merge(OverviewMonitorCfg)
128 OverviewMonitorCfg.getEventAlgo(
'OverviewMonAlg').OutputLevel = 2
130 cfg.printConfig(withDetails=
False, summariseProps =
True)