97def getHltEventLoopMgr(flags, name='HltEventLoopMgr'):
98 '''online event loop manager'''
99
100 svc = CompFactory.HltEventLoopMgr(
101 name,
102 setMagFieldFromPtree = flags.Trigger.Online.BFieldAutoConfig
103 )
104
105 # Rewrite LVL1 result if L1 simulation and BS-writing is enabled
106 if flags.Trigger.doLVL1 and flags.Trigger.writeBS:
107 svc.RewriteLVL1 = True
108 svc.L1TriggerResultRHKey = 'L1TriggerResult'
109 svc.RoIBResultRHKey = 'RoIBResult'
110
111 # Monitoring
112 svc.MonTool = GenericMonitoringTool(flags, 'MonTool', HistPath='HLTFramework/'+name)
113
114 svc.MonTool.defineHistogram('TotalTime', path='EXPERT', type='TH1F',
115 title='Total event processing time (all events);Time [ms];Events',
116 xbins=200, xmin=0, xmax=10000)
117 svc.MonTool.defineHistogram('TotalTime;TotalTime_extRange', path='EXPERT', type='TH1F',
118 title='Total event processing time (all events);Time [ms];Events',
119 xbins=200, xmin=0, xmax=20000, opt='kCanRebin')
120
121 svc.MonTool.defineHistogram('TotalTimeAccepted', path='EXPERT', type='TH1F',
122 title='Total event processing time (accepted events);Time [ms];Events',
123 xbins=200, xmin=0, xmax=10000)
124 svc.MonTool.defineHistogram('TotalTimeAccepted;TotalTimeAccepted_extRange', path='EXPERT', type='TH1F',
125 title='Total event processing time (accepted events);Time [ms];Events',
126 xbins=200, xmin=0, xmax=20000, opt='kCanRebin')
127
128 svc.MonTool.defineHistogram('TotalTimeRejected', path='EXPERT', type='TH1F',
129 title='Total event processing time (rejected events);Time [ms];Events',
130 xbins=200, xmin=0, xmax=10000)
131 svc.MonTool.defineHistogram('TotalTimeRejected;TotalTimeRejected_extRange', path='EXPERT', type='TH1F',
132 title='Total event processing time (rejected events);Time [ms];Events',
133 xbins=200, xmin=0, xmax=20000, opt='kCanRebin')
134
135 svc.MonTool.defineHistogram('SlotIdleTime', path='EXPERT', type='TH1F',
136 title='Time between freeing and assigning a scheduler slot;Time [ms];Events',
137 xbins=400, xmin=0, xmax=400)
138 svc.MonTool.defineHistogram('SlotIdleTime;SlotIdleTime_extRange', path='EXPERT', type='TH1F',
139 title='Time between freeing and assigning a scheduler slot;Time [ms];Events',
140 xbins=400, xmin=0, xmax=800, opt='kCanRebin')
141
142 svc.MonTool.defineHistogram('TIME_clearStore', path='EXPERT', type='TH1F',
143 title='Time of clearStore() calls;Time [ms];Calls',
144 xbins=200, xmin=0, xmax=50)
145 svc.MonTool.defineHistogram('TIME_clearStore;TIME_clearStore_extRange', path='EXPERT', type='TH1F',
146 title='Time of clearStore() calls;Time [ms];Calls',
147 xbins=200, xmin=0, xmax=200, opt='kCanRebin')
148
149 svc.MonTool.defineHistogram('PopSchedulerTime', path='EXPERT', type='TH1F',
150 title='Time spent waiting for a finished event from the Scheduler;Time [ms];drainScheduler() calls',
151 xbins=250, xmin=0, xmax=250)
152 svc.MonTool.defineHistogram('PopSchedulerNumEvt', path='EXPERT', type='TH1F',
153 title='Number of events popped out of scheduler at the same time;Time [ms];drainScheduler() calls',
154 xbins=50, xmin=0, xmax=50)
155
156 from TrigSteerMonitor.TrigSteerMonitorConfig import getTrigErrorMonTool
157 svc.TrigErrorMonTool = getTrigErrorMonTool(flags)
158
159 if flags.Trigger.CostMonitoring.doCostMonitoring:
160 svc.TrigErrorMonTool.TrigCostSvc = CompFactory.TrigCostSvc()
161
162 return svc
163
164