The Gaudi Framework  v29r0 (ff2e7097)
HiveSlimEventLoopMgr.h
Go to the documentation of this file.
1 #ifndef GAUDIHIVE_HIVESLIMEVENTLOOPMGR_H
2 #define GAUDIHIVE_HIVESLIMEVENTLOOPMGR_H 1
3 
4 // Framework include files
11 #include "GaudiKernel/IScheduler.h"
13 
14 // Standard includes
15 #include <functional>
16 
17 // External Libraries
18 #include "tbb/concurrent_queue.h"
19 #include <boost/dynamic_bitset.hpp>
20 
21 // Forward declarations
22 class IIncidentSvc;
23 class IDataManagerSvc;
24 class IDataProviderSvc;
25 
26 class HiveSlimEventLoopMgr : public extends<Service, IEventProcessor>
27 {
28 
29 protected:
30  Gaudi::Property<std::string> m_histPersName{this, "HistogramPersistency", "", ""};
31  Gaudi::Property<std::string> m_evtsel{this, "EvtSel", "", ""};
32  Gaudi::Property<bool> m_warnings{this, "Warnings", true, "Set this property to false to suppress warning messages"};
33  Gaudi::Property<std::string> m_schedulerName{this, "SchedulerName", "ForwardSchedulerSvc",
34  "Name of the scheduler to be used"};
35  Gaudi::Property<std::vector<unsigned int>> m_eventNumberBlacklist{this, "EventNumberBlackList", {}, ""};
36 
57  bool m_endEventFired = false;
61  StatusCode clearWBSlot( int evtSlot );
65  StatusCode createEventContext( EventContext*& eventContext, int createdEvents );
67  StatusCode drainScheduler( int& finishedEvents );
71  bool m_scheduledStop = false;
76 
77  // if finite number of evts is processed use bitset
78  boost::dynamic_bitset<>* m_blackListBS = nullptr;
79 
80 public:
82  HiveSlimEventLoopMgr( const std::string& nam, ISvcLocator* svcLoc );
84  ~HiveSlimEventLoopMgr() override;
88  StatusCode initialize() override;
90  StatusCode reinitialize() override;
92  StatusCode stop() override;
94  StatusCode finalize() override;
96  StatusCode nextEvent( int maxevt ) override;
98  StatusCode executeEvent( void* par ) override;
100  StatusCode executeRun( int maxevt ) override;
102  StatusCode stopRun() override;
103 };
104 #endif // GAUDIHIVE_HIVESLIMEVENTLOOPMGR_H
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
Gaudi::Property< std::string > m_evtsel
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service&#39;s IDataManagerSvc interface.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
StatusCode declareEventRootAddress()
Declare the root address of the event.
Implementation of property with value of concrete type.
Definition: Property.h:319
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.
HiveSlimEventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
StatusCode drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard.
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
bool m_scheduledStop
Scheduled stop of event processing.
Gaudi::Property< std::vector< unsigned int > > m_eventNumberBlacklist
Data provider interface definition.
This class represents an entry point to all the event specific data.
Definition: EventContext.h:24
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
STL class.
Gaudi::Property< bool > m_warnings
StatusCode finalize() override
implementation of IService::finalize
StatusCode stopRun() override
implementation of IEventProcessor::stopRun()
~HiveSlimEventLoopMgr() override
Standard Destructor.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
StatusCode executeRun(int maxevt) override
implementation of IEventProcessor::executeRun()
StatusCode createEventContext(EventContext *&eventContext, int createdEvents)
Create event context.
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
StatusCode initialize() override
implementation of IService::initialize
SmartIF< IAlgExecStateSvc > m_algExecStateSvc
Reference to the AlgExecStateSvc.
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
Gaudi::Property< std::string > m_schedulerName
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
SmartIF< IDataManagerSvc > m_histoDataMgrSvc
Reference to the Histogram Data Service.
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
StatusCode reinitialize() override
implementation of IService::reinitialize
Opaque address interface definition.
int maxevt
Definition: Bootstrap.cpp:279
Gaudi::Property< std::string > m_histPersName
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
StatusCode executeEvent(void *par) override
implementation of IEventProcessor::executeEvent(void* par)
StatusCode nextEvent(int maxevt) override
implementation of IService::nextEvent
bool m_endEventFired
Flag to avoid to fire the EnvEvent incident twice in a row (and also not before the first event) ...
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
boost::dynamic_bitset * m_blackListBS
StatusCode stop() override
implementation of IService::stop
IEvtSelector::Context * m_evtContext
Event Iterator.