Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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;
15 class IDataProviderSvc;
16 
21 class HLTEventLoopMgr : public extends<Service, IEventProcessor> {
22 
23 public:
25  using extends::extends;
26 
28  StatusCode initialize() override;
32  StatusCode finalize() override;
33 
35  StatusCode nextEvent( int maxevt ) override;
37  StatusCode executeEvent( void* par ) override;
39  StatusCode executeRun( int maxevt ) override { return nextEvent( maxevt ); }
41  StatusCode stopRun() override;
42 
43 private:
47  StatusCode eventFailed( EventContext* eventContext ) const;
50  friend HLTExecutionTask; // must be able to call `promoteToExecuted`...
51  void promoteToExecuted( std::unique_ptr<EventContext> eventContext ) const;
52 
53 private:
54  Gaudi::Property<std::string> m_histPersName{this, "HistogramPersistency", "", ""};
55  Gaudi::Property<std::string> m_evtsel{this, "EvtSel", "", ""};
56  Gaudi::Property<int> m_threadPoolSize{this, "ThreadPoolSize", -1, "Size of the threadpool initialised by TBB"};
57  Gaudi::Property<std::string> m_whiteboardSvcName{this, "WhiteboardSvc", "EventDataSvc", "The whiteboard name"};
59  this, "DotFile", {}, "Name of file to dump dependency graph; if empty, do not dump"};
61 
74 
81 
84 
87 };
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:352
The Event Selector Interface.
Definition: IEvtSelector.h:18
StatusCode finalize() override
implementation of IService::finalize
Basic event loop and scheduler for fast HLT reconstruction.
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:31
Gaudi::Property< std::vector< std::string > > m_topAlgs
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:50
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.
std::vector< Gaudi::Algorithm * > m_algos
Vector of algorithms to run for every event.
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
constexpr static const auto FAILURE
Definition: StatusCode.h:86
StatusCode executeEvent(void *par) override
implementation of IEventProcessor::executeEvent(void* par)
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:260
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