ATLAS Offline Software
HltEventLoopMgr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGSERVICES_HLTEVENTLOOPMGR_H
6 #define TRIGSERVICES_HLTEVENTLOOPMGR_H
7 
8 // Local includes
9 #include "EventLoopUtils.h"
10 #include "TrigSORFromPtreeHelper.h"
11 
12 // Trigger includes
20 
21 // Athena includes
24 #include "AthenaKernel/Timeout.h"
30 
31 // Gaudi includes
32 #include "GaudiKernel/EventIDBase.h" // number_type
33 #include "GaudiKernel/IEventProcessor.h"
34 #include "GaudiKernel/IEvtSelector.h"
35 #include "GaudiKernel/IConversionSvc.h"
36 #include "GaudiKernel/IAlgResourcePool.h"
37 #include "GaudiKernel/IAlgExecStateSvc.h"
38 #include "GaudiKernel/IHiveWhiteBoard.h"
39 #include "GaudiKernel/IScheduler.h"
40 #include "GaudiKernel/IIoComponentMgr.h"
41 #include "GaudiKernel/SmartIF.h"
42 #include "Gaudi/Interfaces/IOptionsSvc.h"
43 
44 // TBB includes
45 #include "tbb/concurrent_queue.h"
46 #include "tbb/task_group.h"
47 
48 // System includes
49 #include <atomic>
50 #include <chrono>
51 #include <condition_variable>
52 #include <memory>
53 
54 // Forward declarations
56 class IAlgorithm;
57 class IIncidentSvc;
58 class StoreGateSvc;
60 
61 namespace coral {
62  class AttributeList;
63 }
64 namespace HLT {
65  class HLTResultMT;
66 }
67 
71 class HltEventLoopMgr : public extends<AthService, ITrigEventLoopMgr, IEventProcessor>,
73 {
74 
75 public:
76 
78  HltEventLoopMgr(const std::string& name, ISvcLocator* svcLoc);
80  virtual ~HltEventLoopMgr() noexcept override;
81 
82  // Copy and move not allowed
83  HltEventLoopMgr(const HltEventLoopMgr&) = delete;
87 
90  virtual StatusCode initialize() override;
91  virtual StatusCode stop() override;
92  virtual StatusCode finalize() override;
94 
97  virtual StatusCode prepareForStart (const boost::property_tree::ptree &) override;
98  virtual StatusCode prepareForRun ATLAS_NOT_THREAD_SAFE (const boost::property_tree::ptree& pt) override;
101 
106  virtual StatusCode executeRun(int maxevt=-1) override;
107 
112  virtual StatusCode nextEvent(int maxevt=-1) override;
113 
118  virtual StatusCode executeEvent( EventContext &&ctx ) override;
119 
123  virtual EventContext createEventContext() override;
124 
128  virtual StatusCode stopRun() override;
129 
130 private:
131  // ------------------------- Helper types ------------------------------------
135  std::atomic<bool> eventsAvailable{true};
137  std::atomic<bool> loopEnded{false};
139  std::condition_variable loopEndedCond;
143  std::atomic<EventIDBase::number_type> maxLB{0};
145  std::condition_variable coolUpdateCond;
149  bool coolUpdateOngoing{false};
151  StatusCode exitCode{StatusCode::SUCCESS};
152  };
153 
154  // ------------------------- Helper methods ----------------------------------
155 
157  void updateDFProps();
158 
159  // Update internally kept data from new sor
160  void updateMetadataStore(const coral::AttributeList & sor_attrlist) const;
161 
164 
167 
169  const coral::AttributeList& getSorAttrList() const;
170 
172  void printSORAttrList(const coral::AttributeList& atr) const;
173 
175  StatusCode execAtStart(const EventContext& ctx) const;
176 
181  const EventContext& eventContext);
182 
184  void resetEventTimer(const EventContext& eventContext, bool processing);
185 
187  StatusCode clearWBSlot(size_t evtSlot) const;
188 
192  void inputThreadCallback();
193 
195  void outputThreadCallback();
196 
198  void eventTimerCallback();
200 
205 
209 
210  // ------------------------- Handles to required services/tools --------------
211  ServiceHandle<IIncidentSvc> m_incidentSvc{this, "IncidentSvc", "IncidentSvc"};
212  ServiceHandle<Gaudi::Interfaces::IOptionsSvc> m_jobOptionsSvc{this, "JobOptionsSvc", "JobOptionsSvc"};
213  ServiceHandle<StoreGateSvc> m_evtStore{this, "EventStore", "StoreGateSvc"};
214  ServiceHandle<StoreGateSvc> m_detectorStore{this, "DetectorStore", "DetectorStore"};
215  ServiceHandle<StoreGateSvc> m_inputMetaDataStore{this, "InputMetaDataStore", "StoreGateSvc/InputMetaDataStore"};
216  ServiceHandle<IIoComponentMgr> m_ioCompMgr{this, "IoComponentMgr", "IoComponentMgr"};
217  ServiceHandle<IEvtSelector> m_evtSelector{this, "EvtSel", "EvtSel"};
218  ServiceHandle<IConversionSvc> m_outputCnvSvc{this, "OutputCnvSvc", "OutputCnvSvc"};
219  ServiceHandle<ISchedulerMonSvc> m_schedulerMonSvc{this, "SchedulerMonSvc", "SchedulerMonSvc"};
220  ToolHandle<TrigCOOLUpdateHelper> m_coolHelper{this, "CoolUpdateTool", "TrigCOOLUpdateHelper"};
221  ToolHandle<HLTResultMTMaker> m_hltResultMaker{this, "ResultMaker", "HLTResultMTMaker"};
222  ToolHandle<GenericMonitoringTool> m_monTool{this, "MonTool", "", "Monitoring tool"};
223  ToolHandle<ITrigErrorMonTool> m_errorMonTool{this, "TrigErrorMonTool", "TrigErrorMonTool", "Error monitoring tool"};
224 
225  SmartIF<IHiveWhiteBoard> m_whiteboard;
226  SmartIF<IAlgResourcePool> m_algResourcePool;
227  SmartIF<IAlgExecStateSvc> m_aess;
228  SmartIF<IScheduler> m_schedulerSvc;
229 
230  std::unique_ptr<TrigSORFromPtreeHelper> m_sorHelper;
231 
232  // ------------------------- Other properties --------------------------------------
233  Gaudi::Property<std::string> m_schedulerName{
234  this, "SchedulerSvc", "AvalancheSchedulerSvc", "Name of the scheduler"};
235 
236  Gaudi::Property<std::string> m_whiteboardName{
237  this, "WhiteboardSvc", "EventDataSvc", "Name of the Whiteboard"};
238 
239  Gaudi::Property<float> m_hardTimeout{
240  this, "HardTimeout", 10*60*1000/*=10min*/, "Hard event processing timeout in milliseconds"};
241 
242  Gaudi::Property<float> m_softTimeoutFraction{
243  this, "SoftTimeoutFraction", 0.8, "Fraction of the hard timeout to be set as the soft timeout"};
244 
245  Gaudi::Property<unsigned int> m_timeoutThreadIntervalMs{
246  this, "TimeoutThreadIntervalMs", 1000, "How often the timeout thread checks for soft timeout, in milliseconds"};
247 
248  Gaudi::Property<bool> m_traceOnTimeout{
249  this, "TraceOnTimeout", true,
250  "Print a stack trace on the first soft timeout (might take a while, holding all threads)"};
251 
252  Gaudi::Property<int> m_maxParallelIOTasks{
253  this, "MaxParallelIOTasks", -1,
254  "Maximum number of I/O tasks which can be executed in parallel. "
255  "If <=0 then the number of scheduler threads is used."};
256 
257  Gaudi::Property<int> m_maxIOWakeUpIntervalMs{
258  this, "MaxIOWakeUpIntervalMs", -1,
259  "Maximum time input or output handling thread will sleep unless notified. Negative value (default) means no limit, "
260  "i.e. threads will only wake up on notifications. Zero means threads will never wait for notifications. "
261  "Positive value means the number of milliseconds after which a thread will wake up if it's not notified earlier."};
262 
263  Gaudi::Property<int> m_maxFrameworkErrors{
264  this, "MaxFrameworkErrors", 10,
265  "Tolerable number of recovered framework errors before exiting (<0 means all are tolerated)"};
266 
267  Gaudi::Property<std::string> m_fwkErrorDebugStreamName{
268  this, "FwkErrorDebugStreamName", "HLTMissingData",
269  "Debug stream name for events with HLT framework errors"};
270 
271  Gaudi::Property<std::string> m_algErrorDebugStreamName{
272  this, "AlgErrorDebugStreamName", "HltError",
273  "Debug stream name for events with HLT algorithm errors"};
274 
275  Gaudi::Property<std::string> m_timeoutDebugStreamName{
276  this, "TimeoutDebugStreamName", "HltTimeout",
277  "Debug stream name for events with HLT timeout"};
278 
279  Gaudi::Property<std::string> m_truncationDebugStreamName{
280  this, "TruncationDebugStreamName", "TruncatedHLTResult",
281  "Debug stream name for events with HLT result truncation"};
282 
283  Gaudi::Property<std::string> m_sorPath{
284  this, "SORPath", "/TDAQ/RunCtrl/SOR_Params", "Path to StartOfRun parameters in detector store"};
285 
286  Gaudi::Property<std::vector<std::string>> m_execAtStart{
287  this, "execAtStart", {}, "List of algorithms/sequences to execute during prepareForRun"};
288 
289  Gaudi::Property<bool> m_setMagFieldFromPtree{
290  this, "setMagFieldFromPtree", true, "Read magnet currents from ptree"};
291 
292  Gaudi::Property<unsigned int> m_forceRunNumber{
293  this, "forceRunNumber", 0, "Override run number"};
294 
295  Gaudi::Property<unsigned int> m_forceLumiblock{
296  this, "forceLumiblock", 0, "Override lumiblock number"};
297 
298  Gaudi::Property<unsigned long long> m_forceSOR_ns{
299  this, "forceStartOfRunTime", 0, "Override SOR time (epoch in nano-seconds)"};
300 
301  Gaudi::Property<bool> m_rewriteLVL1{
302  this, "RewriteLVL1", false,
303  "Encode L1 results to ByteStream and write to the output. Possible only with athenaHLT, not online."};
304 
305  Gaudi::Property<bool> m_monitorScheduler{
306  this, "MonitorScheduler", false, "Enable SchedulerMonSvc to collect scheduler status data in online histograms"};
307 
309  this, "EventContextWHKey", "EventContext", "StoreGate key for recording EventContext"};
310 
312  this, "EventInfoRHKey", "EventInfo", "StoreGate key for reading xAOD::EventInfo"};
313 
315  this, "L1TriggerResultRHKey", "", "StoreGate key for reading L1TriggerResult for RewriteLVL1"};
316 
318  this, "RoIBResultRHKey", "", "StoreGate key for reading RoIBResult for RewriteLVL1 with legacy (Run-2) L1 simulation"};
319 
321 
322  // ------------------------- Other private members ---------------------------
323 
325  EventContext m_currentRunCtx{0,0};
327  std::atomic<size_t> m_localEventNumber{0};
329  IEvtSelector::Context* m_evtSelContext{nullptr};
331  std::vector<std::chrono::steady_clock::time_point> m_eventTimerStartPoint;
333  std::vector<std::chrono::steady_clock::time_point> m_freeSlotStartPoint;
335  std::vector<bool> m_isSlotProcessing; // be aware of vector<bool> specialisation
337  std::atomic<size_t> m_freeSlots{0};
339  std::unique_ptr<HLT::LoopThread> m_inputThread;
341  std::unique_ptr<HLT::LoopThread> m_outputThread;
343  std::unique_ptr<HLT::LoopThread> m_timeoutThread;
345  std::chrono::milliseconds m_softTimeoutValue{0};
347  tbb::task_group m_parallelIOTaskGroup;
349  tbb::concurrent_bounded_queue<bool> m_parallelIOQueue;
351  tbb::concurrent_bounded_queue<EventContext*> m_finishedEventsQueue;
357  std::atomic<int> m_nFrameworkErrors{0};
359  std::string m_applicationName;
361  int m_workerID{0};
363  int m_workerPID{0};
364 
365 };
366 
367 #endif // TRIGSERVICES_HLTEVENTLOOPMGR_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
HltEventLoopMgr::clearWBSlot
StatusCode clearWBSlot(size_t evtSlot) const
Clear an event slot in the whiteboard.
Definition: HltEventLoopMgr.cxx:1043
HltEventLoopMgr::m_inputMetaDataStore
ServiceHandle< StoreGateSvc > m_inputMetaDataStore
Definition: HltEventLoopMgr.h:215
HltEventLoopMgr::m_schedulerName
Gaudi::Property< std::string > m_schedulerName
Definition: HltEventLoopMgr.h:233
HltEventLoopMgr::m_sorHelper
std::unique_ptr< TrigSORFromPtreeHelper > m_sorHelper
Definition: HltEventLoopMgr.h:230
ISchedulerMonSvc.h
HltEventLoopMgr::m_eventInfoRHKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoRHKey
Definition: HltEventLoopMgr.h:311
HltEventLoopMgr::m_jobOptionsSvc
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jobOptionsSvc
Definition: HltEventLoopMgr.h:212
HltEventLoopMgr::failedEvent
StatusCode failedEvent(HLT::OnlineErrorCode errorCode, const EventContext &eventContext)
Handle a failure to process an event.
Definition: HltEventLoopMgr.cxx:766
HltEventLoopMgr::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Definition: HltEventLoopMgr.h:225
HltEventLoopMgr::m_l1TriggerResultRHKey
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_l1TriggerResultRHKey
Definition: HltEventLoopMgr.h:314
HltEventLoopMgr::m_traceOnTimeout
Gaudi::Property< bool > m_traceOnTimeout
Definition: HltEventLoopMgr.h:248
HltEventLoopMgr::EventLoopStatus::exitCode
StatusCode exitCode
Event exit status code.
Definition: HltEventLoopMgr.h:151
HltEventLoopMgr::stop
virtual StatusCode stop() override
Definition: HltEventLoopMgr.cxx:229
HltEventLoopMgr::m_hardTimeout
Gaudi::Property< float > m_hardTimeout
Definition: HltEventLoopMgr.h:239
HltEventLoopMgr::updateMagField
StatusCode updateMagField(const boost::property_tree::ptree &pt) const
Set magnetic field currents from ptree.
Definition: HltEventLoopMgr.cxx:668
TrigCOOLUpdateHelper
Tool to perform COOL updates during the run.
Definition: TrigCOOLUpdateHelper.h:60
HltEventLoopMgr::execAtStart
StatusCode execAtStart(const EventContext &ctx) const
Execute optional algs/sequences.
Definition: HltEventLoopMgr.cxx:393
HltEventLoopMgr::eventTimerCallback
void eventTimerCallback()
The method executed by the event timeout monitoring thread.
Definition: HltEventLoopMgr.cxx:1004
HLTResultMTMaker.h
RoIBResult.h
HltEventLoopMgr::resetEventTimer
void resetEventTimer(const EventContext &eventContext, bool processing)
Reset the timeout flag and the timer, and mark the slot as busy or idle according to the second argum...
Definition: HltEventLoopMgr.cxx:1031
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
HltEventLoopMgr::m_setMagFieldFromPtree
Gaudi::Property< bool > m_setMagFieldFromPtree
Definition: HltEventLoopMgr.h:289
HltEventLoopMgr::EventLoopStatus::coolUpdateOngoing
bool coolUpdateOngoing
COOL update ongoing.
Definition: HltEventLoopMgr.h:149
HltEventLoopMgr::m_softTimeoutFraction
Gaudi::Property< float > m_softTimeoutFraction
Definition: HltEventLoopMgr.h:242
HltEventLoopMgr::m_outputThread
std::unique_ptr< HLT::LoopThread > m_outputThread
Output handling thread (triggers post-processing of finished events)
Definition: HltEventLoopMgr.h:341
HltEventLoopMgr::m_timeoutThread
std::unique_ptr< HLT::LoopThread > m_timeoutThread
Timeout thread.
Definition: HltEventLoopMgr.h:343
HltEventLoopMgr::HltEventLoopMgr
HltEventLoopMgr(HltEventLoopMgr &&)=delete
HltEventLoopMgr::m_applicationName
std::string m_applicationName
Application name.
Definition: HltEventLoopMgr.h:359
test_pyathena.pt
pt
Definition: test_pyathena.py:11
HltEventLoopMgr::m_parallelIOTaskGroup
tbb::task_group m_parallelIOTaskGroup
Task group to execute parallel I/O tasks asynchronously.
Definition: HltEventLoopMgr.h:347
HltEventLoopMgr
AthenaMT event loop manager for running HLT online.
Definition: HltEventLoopMgr.h:73
HltEventLoopMgr::m_schedulerSvc
SmartIF< IScheduler > m_schedulerSvc
Definition: HltEventLoopMgr.h:228
HltEventLoopMgr::inputThreadCallback
void inputThreadCallback()
Definition: HltEventLoopMgr.cxx:1057
HltEventLoopMgr::EventLoopStatus::coolUpdateCond
std::condition_variable coolUpdateCond
Condition variable to synchronize COOL updates.
Definition: HltEventLoopMgr.h:145
HltEventLoopMgr::nextEvent
virtual StatusCode nextEvent(int maxevt=-1) override
Implementation of IEventProcessor::nextEvent which implements the event loop.
Definition: HltEventLoopMgr.cxx:524
HltEventLoopMgr::m_eventTimerStartPoint
std::vector< std::chrono::steady_clock::time_point > m_eventTimerStartPoint
Vector of event start-processing time stamps in each slot.
Definition: HltEventLoopMgr.h:331
HltEventLoopMgr::EventLoopStatus
Flags and counters steering the main event loop execution.
Definition: HltEventLoopMgr.h:133
HltEventLoopMgr::HltEventLoopMgr
HltEventLoopMgr(const std::string &name, ISvcLocator *svcLoc)
Standard constructor.
Definition: HltEventLoopMgr.cxx:68
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
SG::ReadHandleKey< xAOD::EventInfo >
HltEventLoopMgr::createEventContext
virtual EventContext createEventContext() override
create an Event Context object
Definition: HltEventLoopMgr.cxx:578
HltEventLoopMgr::m_monitorScheduler
Gaudi::Property< bool > m_monitorScheduler
Definition: HltEventLoopMgr.h:305
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
HltEventLoopMgr::m_errorMonTool
ToolHandle< ITrigErrorMonTool > m_errorMonTool
Definition: HltEventLoopMgr.h:223
ITrigEventLoopMgr.h
HltEventLoopMgr::m_sorPath
Gaudi::Property< std::string > m_sorPath
Definition: HltEventLoopMgr.h:283
EventContextClid.h
Assign a CLID to EventContext.
HltEventLoopMgr::m_execAtStart
Gaudi::Property< std::vector< std::string > > m_execAtStart
Definition: HltEventLoopMgr.h:286
HltEventLoopMgr::m_maxParallelIOTasks
Gaudi::Property< int > m_maxParallelIOTasks
Definition: HltEventLoopMgr.h:252
HltEventLoopMgr::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: HltEventLoopMgr.h:222
HltEventLoopMgr::hltUpdateAfterFork
virtual StatusCode hltUpdateAfterFork(const boost::property_tree::ptree &pt) override
Definition: HltEventLoopMgr.cxx:413
HltEventLoopMgr::initialize
virtual StatusCode initialize() override
Definition: HltEventLoopMgr.cxx:83
HltEventLoopMgr::m_detectorStore
ServiceHandle< StoreGateSvc > m_detectorStore
Definition: HltEventLoopMgr.h:214
HltEventLoopMgr::m_forceLumiblock
Gaudi::Property< unsigned int > m_forceLumiblock
Definition: HltEventLoopMgr.h:295
HltEventLoopMgr::EventLoopStatus::eventsAvailable
std::atomic< bool > eventsAvailable
Event source has more events.
Definition: HltEventLoopMgr.h:135
HltEventLoopMgr::m_schedulerMonSvc
ServiceHandle< ISchedulerMonSvc > m_schedulerMonSvc
Definition: HltEventLoopMgr.h:219
HltEventLoopMgr::m_maxFrameworkErrors
Gaudi::Property< int > m_maxFrameworkErrors
Definition: HltEventLoopMgr.h:263
coral
Definition: ISecondaryEventSelector.h:19
HltEventLoopMgr::m_softTimeoutValue
std::chrono::milliseconds m_softTimeoutValue
Soft timeout value set to HardTimeout*SoftTimeoutFraction at initialisation.
Definition: HltEventLoopMgr.h:345
HltEventLoopMgr::m_fwkErrorDebugStreamName
Gaudi::Property< std::string > m_fwkErrorDebugStreamName
Definition: HltEventLoopMgr.h:267
HltEventLoopMgr::finalize
virtual StatusCode finalize() override
Definition: HltEventLoopMgr.cxx:242
HltEventLoopMgr::m_ioCompMgr
ServiceHandle< IIoComponentMgr > m_ioCompMgr
Definition: HltEventLoopMgr.h:216
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:128
SG::WriteHandleKey< EventContext >
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
Athena::TimeoutMaster
Class to modify timeout flag.
Definition: Timeout.h:77
HltEventLoopMgr::m_forceRunNumber
Gaudi::Property< unsigned int > m_forceRunNumber
Definition: HltEventLoopMgr.h:292
HltEventLoopMgr::ATLAS_NOT_THREAD_SAFE
virtual StatusCode prepareForRun ATLAS_NOT_THREAD_SAFE(const boost::property_tree::ptree &pt) override
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
HltEventLoopMgr::operator=
HltEventLoopMgr & operator=(const HltEventLoopMgr &)=delete
HltEventLoopMgr::m_parallelIOQueue
tbb::concurrent_bounded_queue< bool > m_parallelIOQueue
Queue limiting the number of parallel I/O tasks.
Definition: HltEventLoopMgr.h:349
HltEventLoopMgr::m_rewriteLVL1
Gaudi::Property< bool > m_rewriteLVL1
Definition: HltEventLoopMgr.h:301
HltEventLoopMgr::m_roibResultRHKey
SG::ReadHandleKey< ROIB::RoIBResult > m_roibResultRHKey
Definition: HltEventLoopMgr.h:317
ITrigErrorMonTool.h
HltEventLoopMgr::m_evtStore
ServiceHandle< StoreGateSvc > m_evtStore
Definition: HltEventLoopMgr.h:213
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
HltEventLoopMgr::m_maxIOWakeUpIntervalMs
Gaudi::Property< int > m_maxIOWakeUpIntervalMs
Definition: HltEventLoopMgr.h:257
TrigCompositeContainer.h
HltEventLoopMgr::executeEvent
virtual StatusCode executeEvent(EventContext &&ctx) override
Implementation of IEventProcessor::executeEvent which processes a single event.
Definition: HltEventLoopMgr.cxx:591
HltEventLoopMgr::m_timeoutDebugStreamName
Gaudi::Property< std::string > m_timeoutDebugStreamName
Definition: HltEventLoopMgr.h:275
HltEventLoopMgr::m_freeSlots
std::atomic< size_t > m_freeSlots
Number of free slots used to synchronise input/output tasks.
Definition: HltEventLoopMgr.h:337
HltEventLoopMgr::m_forceSOR_ns
Gaudi::Property< unsigned long long > m_forceSOR_ns
Definition: HltEventLoopMgr.h:298
HltEventLoopMgr::EventLoopStatus::coolUpdateMutex
std::mutex coolUpdateMutex
Mutex to synchronize COOL updates.
Definition: HltEventLoopMgr.h:147
HltEventLoopMgr::m_hltResultMaker
ToolHandle< HLTResultMTMaker > m_hltResultMaker
Definition: HltEventLoopMgr.h:221
HltEventLoopMgr::m_nFrameworkErrors
std::atomic< int > m_nFrameworkErrors
Counter of framework errors.
Definition: HltEventLoopMgr.h:357
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
HltEventLoopMgr::m_evtSelector
ServiceHandle< IEvtSelector > m_evtSelector
Definition: HltEventLoopMgr.h:217
HltEventLoopMgr::EventLoopStatus::loopEndedCond
std::condition_variable loopEndedCond
Condition variable to notify the main thread of the end of the event loop.
Definition: HltEventLoopMgr.h:139
HltEventLoopMgr::m_currentRunCtx
EventContext m_currentRunCtx
"Event" context of current run with dummy event/slot number
Definition: HltEventLoopMgr.h:325
HltEventLoopMgr::clearTemporaryStores
StatusCode clearTemporaryStores()
Clear per-event stores.
Definition: HltEventLoopMgr.cxx:702
ptree
boost::property_tree::ptree ptree
Definition: JsonFileLoader.cxx:16
OnlineErrorCode.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
HltEventLoopMgr::HltEventLoopMgr
HltEventLoopMgr(const HltEventLoopMgr &)=delete
HltEventLoopMgr::outputThreadCallback
void outputThreadCallback()
The method executed by the output handling thread.
Definition: HltEventLoopMgr.cxx:1123
HltEventLoopMgr::m_workerPID
int m_workerPID
Worker PID.
Definition: HltEventLoopMgr.h:363
HltEventLoopMgr::processFinishedEvent
StatusCode processFinishedEvent()
Perform all end-of-event actions for a single event popped out from the scheduler.
Definition: HltEventLoopMgr.cxx:1450
HltEventLoopMgr::updateMetadataStore
void updateMetadataStore(const coral::AttributeList &sor_attrlist) const
Definition: HltEventLoopMgr.cxx:639
EventInfo.h
TrigSORFromPtreeHelper.h
HltEventLoopMgr::updateDFProps
void updateDFProps()
Read DataFlow configuration properties.
Definition: HltEventLoopMgr.cxx:618
HltEventLoopMgr::operator=
HltEventLoopMgr & operator=(HltEventLoopMgr &&)=delete
Timeout.h
Timeout singleton.
HltEventLoopMgr::startNextEvent
StatusCode startNextEvent()
Definition: HltEventLoopMgr.cxx:1230
HltEventLoopMgr::EventLoopStatus::loopEnded
std::atomic< bool > loopEnded
No more events available and all ongoing processing has finished.
Definition: HltEventLoopMgr.h:137
HltEventLoopMgr::m_whiteboardName
Gaudi::Property< std::string > m_whiteboardName
Definition: HltEventLoopMgr.h:236
HLT::OnlineErrorCode
OnlineErrorCode
Definition: OnlineErrorCode.h:15
EventLoopUtils.h
HltEventLoopMgr::m_algErrorDebugStreamName
Gaudi::Property< std::string > m_algErrorDebugStreamName
Definition: HltEventLoopMgr.h:271
HltEventLoopMgr::m_outputCnvSvc
ServiceHandle< IConversionSvc > m_outputCnvSvc
Definition: HltEventLoopMgr.h:218
HltEventLoopMgr::m_workerID
int m_workerID
Worker ID.
Definition: HltEventLoopMgr.h:361
HltEventLoopMgr::m_aess
SmartIF< IAlgExecStateSvc > m_aess
Definition: HltEventLoopMgr.h:227
HltEventLoopMgr::stopRun
virtual StatusCode stopRun() override
Implementation of IEventProcessor::stopRun (obsolete for online runnning)
Definition: HltEventLoopMgr.cxx:570
HltEventLoopMgr::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
Definition: HltEventLoopMgr.h:226
HltEventLoopMgr::printSORAttrList
void printSORAttrList(const coral::AttributeList &atr) const
Print the SOR record.
Definition: HltEventLoopMgr.cxx:741
HltEventLoopMgr::m_truncationDebugStreamName
Gaudi::Property< std::string > m_truncationDebugStreamName
Definition: HltEventLoopMgr.h:279
HltEventLoopMgr::m_freeSlotStartPoint
std::vector< std::chrono::steady_clock::time_point > m_freeSlotStartPoint
Vector of time stamps telling when each scheduler slot was freed.
Definition: HltEventLoopMgr.h:333
HltEventLoopMgr::m_inputThread
std::unique_ptr< HLT::LoopThread > m_inputThread
Input handling thread (triggers reading new events)
Definition: HltEventLoopMgr.h:339
HltEventLoopMgr::m_localEventNumber
std::atomic< size_t > m_localEventNumber
Event counter used for local bookkeeping; incremental per instance of HltEventLoopMgr,...
Definition: HltEventLoopMgr.h:327
HltEventLoopMgr::m_timeoutThreadIntervalMs
Gaudi::Property< unsigned int > m_timeoutThreadIntervalMs
Definition: HltEventLoopMgr.h:245
AthService.h
HltEventLoopMgr::m_hltResultRHKey
SG::ReadHandleKey< HLT::HLTResultMT > m_hltResultRHKey
StoreGate key for reading the HLT result.
Definition: HltEventLoopMgr.h:320
HltEventLoopMgr::m_incidentSvc
ServiceHandle< IIncidentSvc > m_incidentSvc
Definition: HltEventLoopMgr.h:211
HltEventLoopMgr::EventLoopStatus::maxLB
std::atomic< EventIDBase::number_type > maxLB
Max lumiblock number seen in the loop.
Definition: HltEventLoopMgr.h:143
HltEventLoopMgr::m_evtSelContext
IEvtSelector::Context * m_evtSelContext
Event selector context.
Definition: HltEventLoopMgr.h:329
HltEventLoopMgr::m_finishedEventsQueue
tbb::concurrent_bounded_queue< EventContext * > m_finishedEventsQueue
Queue of events ready for output processing.
Definition: HltEventLoopMgr.h:351
HltEventLoopMgr::prepareForStart
virtual StatusCode prepareForStart(const boost::property_tree::ptree &) override
Definition: HltEventLoopMgr.cxx:280
checker_macros.h
Define macros for attributes used to control the static checker.
HltEventLoopMgr::m_timeoutTraceGenerated
bool m_timeoutTraceGenerated
Flag set when a soft timeout produces a stack trace, to avoid producing multiple traces.
Definition: HltEventLoopMgr.h:355
HltEventLoopMgr::m_loopStatus
EventLoopStatus m_loopStatus
Object keeping track of the event loop status.
Definition: HltEventLoopMgr.h:353
HltEventLoopMgr::EventLoopStatus::loopEndedMutex
std::mutex loopEndedMutex
Mutex to notify the main thread of the end of the event loop.
Definition: HltEventLoopMgr.h:141
HltEventLoopMgr::~HltEventLoopMgr
virtual ~HltEventLoopMgr() noexcept override
Standard destructor.
Definition: HltEventLoopMgr.cxx:74
HltEventLoopMgr::m_eventContextWHKey
SG::WriteHandleKey< EventContext > m_eventContextWHKey
Definition: HltEventLoopMgr.h:308
HltEventLoopMgr::executeRun
virtual StatusCode executeRun(int maxevt=-1) override
Implementation of IEventProcessor::executeRun which calls IEventProcessor::nextEvent.
Definition: HltEventLoopMgr.cxx:494
HltEventLoopMgr::m_coolHelper
ToolHandle< TrigCOOLUpdateHelper > m_coolHelper
Definition: HltEventLoopMgr.h:220
HltEventLoopMgr::getSorAttrList
const coral::AttributeList & getSorAttrList() const
Extract the single attr list off the SOR CondAttrListCollection.
Definition: HltEventLoopMgr.cxx:720
ServiceHandle< IIncidentSvc >
HltEventLoopMgr::m_isSlotProcessing
std::vector< bool > m_isSlotProcessing
Vector of flags to tell if a slot is idle or processing.
Definition: HltEventLoopMgr.h:335