| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
5 #include "GaudiKernel/IAlgExecStateSvc.h"
6 #include "GaudiKernel/IAlgResourcePool.h"
7 #include "GaudiKernel/IEvtSelector.h"
8 #include "GaudiKernel/IHiveWhiteBoard.h"
9 #include "GaudiKernel/IIncidentListener.h"
10 #include "GaudiKernel/IIncidentSvc.h"
11 #include "GaudiKernel/IScheduler.h"
12 #include "GaudiKernel/MinimalEventLoopMgr.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
38 SmartIF<IDataManagerSvc> m_evtDataMgrSvc;
40 SmartIF<IEvtSelector> m_evtSelector;
42 IEvtSelector::Context* m_evtContext = nullptr;
44 SmartIF<IDataManagerSvc> m_histoDataMgrSvc;
46 SmartIF<IConversionSvc> m_histoPersSvc;
48 SmartIF<IHiveWhiteBoard> m_whiteboard;
50 SmartIF<IAlgResourcePool> m_algResourcePool;
52 SmartIF<IAlgExecStateSvc> m_algExecStateSvc;
54 SmartIF<IProperty> m_appMgrProperty;
57 bool m_endEventFired = false;
59 SmartIF<IScheduler> m_schedulerSvc;
61 StatusCode clearWBSlot( int evtSlot );
63 StatusCode declareEventRootAddress();
65 StatusCode createEventContext( EventContext*& eventContext, int createdEvents );
67 StatusCode drainScheduler( int& finishedEvents );
69 SmartIF<IIncidentListener> m_abortEventListener;
71 bool m_scheduledStop = false;
73 SmartIF<IAppMgrUI> m_appMgrUI;
75 SmartIF<IIncidentSvc> m_incidentSvc;
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;
86 StatusCode getEventRoot( IOpaqueAddress*& refpAddr );
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
HiveSlimEventLoopMgr::clearWBSlot
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
Definition: HiveSlimEventLoopMgr.cpp:666
HiveSlimEventLoopMgr::m_evtsel
Gaudi::Property< std::string > m_evtsel
Definition: HiveSlimEventLoopMgr.h:31
HiveSlimEventLoopMgr::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: HiveSlimEventLoopMgr.h:75
SmartIF< IDataManagerSvc >
HiveSlimEventLoopMgr::m_evtDataMgrSvc
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service&#39;s IDataManagerSvc interface.
Definition: HiveSlimEventLoopMgr.h:38
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
HiveSlimEventLoopMgr::declareEventRootAddress
StatusCode declareEventRootAddress()
Declare the root address of the event.
Definition: HiveSlimEventLoopMgr.cpp:553
IAlgExecStateSvc.h
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
HiveSlimEventLoopMgr::m_appMgrUI
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.
Definition: HiveSlimEventLoopMgr.h:73
HiveSlimEventLoopMgr::HiveSlimEventLoopMgr
HiveSlimEventLoopMgr(const std::string &nam, ISvcLocator *svcLoc)
Standard Constructor.
Definition: HiveSlimEventLoopMgr.cpp:47
HiveSlimEventLoopMgr::drainScheduler
StatusCode drainScheduler(int &finishedEvents)
Drain the scheduler from all actions that may be queued.
Definition: HiveSlimEventLoopMgr.cpp:598
HiveSlimEventLoopMgr::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard.
Definition: HiveSlimEventLoopMgr.h:48
HiveSlimEventLoopMgr::m_schedulerSvc
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
Definition: HiveSlimEventLoopMgr.h:59
HiveSlimEventLoopMgr::m_scheduledStop
bool m_scheduledStop
Scheduled stop of event processing.
Definition: HiveSlimEventLoopMgr.h:71
IAlgResourcePool.h
HiveSlimEventLoopMgr
Definition: HiveSlimEventLoopMgr.h:26
HiveSlimEventLoopMgr::m_eventNumberBlacklist
Gaudi::Property< std::vector< unsigned int > > m_eventNumberBlacklist
Definition: HiveSlimEventLoopMgr.h:35
IEvtSelector::Context
Definition: IEvtSelector.h:23
IScheduler.h
IDataProviderSvc
Data provider interface definition.
Definition: IDataProviderSvc.h:45
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
HiveSlimEventLoopMgr::m_appMgrProperty
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
Definition: HiveSlimEventLoopMgr.h:54
std::string
STL class.
HiveSlimEventLoopMgr::m_warnings
Gaudi::Property< bool > m_warnings
Definition: HiveSlimEventLoopMgr.h:32
HiveSlimEventLoopMgr::finalize
StatusCode finalize() override
implementation of IService::finalize
Definition: HiveSlimEventLoopMgr.cpp:247
HiveSlimEventLoopMgr::stopRun
StatusCode stopRun() override
implementation of IEventProcessor::stopRun()
Definition: HiveSlimEventLoopMgr.cpp:423
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:386
HiveSlimEventLoopMgr::~HiveSlimEventLoopMgr
~HiveSlimEventLoopMgr() override
Standard Destructor.
Definition: HiveSlimEventLoopMgr.cpp:55
IIncidentSvc.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
HiveSlimEventLoopMgr::executeRun
StatusCode executeRun(int maxevt) override
implementation of IEventProcessor::executeRun()
Definition: HiveSlimEventLoopMgr.cpp:386
HiveSlimEventLoopMgr::createEventContext
StatusCode createEventContext(EventContext *&eventContext, int createdEvents)
Create event context.
Definition: HiveSlimEventLoopMgr.cpp:581
HiveSlimEventLoopMgr::getEventRoot
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
Definition: HiveSlimEventLoopMgr.cpp:531
HiveSlimEventLoopMgr::initialize
StatusCode initialize() override
implementation of IService::initialize
Definition: HiveSlimEventLoopMgr.cpp:67
HiveSlimEventLoopMgr::m_algExecStateSvc
SmartIF< IAlgExecStateSvc > m_algExecStateSvc
Reference to the AlgExecStateSvc.
Definition: HiveSlimEventLoopMgr.h:52
HiveSlimEventLoopMgr::m_histoPersSvc
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
Definition: HiveSlimEventLoopMgr.h:46
HiveSlimEventLoopMgr::m_schedulerName
Gaudi::Property< std::string > m_schedulerName
Definition: HiveSlimEventLoopMgr.h:33
MinimalEventLoopMgr.h
IHiveWhiteBoard.h
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
IDataManagerSvc
Definition: IDataManagerSvc.h:45
HiveSlimEventLoopMgr::m_histoDataMgrSvc
SmartIF< IDataManagerSvc > m_histoDataMgrSvc
Reference to the Histogram Data Service.
Definition: HiveSlimEventLoopMgr.h:44
HiveSlimEventLoopMgr::m_evtSelector
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
Definition: HiveSlimEventLoopMgr.h:40
HiveSlimEventLoopMgr::reinitialize
StatusCode reinitialize() override
implementation of IService::reinitialize
Definition: HiveSlimEventLoopMgr.cpp:170
IEvtSelector.h
IIncidentListener.h
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
maxevt
int maxevt
Definition: Bootstrap.cpp:279
HiveSlimEventLoopMgr::m_histPersName
Gaudi::Property< std::string > m_histPersName
Definition: HiveSlimEventLoopMgr.h:30
HiveSlimEventLoopMgr::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
Definition: HiveSlimEventLoopMgr.h:50
HiveSlimEventLoopMgr::executeEvent
StatusCode executeEvent(void *par) override
implementation of IEventProcessor::executeEvent(void* par)
Definition: HiveSlimEventLoopMgr.cpp:321
HiveSlimEventLoopMgr::nextEvent
StatusCode nextEvent(int maxevt) override
implementation of IService::nextEvent
Definition: HiveSlimEventLoopMgr.cpp:441
HiveSlimEventLoopMgr::m_endEventFired
bool m_endEventFired
Flag to avoid to fire the EnvEvent incident twice in a row (and also not before the first event) ...
Definition: HiveSlimEventLoopMgr.h:57
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23
HiveSlimEventLoopMgr::m_abortEventListener
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
Definition: HiveSlimEventLoopMgr.h:69
HiveSlimEventLoopMgr::m_blackListBS
boost::dynamic_bitset * m_blackListBS
Definition: HiveSlimEventLoopMgr.h:78
HiveSlimEventLoopMgr::stop
StatusCode stop() override
implementation of IService::stop
Definition: HiveSlimEventLoopMgr.cpp:234
HiveSlimEventLoopMgr::m_evtContext
IEvtSelector::Context * m_evtContext
Event Iterator.
Definition: HiveSlimEventLoopMgr.h:42