3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
7 from AthenaCommon.Logging
import logging
8 log = logging.getLogger(
'TrigServicesConfig')
15 msgLimit = -100
if flags.Exec.OutputLevel>DEBUG
else 0
17 msgsvc = CompFactory.getComp(msgSvcType)(
19 OutputLevel = flags.Exec.OutputLevel,
20 Format =
"%t % F%40W%C%6W%R%e%4W%s%8W%R%T %0W%M",
22 printEventIDLevel = WARNING,
25 enableSuppression =
False,
26 suppressRunningOnly =
True,
29 defaultLimit = msgLimit,
30 verboseLimit = msgLimit,
31 debugLimit = msgLimit,
33 warningLimit = msgLimit,
50 '''Enable COOL folder updates'''
55 montool.defineHistogram(
'TIME_CoolFolderUpdate', path=
'EXPERT', type=
'TH1F',
56 title=
'Time for conditions update;time [ms]',
57 xbins=100, xmin=0, xmax=200)
59 cool_helper = CompFactory.TrigCOOLUpdateHelper(
62 CoolFolderMap =
'/TRIGGER/HLT/COOLUPDATE',
64 Folders = [
'/Indet/Onl/Beampos',
65 '/TRIGGER/LUMI/HLTPrefLumi',
66 '/TRIGGER/HLT/PrescaleKey'] )
68 from IOVDbSvc.IOVDbSvcConfig
import addFolders
69 acc.merge(
addFolders(flags, cool_helper.CoolFolderMap,
'TRIGGER_ONL',
70 className=
'CondAttrListCollection') )
72 acc.setPrivateTools( cool_helper )
77 '''online ROB data provider service'''
78 svc = CompFactory.HltROBDataProviderSvc(name,
79 doCostMonitoring = (flags.Trigger.CostMonitoring.doCostMonitoring
and
80 flags.Trigger.CostMonitoring.monitorROBs) )
83 svc.MonTool.defineHistogram(
'TIME_ROBReserveData', path=
'EXPERT', type=
'TH1F',
84 title=
'Time to reserve ROBs for later retrieval;time [mu s]',
85 xbins=100, xmin=0, xmax=1000)
86 svc.MonTool.defineHistogram(
'NUMBER_ROBReserveData', path=
'EXPERT', type=
'TH1F',
87 title=
'Number of reserved ROBs for later retrieval;number',
88 xbins=100, xmin=0, xmax=500)
89 svc.MonTool.defineHistogram(
'TIME_ROBRequest', path=
'EXPERT', type=
'TH1F',
90 title=
'Time for ROB retrievals;time [mu s]',
91 xbins=400, xmin=0, xmax=200000)
92 svc.MonTool.defineHistogram(
'NUMBER_ROBRequest', path=
'EXPERT', type=
'TH1F',
93 title=
'Number of retrieved ROBs;number',
94 xbins=100, xmin=0, xmax=1000)
95 svc.MonTool.defineHistogram(
'TIME_CollectAllROBs', path=
'EXPERT', type=
'TH1F',
96 title=
'Time for retrieving complete event data;time [mu s]',
97 xbins=400, xmin=0, xmax=200000)
98 svc.MonTool.defineHistogram(
'NUMBER_CollectAllROBs', path=
'EXPERT', type=
'TH1F',
99 title=
'Number of received ROBs for collect call;number',
100 xbins=100, xmin=0, xmax=2500)
106 '''online event loop manager'''
108 svc = CompFactory.HltEventLoopMgr(
110 setMagFieldFromPtree = flags.Trigger.Online.BFieldAutoConfig
114 if flags.Trigger.doLVL1
and flags.Trigger.writeBS:
115 svc.RewriteLVL1 =
True
116 svc.L1TriggerResultRHKey =
'L1TriggerResult'
117 svc.RoIBResultRHKey =
'RoIBResult'
122 svc.MonTool.defineHistogram(
'TotalTime', path=
'EXPERT', type=
'TH1F',
123 title=
'Total event processing time (all events);Time [ms];Events',
124 xbins=200, xmin=0, xmax=10000)
125 svc.MonTool.defineHistogram(
'TotalTime;TotalTime_extRange', path=
'EXPERT', type=
'TH1F',
126 title=
'Total event processing time (all events);Time [ms];Events',
127 xbins=200, xmin=0, xmax=20000, opt=
'kCanRebin')
129 svc.MonTool.defineHistogram(
'TotalTimeAccepted', path=
'EXPERT', type=
'TH1F',
130 title=
'Total event processing time (accepted events);Time [ms];Events',
131 xbins=200, xmin=0, xmax=10000)
132 svc.MonTool.defineHistogram(
'TotalTimeAccepted;TotalTimeAccepted_extRange', path=
'EXPERT', type=
'TH1F',
133 title=
'Total event processing time (accepted events);Time [ms];Events',
134 xbins=200, xmin=0, xmax=20000, opt=
'kCanRebin')
136 svc.MonTool.defineHistogram(
'TotalTimeRejected', path=
'EXPERT', type=
'TH1F',
137 title=
'Total event processing time (rejected events);Time [ms];Events',
138 xbins=200, xmin=0, xmax=10000)
139 svc.MonTool.defineHistogram(
'TotalTimeRejected;TotalTimeRejected_extRange', path=
'EXPERT', type=
'TH1F',
140 title=
'Total event processing time (rejected events);Time [ms];Events',
141 xbins=200, xmin=0, xmax=20000, opt=
'kCanRebin')
143 svc.MonTool.defineHistogram(
'SlotIdleTime', path=
'EXPERT', type=
'TH1F',
144 title=
'Time between freeing and assigning a scheduler slot;Time [ms];Events',
145 xbins=400, xmin=0, xmax=400)
146 svc.MonTool.defineHistogram(
'SlotIdleTime;SlotIdleTime_extRange', path=
'EXPERT', type=
'TH1F',
147 title=
'Time between freeing and assigning a scheduler slot;Time [ms];Events',
148 xbins=400, xmin=0, xmax=800, opt=
'kCanRebin')
150 svc.MonTool.defineHistogram(
'TIME_clearStore', path=
'EXPERT', type=
'TH1F',
151 title=
'Time of clearStore() calls;Time [ms];Calls',
152 xbins=200, xmin=0, xmax=50)
153 svc.MonTool.defineHistogram(
'TIME_clearStore;TIME_clearStore_extRange', path=
'EXPERT', type=
'TH1F',
154 title=
'Time of clearStore() calls;Time [ms];Calls',
155 xbins=200, xmin=0, xmax=200, opt=
'kCanRebin')
157 svc.MonTool.defineHistogram(
'PopSchedulerTime', path=
'EXPERT', type=
'TH1F',
158 title=
'Time spent waiting for a finished event from the Scheduler;Time [ms];drainScheduler() calls',
159 xbins=250, xmin=0, xmax=250)
160 svc.MonTool.defineHistogram(
'PopSchedulerNumEvt', path=
'EXPERT', type=
'TH1F',
161 title=
'Number of events popped out of scheduler at the same time;Time [ms];drainScheduler() calls',
162 xbins=50, xmin=0, xmax=50)
164 from TrigSteerMonitor.TrigSteerMonitorConfig
import getTrigErrorMonTool
167 if flags.Trigger.CostMonitoring.doCostMonitoring:
168 svc.TrigErrorMonTool.TrigCostSvc = CompFactory.TrigCostSvc()
181 loop_mgr.CoolUpdateTool = cool_helper
183 from TriggerJobOpts.TriggerHistSvcConfig
import TriggerHistSvcConfig
186 from TrigOutputHandling.TrigOutputHandlingConfig
import HLTResultMTMakerCfg
189 from TriggerJobOpts.TriggerByteStreamConfig
import ByteStreamReadCfg
191 loop_mgr.EvtSel = acc.getService(
'EventSelectorByteStream')
192 loop_mgr.OutputCnvSvc = acc.getService(
'ByteStreamCnvSvc')
195 if flags.Trigger.doLVL1
and flags.Trigger.writeBS:
196 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig
import L1TriggerByteStreamEncoderCfg
199 from TrigSteerMonitor.TrigSteerMonitorConfig
import SchedulerMonSvcCfg
201 loop_mgr.MonitorScheduler =
True
203 acc.addService(loop_mgr, primary=
True)
204 acc.setAppProperty(
"EventLoop", loop_mgr.name)
209 if __name__==
"__main__":
210 from TrigPSC.PscDefaultFlags
import defaultOnlineFlags