| The Gaudi Framework v27r1

- 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/IAlgResourcePool.h"
6 #include "GaudiKernel/IEvtSelector.h"
7 #include "GaudiKernel/IHiveWhiteBoard.h"
8 #include "GaudiKernel/MinimalEventLoopMgr.h"
9 #include "GaudiKernel/IScheduler.h"
10 #include "GaudiKernel/IIncidentSvc.h"
11 #include <GaudiKernel/IIncidentListener.h>
12
13 // Standard includes
14 #include <functional>
15
16 // External Libraries
17 #include "tbb/concurrent_queue.h"
18 #include <boost/dynamic_bitset.hpp>
19
20 // Forward declarations
21 class IIncidentSvc;
22 class IDataManagerSvc;
23 class IDataProviderSvc;
24
25 class HiveSlimEventLoopMgr: public extends<Service,
26 IEventProcessor> {
27
28 protected:
30 SmartIF<IDataManagerSvc> m_evtDataMgrSvc;
32 SmartIF<IEvtSelector> m_evtSelector;
34 IEvtSelector::Context* m_evtContext;
36 std::string m_evtsel;
38 SmartIF<IDataManagerSvc> m_histoDataMgrSvc;
40 SmartIF<IConversionSvc> m_histoPersSvc;
42 SmartIF<IHiveWhiteBoard> m_whiteboard;
44 SmartIF<IAlgResourcePool> m_algResourcePool;
46 std::string m_histPersName;
48 SmartIF<IProperty> m_appMgrProperty;
51 bool m_endEventFired;
53 bool m_warnings;
55 SmartIF<IScheduler> m_schedulerSvc;
57 StatusCode clearWBSlot(int evtSlot);
59 StatusCode declareEventRootAddress();
61 StatusCode createEventContext(EventContext*& eventContext, int createdEvents);
63 StatusCode drainScheduler(int& finishedEvents);
65 SmartIF< IIncidentListener > m_abortEventListener;
67 std::string m_schedulerName;
69 bool m_scheduledStop;
71 SmartIF<IAppMgrUI> m_appMgrUI;
73 SmartIF<IIncidentSvc> m_incidentSvc;
74
76 std::vector<unsigned int> m_eventNumberBlacklist;
77
78 //if finite number of evts is processed use bitset
79 boost::dynamic_bitset<> * m_blackListBS;
80
81 public:
83 HiveSlimEventLoopMgr(const std::string& nam, ISvcLocator* svcLoc);
85 virtual ~HiveSlimEventLoopMgr();
87 StatusCode getEventRoot(IOpaqueAddress*& refpAddr);
89 virtual StatusCode initialize();
91 virtual StatusCode reinitialize();
93 virtual StatusCode stop();
95 virtual StatusCode finalize();
97 virtual StatusCode nextEvent(int maxevt);
99 virtual StatusCode executeEvent(void* par);
101 virtual StatusCode executeRun(int maxevt);
103 virtual StatusCode stopRun();
104 };
105 #endif // GAUDIHIVE_HIVESLIMEVENTLOOPMGR_H
HiveSlimEventLoopMgr::finalize
virtual StatusCode finalize()
implementation of IService::finalize
Definition: HiveSlimEventLoopMgr.cpp:260
HiveSlimEventLoopMgr::clearWBSlot
StatusCode clearWBSlot(int evtSlot)
Clear a slot in the WB.
Definition: HiveSlimEventLoopMgr.cpp:673
HiveSlimEventLoopMgr::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: HiveSlimEventLoopMgr.h:73
SmartIF< IDataManagerSvc >
HiveSlimEventLoopMgr::m_evtDataMgrSvc
SmartIF< IDataManagerSvc > m_evtDataMgrSvc
Reference to the Event Data Service's IDataManagerSvc interface.
Definition: HiveSlimEventLoopMgr.h:30
HiveSlimEventLoopMgr::executeEvent
virtual StatusCode executeEvent(void *par)
implementation of IEventProcessor::executeEvent(void* par)
Definition: HiveSlimEventLoopMgr.cpp:334
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:566
HiveSlimEventLoopMgr::stopRun
virtual StatusCode stopRun()
implementation of IEventProcessor::stopRun()
Definition: HiveSlimEventLoopMgr.cpp:436
HiveSlimEventLoopMgr::m_appMgrUI
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.
Definition: HiveSlimEventLoopMgr.h:71
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:609
HiveSlimEventLoopMgr::m_whiteboard
SmartIF< IHiveWhiteBoard > m_whiteboard
Reference to the Whiteboard.
Definition: HiveSlimEventLoopMgr.h:42
HiveSlimEventLoopMgr::m_schedulerSvc
SmartIF< IScheduler > m_schedulerSvc
A shortcut for the scheduler.
Definition: HiveSlimEventLoopMgr.h:55
HiveSlimEventLoopMgr::m_scheduledStop
bool m_scheduledStop
Scheduled stop of event processing.
Definition: HiveSlimEventLoopMgr.h:69
IAlgResourcePool.h
HiveSlimEventLoopMgr
Definition: HiveSlimEventLoopMgr.h:25
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_histPersName
std::string m_histPersName
Name of the Hist Pers type.
Definition: HiveSlimEventLoopMgr.h:46
HiveSlimEventLoopMgr::m_appMgrProperty
SmartIF< IProperty > m_appMgrProperty
Property interface of ApplicationMgr.
Definition: HiveSlimEventLoopMgr.h:48
HiveSlimEventLoopMgr::m_eventNumberBlacklist
std::vector< unsigned int > m_eventNumberBlacklist
List of events to be skipped. The number is the number in the job.
Definition: HiveSlimEventLoopMgr.h:76
std::string
STL class.
HiveSlimEventLoopMgr::m_evtsel
std::string m_evtsel
Event selector.
Definition: HiveSlimEventLoopMgr.h:36
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:386
HiveSlimEventLoopMgr::executeRun
virtual StatusCode executeRun(int maxevt)
implementation of IEventProcessor::executeRun()
Definition: HiveSlimEventLoopMgr.cpp:399
IIncidentSvc.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
HiveSlimEventLoopMgr::createEventContext
StatusCode createEventContext(EventContext *&eventContext, int createdEvents)
Create event context.
Definition: HiveSlimEventLoopMgr.cpp:594
HiveSlimEventLoopMgr::~HiveSlimEventLoopMgr
virtual ~HiveSlimEventLoopMgr()
Standard Destructor.
Definition: HiveSlimEventLoopMgr.cpp:74
HiveSlimEventLoopMgr::getEventRoot
StatusCode getEventRoot(IOpaqueAddress *&refpAddr)
Create event address using event selector.
Definition: HiveSlimEventLoopMgr.cpp:544
HiveSlimEventLoopMgr::initialize
virtual StatusCode initialize()
implementation of IService::initialize
Definition: HiveSlimEventLoopMgr.cpp:86
HiveSlimEventLoopMgr::reinitialize
virtual StatusCode reinitialize()
implementation of IService::reinitialize
Definition: HiveSlimEventLoopMgr.cpp:183
HiveSlimEventLoopMgr::nextEvent
virtual StatusCode nextEvent(int maxevt)
implementation of IService::nextEvent
Definition: HiveSlimEventLoopMgr.cpp:454
HiveSlimEventLoopMgr::stop
virtual StatusCode stop()
implementation of IService::stop
Definition: HiveSlimEventLoopMgr.cpp:247
HiveSlimEventLoopMgr::m_warnings
bool m_warnings
Flag to disable warning messages when using external input.
Definition: HiveSlimEventLoopMgr.h:53
std::vector< unsigned int >
HiveSlimEventLoopMgr::m_histoPersSvc
SmartIF< IConversionSvc > m_histoPersSvc
Reference to the Histogram Persistency Service.
Definition: HiveSlimEventLoopMgr.h:40
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:38
HiveSlimEventLoopMgr::m_evtSelector
SmartIF< IEvtSelector > m_evtSelector
Reference to the Event Selector.
Definition: HiveSlimEventLoopMgr.h:32
HiveSlimEventLoopMgr::m_abortEventListener
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
Definition: HiveSlimEventLoopMgr.h:65
IEvtSelector.h
IIncidentListener.h
HiveSlimEventLoopMgr::m_schedulerName
std::string m_schedulerName
Name of the scheduler to be used.
Definition: HiveSlimEventLoopMgr.h:67
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
HiveSlimEventLoopMgr::m_algResourcePool
SmartIF< IAlgResourcePool > m_algResourcePool
Reference to the Algorithm resource pool.
Definition: HiveSlimEventLoopMgr.h:44
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:51
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:21
HiveSlimEventLoopMgr::m_blackListBS
boost::dynamic_bitset * m_blackListBS
Definition: HiveSlimEventLoopMgr.h:79
HiveSlimEventLoopMgr::m_evtContext
IEvtSelector::Context * m_evtContext
Event Iterator.
Definition: HiveSlimEventLoopMgr.h:34