The Gaudi Framework  v30r3 (a5ef0a68)
HLTEventLoopMgr.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 #include <unordered_map>
6 #include <vector>
7 
8 #include "tbb/task.h"
9 
10 // Forward declarations
11 class IAlgExecStateSvc;
12 class IEvtSelector;
13 class IHiveWhiteBoard;
14 struct IDataManagerSvc;
16 
24 class HLTEventLoopMgr : public extends<Service, IEventProcessor>
25 {
26 
27 public:
29  using extends::extends;
30 
32  StatusCode initialize() override;
36  StatusCode finalize() override;
37 
39  StatusCode nextEvent( int maxevt ) override;
41  StatusCode executeEvent( void* par ) override;
43  StatusCode executeRun( int maxevt ) override { return nextEvent( maxevt ); }
45  StatusCode stopRun() override;
46 
47 private:
51  StatusCode eventFailed( EventContext* eventContext ) const;
54  friend HLTExecutionTask; // must be able to call `promoteToExecuted`...
55  void promoteToExecuted( std::unique_ptr<EventContext> eventContext ) const;
56 
57 private:
58  Gaudi::Property<std::string> m_histPersName{this, "HistogramPersistency", "", ""};
59  Gaudi::Property<std::string> m_evtsel{this, "EvtSel", "", ""};
60  Gaudi::Property<int> m_threadPoolSize{this, "ThreadPoolSize", -1, "Size of the threadpool initialised by TBB"};
61  Gaudi::Property<std::string> m_whiteboardSvcName{this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name"};
63  this, "DotFile", {}, "Name of file to dump dependency graph; if empty, do not dump"};
64 
77 
84 
87 
90 };
constexpr static const auto FAILURE
Definition: StatusCode.h:88
IConversionSvc * m_histoPersSvc
Reference to the Histogram Persistency Service.
std::mutex m_createEventMutex
mutex assoiciated with m_createEventCond condition variable
Implementation of property with value of concrete type.
Definition: Property.h:381
The Event Selector Interface.
Definition: IEvtSelector.h:18
StatusCode finalize() override
implementation of IService::finalize
std::condition_variable m_createEventCond
condition variable to wake up main thread when we need to create a new event
Data provider interface definition.
IDataManagerSvc * m_evtDataMgrSvc
Reference to the Event Data Service&#39;s IDataManagerSvc interface.
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
Abstract interface for a service that manages the Algorithm execution states.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
Gaudi::Property< std::string > m_whiteboardSvcName
IEvtSelector::Context * m_evtSelContext
event selector context
StatusCode reinitialize() override
implementation of IService::reinitialize
IHiveWhiteBoard * m_whiteboard
Reference to the Whiteboard.
IDataManagerSvc * m_histoDataMgrSvc
Reference to the Histogram Data Service.
void promoteToExecuted(std::unique_ptr< EventContext > eventContext) const
Gaudi::Property< int > m_threadPoolSize
StatusCode nextEvent(int maxevt) override
implementation of IEventProcessor::nextEvent
Gaudi::Property< std::string > m_histPersName
Gaudi::Property< std::string > m_evtsel
StatusCode initialize() override
implementation of IService::initialize
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
IEvtSelector * m_evtSelector
Reference to the Event Selector.
std::atomic< unsigned int > m_finishedEvt
atomic count of the number of finished events
StatusCode executeEvent(void *par) override
implementation of IEventProcessor::executeEvent(void* par)
std::vector< Algorithm * > m_algos
Vector of algorithms to run for every event.
StatusCode executeRun(int maxevt) override
implementation of IEventProcessor::executeRun()
StatusCode stopRun() override
implementation of IEventProcessor::stopRun()
StatusCode declareEventRootAddress()
Declare the root address of the event.
int maxevt
Definition: Bootstrap.cpp:276
IAlgExecStateSvc * m_algExecStateSvc
Reference to the AlgExecStateSvc.
StatusCode eventFailed(EventContext *eventContext) const
Method to check if an event failed and take appropriate actions.
Gaudi::Property< std::string > m_dotfile