ATLAS Offline Software
Loading...
Searching...
No Matches
python.TrigServicesConfig Namespace Reference

Functions

 getMessageSvc (flags, msgSvcType="TrigMessageSvc")
 getTrigCOOLUpdateHelper (flags, name='TrigCOOLUpdateHelper')
 getHltROBDataProviderSvc (flags, name='ROBDataProviderSvc')
 getHltEventLoopMgr (flags, name='HltEventLoopMgr')
 TrigServicesCfg (flags)

Variables

 log = logging.getLogger('TrigServicesConfig')
 flags = defaultOnlineFlags()
 cfg = ComponentAccumulator()

Function Documentation

◆ getHltEventLoopMgr()

python.TrigServicesConfig.getHltEventLoopMgr ( flags,
name = 'HltEventLoopMgr' )
online event loop manager

Definition at line 105 of file TrigServicesConfig.py.

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

◆ getHltROBDataProviderSvc()

python.TrigServicesConfig.getHltROBDataProviderSvc ( flags,
name = 'ROBDataProviderSvc' )
online ROB data provider service

Definition at line 76 of file TrigServicesConfig.py.

76def getHltROBDataProviderSvc(flags, name='ROBDataProviderSvc'):
77 '''online ROB data provider service'''
78 svc = CompFactory.HltROBDataProviderSvc(name,
79 doCostMonitoring = (flags.Trigger.CostMonitoring.doCostMonitoring and
80 flags.Trigger.CostMonitoring.monitorROBs) )
81
82 svc.MonTool = GenericMonitoringTool(flags, 'MonTool', HistPath='HLTFramework/'+name)
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)
101
102 return svc
103
104

◆ getMessageSvc()

python.TrigServicesConfig.getMessageSvc ( flags,
msgSvcType = "TrigMessageSvc" )

Definition at line 11 of file TrigServicesConfig.py.

11def getMessageSvc(flags, msgSvcType="TrigMessageSvc"):
12 from AthenaCommon.Constants import DEBUG, WARNING
13
14 # set message limit to unlimited when general DEBUG is requested
15 msgLimit = -100 if flags.Exec.OutputLevel>DEBUG else 0
16
17 msgsvc = CompFactory.getComp(msgSvcType)(
18 "MessageSvc",
19 OutputLevel = flags.Exec.OutputLevel,
20 Format = "%t % F%40W%C%6W%R%e%4W%s%8W%R%T %0W%M",
21 ErsFormat = "%S: %M",
22 printEventIDLevel = WARNING,
23
24 # Message suppression
25 enableSuppression = False,
26 suppressRunningOnly = True,
27 # 0 = no suppression, negative = log-suppression, positive = normal suppression
28 # Do not rely on the defaultLimit property, always set each limit separately
29 defaultLimit = msgLimit,
30 verboseLimit = msgLimit,
31 debugLimit = msgLimit,
32 infoLimit = msgLimit,
33 warningLimit = msgLimit,
34 errorLimit = 0,
35 fatalLimit = 0,
36
37 # Message forwarding to ERS
38 useErsError = ['*'],
39 useErsFatal = ['*'],
40 ersPerEventLimit = 2, # ATR-25214
41
42 # show summary statistics of messages in finalize
43 showStats = True,
44 statLevel = WARNING
45 )
46 return msgsvc
47
48

◆ getTrigCOOLUpdateHelper()

python.TrigServicesConfig.getTrigCOOLUpdateHelper ( flags,
name = 'TrigCOOLUpdateHelper' )
Enable COOL folder updates

Definition at line 49 of file TrigServicesConfig.py.

49def getTrigCOOLUpdateHelper(flags, name='TrigCOOLUpdateHelper'):
50 '''Enable COOL folder updates'''
51
52 acc = ComponentAccumulator()
53
54 montool = GenericMonitoringTool(flags, 'MonTool', HistPath='HLTFramework/'+name)
55 montool.defineHistogram('TIME_CoolFolderUpdate', path='EXPERT', type='TH1F',
56 title='Time for conditions update;time [ms]',
57 xbins=100, xmin=0, xmax=200)
58
59 cool_helper = CompFactory.TrigCOOLUpdateHelper(
60 name,
61 MonTool = montool,
62 CoolFolderMap = '/TRIGGER/HLT/COOLUPDATE',
63 # List of folders that can be updated during the run:
64 Folders = ['/Indet/Onl/Beampos',
65 '/TRIGGER/LUMI/HLTPrefLumi',
66 '/TRIGGER/HLT/PrescaleKey'] )
67
68 from IOVDbSvc.IOVDbSvcConfig import addFolders
69 acc.merge( addFolders(flags, cool_helper.CoolFolderMap, 'TRIGGER_ONL',
70 className='CondAttrListCollection') )
71
72 acc.setPrivateTools( cool_helper )
73 return acc
74
75

◆ TrigServicesCfg()

python.TrigServicesConfig.TrigServicesCfg ( flags)

Definition at line 173 of file TrigServicesConfig.py.

173def TrigServicesCfg(flags):
174 acc = ComponentAccumulator()
175
176 acc.addService( getMessageSvc(flags) )
177 acc.addService( getHltROBDataProviderSvc(flags) )
178 cool_helper = acc.popToolsAndMerge( getTrigCOOLUpdateHelper(flags) )
179
180 loop_mgr = getHltEventLoopMgr(flags)
181 loop_mgr.CoolUpdateTool = cool_helper
182
183 from TriggerJobOpts.TriggerHistSvcConfig import TriggerHistSvcConfig
184 acc.merge( TriggerHistSvcConfig(flags) )
185
186 from TrigOutputHandling.TrigOutputHandlingConfig import HLTResultMTMakerCfg
187 loop_mgr.ResultMaker = HLTResultMTMakerCfg(flags)
188
189 from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
190 acc.merge(ByteStreamReadCfg(flags))
191 loop_mgr.EvtSel = acc.getService('EventSelectorByteStream')
192 loop_mgr.OutputCnvSvc = acc.getService('ByteStreamCnvSvc')
193
194 # Rewrite LVL1 result if L1 simulation and BS-writing is enabled
195 if flags.Trigger.doLVL1 and flags.Trigger.writeBS:
196 from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamEncoderCfg
197 acc.merge(L1TriggerByteStreamEncoderCfg(flags))
198
199 from TrigSteerMonitor.TrigSteerMonitorConfig import SchedulerMonSvcCfg
200 acc.merge( SchedulerMonSvcCfg(flags) )
201 loop_mgr.MonitorScheduler = True
202
203 acc.addService(loop_mgr, primary=True)
204 acc.setAppProperty("EventLoop", loop_mgr.name)
205
206 return acc
207
208

Variable Documentation

◆ cfg

python.TrigServicesConfig.cfg = ComponentAccumulator()

Definition at line 214 of file TrigServicesConfig.py.

◆ flags

python.TrigServicesConfig.flags = defaultOnlineFlags()

Definition at line 211 of file TrigServicesConfig.py.

◆ log

python.TrigServicesConfig.log = logging.getLogger('TrigServicesConfig')

Definition at line 8 of file TrigServicesConfig.py.