The Gaudi Framework  v30r3 (a5ef0a68)
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
12 #include "GaudiKernel/IScheduler.h"
14 #include "GaudiKernel/SmartIF.h"
15 
16 // External Libraries
17 #include <boost/dynamic_bitset.hpp>
18 
19 class HiveSlimEventLoopMgr : public extends<Service, IEventProcessor>
20 {
21 
22 protected:
23  Gaudi::Property<std::string> m_histPersName{this, "HistogramPersistency", "", ""};
24  Gaudi::Property<std::string> m_evtsel{this, "EvtSel", "", ""};
25  Gaudi::Property<bool> m_warnings{this, "Warnings", true, "Set this property to false to suppress warning messages"};
26  Gaudi::Property<std::string> m_schedulerName{this, "SchedulerName", "AvalancheSchedulerSvc",
27  "Name of the scheduler to be used"};
28  Gaudi::Property<std::vector<unsigned int>> m_eventNumberBlacklist{this, "EventNumberBlackList", {}, ""};
29  Gaudi::Property<bool> m_abortOnFailure{this, "AbortOnFailure", true, "Abort job on event failure"};
30 
51  bool m_endEventFired = false;
55  StatusCode clearWBSlot( int evtSlot );
59  StatusCode createEventContext( EventContext*& eventContext, int createdEvents );
61  StatusCode drainScheduler( int& finishedEvents );
65  bool m_scheduledStop = false;
70 
71  // if finite number of evts is processed use bitset
72  boost::dynamic_bitset<>* m_blackListBS = nullptr;
73 
74 public:
76  HiveSlimEventLoopMgr( const std::string& nam, ISvcLocator* svcLoc );
77 
79  ~HiveSlimEventLoopMgr() override;
83  StatusCode initialize() override;
85  StatusCode reinitialize() override;
87  StatusCode stop() override;
89  StatusCode finalize() override;
91  StatusCode nextEvent( int maxevt ) override;
93  StatusCode executeEvent( void* par ) override;
95  StatusCode executeRun( int maxevt ) override;
97  StatusCode stopRun() override;
98 };
99 #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.
Gaudi::Property< bool > m_abortOnFailure
Implementation of property with value of concrete type.
Definition: Property.h:381
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
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:51
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:276
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) ...
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.