ATLAS Offline Software
Loading...
Searching...
No Matches
OverviewMonitorAlgorithm Namespace Reference

Functions

 OverviewMonitoringConfig (inputFlags)

Function Documentation

◆ OverviewMonitoringConfig()

OverviewMonitorAlgorithm.OverviewMonitoringConfig ( inputFlags)
Function to configure LVL1 Overview algorithm in the monitoring system.

Definition at line 4 of file OverviewMonitorAlgorithm.py.

4def OverviewMonitoringConfig(inputFlags):
5 '''Function to configure LVL1 Overview algorithm in the monitoring system.'''
6
7 from AthenaConfiguration.Enums import Format
8
9 # get the component factory - used for getting the algorithms
10 from AthenaConfiguration.ComponentFactory import CompFactory
11 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
12 result = ComponentAccumulator()
13
14 # use L1Calo's special MonitoringCfgHelper
15 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig import L1CaloMonitorCfgHelper
16 helper = L1CaloMonitorCfgHelper(inputFlags,CompFactory.OverviewMonitorAlgorithm,'OverviewMonAlg')
17
18 # get any algorithms
19 OverviewMonAlg = helper.alg
20
21 # add any steering
22 groupName = 'OverviewMonitor' # the monitoring group name is also used for the package name
23 OverviewMonAlg.PackageName = groupName
24
25 # flag for online - different duration options required
26 isOnline=inputFlags.Trigger.Online.isPartition and inputFlags.Input.Format is Format.BS
27
28 # histogram path
29 histPath_exp = 'Expert/PpmTrex/Overview/'
30 histPath_det = 'Expert/PpmTrex/Overview/detail'
31
32 # number of processed events
33 global_labels = ["Processed Events"]
34 helper.defineHistogram('n_processed;l1calo_1d_NumberOfEvents',
35 fillGroup=groupName,
36 title='Number of processed events',
37 type='TH1I',
38 path=histPath_det,
39 hanConfig={
40 "description": "Number of processed events."
41 },
42 xbins=1,xmin=0,xmax=1, xlabels=global_labels)
43
44
45 # global overview
46 NumberOfGlobalErrors=15
47 globalStatus_xlabels = [
48 "PPMDataStatus",
49 "PPMDataError",
50 "SubStatus",
51 "Parity",
52 "LinkDown",
53 "Transmission",
54 "Simulation",
55 "CMXSubStatus",
56 "CMXParity",
57 "CMXTransmission",
58 "CMXSimulation",
59 "RODStatus",
60 "RODMissing",
61 "ROBStatus",
62 "Unpacking"]
63
64 globalStatus_ylabels = []
65 for crate in range(14):
66 cr = crate
67 if cr >= 12:
68 cr -= 12
69 if cr >= 8:
70 cr -= 8
71 type = f"PP{cr} " if (crate < 8) else f"CP{cr} " if (crate < 12) else f"JEP{cr} "
72 globalStatus_ylabels.append(type)
73
74 helper.defineHistogram('globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverview',
75 title='L1Calo Global Error Overview;;',
76 fillGroup=groupName,
77 type='TH2I',
78 path=histPath_exp,
79 hanConfig={
80 "algorithm" : "Histogram_Empty",
81 "display" : "SetPalette(1),SetGridx,SetGridy",
82 "description" : "L1Calo Global Error Overview."
83 },
84 xbins=NumberOfGlobalErrors,xmin=0.,xmax=NumberOfGlobalErrors,
85 ybins=14,ymin=0.,ymax=14,
86 xlabels=globalStatus_xlabels, ylabels=globalStatus_ylabels,
87 opt='kAlwaysCreate')
88
89 if isOnline:
90 helper.defineHistogram('globalOverviewX,globalOverviewY;l1calo_2d_GlobalOverviewRecent',
91 title='L1Calo Global Error Overview Last 10 LumiBlocks;;',
92 fillGroup=groupName,
93 type='TH2I',
94 path=histPath_exp,
95 hanConfig={
96 "algorithm" : "Histogram_Empty",
97 "display" : "SetPalette(1),SetGridx,SetGridy",
98 "description": "L1Calo Global Error Overview Last 10 LumiBlocks."
99 },
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')
104
105
106 helper.defineHistogram('lb_errors;l1calo_1d_ErrorsByLumiblock',
107 title='Events with Errors by Lumiblock;Lumi Block;Number of Events;',
108 fillGroup=groupName,
109 type='TH1I',
110 path=histPath_det,
111 hanConfig={
112 "description": "Events with Errors by Lumiblock."
113 },
114 xbins=3000,xmin=0,xmax=3000,
115 weight='n_lb_errors',
116 opt='kAlwaysCreate')
117
118 acc = helper.result()
119 result.merge(acc)
120 return result
121
122