105def getHltEventLoopMgr(flags, name='HltEventLoopMgr'):
106 '''online event loop manager'''
107
108 svc = CompFactory.HltEventLoopMgr(
109 name,
110 setMagFieldFromPtree = flags.Trigger.Online.BFieldAutoConfig
111 )
112
113 # Rewrite LVL1 result if L1 simulation and BS-writing is enabled
114 if flags.Trigger.doLVL1 and flags.Trigger.writeBS:
115 svc.RewriteLVL1 = True
116 svc.L1TriggerResultRHKey = 'L1TriggerResult'
117 svc.RoIBResultRHKey = 'RoIBResult'
118
119 # Monitoring
120 svc.MonTool = GenericMonitoringTool(flags, 'MonTool', HistPath='HLTFramework/'+name)
121
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')
128
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')
135
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')
142
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')
149
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')
156
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)
163
164 from TrigSteerMonitor.TrigSteerMonitorConfig import getTrigErrorMonTool
165 svc.TrigErrorMonTool = getTrigErrorMonTool(flags)
166
167 if flags.Trigger.CostMonitoring.doCostMonitoring:
168 svc.TrigErrorMonTool.TrigCostSvc = CompFactory.TrigCostSvc()
169
170 return svc
171
172