| The Gaudi Framework v29r0 (ff2e7097)

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

- File List
- File Members

MinimalEventLoopMgr.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_MINIMALEVENTLOOPMGR_H
2 #define GAUDIKERNEL_MINIMALEVENTLOOPMGR_H 1
3
4 // Framework include files
5 #include "GaudiKernel/EventContext.h"
6 #include "GaudiKernel/IAlgExecStateSvc.h"
7 #include "GaudiKernel/IAlgorithm.h"
8 #include "GaudiKernel/IAppMgrUI.h"
9 #include "GaudiKernel/IEventProcessor.h"
10 #include "GaudiKernel/IHiveWhiteBoard.h"
11 #include "GaudiKernel/IIncidentListener.h"
12 #include "GaudiKernel/IIncidentSvc.h"
13 #include "GaudiKernel/Service.h"
14
15 // STL include files
16 #include <list>
17 #include <vector>
18
28 class GAUDI_API MinimalEventLoopMgr : public extends<Service, IEventProcessor>
29 {
30 public:
31 typedef std::vector<SmartIF<IAlgorithm>> ListAlg;
32
33 protected:
34 // Properties
35 Gaudi::Property<std::vector<std::string>> m_topAlgNames{this, "TopAlg", {}, "list of top level algorithms names"};
36 Gaudi::Property<std::vector<std::string>> m_outStreamNames{this, "OutStream", {}, "list of output stream names"};
37 Gaudi::Property<std::string> m_outStreamType{this, "OutStreamType", "OutputStream",
38 "[[deprecated]] default type for OutputStream instances"};
39 Gaudi::Property<bool> m_printCFExp{this, "PrintControlFlowExpression", false,
40 "Print the control flow expression representing the content of TopAlg"};
41
42 // enums
43 enum State { OFFLINE, CONFIGURED, FINALIZED, INITIALIZED };
45 SmartIF<IAppMgrUI> m_appMgrUI;
47 SmartIF<IIncidentSvc> m_incidentSvc;
49 SmartIF<IAlgExecStateSvc> m_aess;
50 ListAlg m_topAlgList;
52 ListAlg m_outStreamList;
54 State m_state = OFFLINE;
56 bool m_scheduledStop = false;
58 SmartIF<IIncidentListener> m_abortEventListener;
61 bool m_abortEvent = false;
63 std::string m_abortEventSource;
64
65 public:
67 MinimalEventLoopMgr( const std::string& nam, ISvcLocator* svcLoc );
68
69 #if defined( GAUDI_V20_COMPAT ) && !defined( G21_NO_DEPRECATED )
70 protected:
72 template <class T>
73 T* releaseInterface( T* iface )
74 {
75 if ( 0 != iface ) iface->release();
76 return 0;
77 }
78
79 public:
80 #endif
81
83 StatusCode initialize() override;
85 StatusCode start() override;
87 StatusCode stop() override;
89 StatusCode finalize() override;
91 StatusCode reinitialize() override;
93 StatusCode restart() override;
94
96 StatusCode nextEvent( int maxevt ) override;
98 StatusCode executeEvent( void* par ) override;
100 StatusCode executeRun( int maxevt ) override;
102 StatusCode stopRun() override;
103
105 void topAlgHandler( Gaudi::Details::PropertyBase& p );
107 StatusCode decodeTopAlgs();
109 void outStreamHandler( Gaudi::Details::PropertyBase& p );
111 StatusCode decodeOutStreams();
112
113 private:
115 MinimalEventLoopMgr( const MinimalEventLoopMgr& );
117 MinimalEventLoopMgr& operator=( const MinimalEventLoopMgr& );
118
120 SmartIF<IHiveWhiteBoard> m_WB;
121
122 // number of events processed
123 size_t m_nevt{0};
124 };
125 #endif // GAUDIKERNEL_MINIMALEVENTLOOPMGR_H
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:17
SmartIF< IAppMgrUI >
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
IEventProcessor.h
Gaudi::StateMachine::CONFIGURED
Definition: StateMachine.h:16
IAlgExecStateSvc.h
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
IAppMgrUI.h
MinimalEventLoopMgr::m_aess
SmartIF< IAlgExecStateSvc > m_aess
List of top level algorithms.
Definition: MinimalEventLoopMgr.h:49
IAlgorithm.h
MinimalEventLoopMgr::State
State
Definition: MinimalEventLoopMgr.h:43
EventContext.h
operator=
PropertyMgr & operator=(const PropertyMgr &)=delete
std::string
STL class.
Service.h
MinimalEventLoopMgr::ListAlg
std::vector< SmartIF< IAlgorithm > > ListAlg
Definition: MinimalEventLoopMgr.h:31
MinimalEventLoopMgr::m_abortEventSource
std::string m_abortEventSource
Source of the AbortEvent incident.
Definition: MinimalEventLoopMgr.h:63
MinimalEventLoopMgr::m_abortEventListener
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
Definition: MinimalEventLoopMgr.h:58
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:435
MinimalEventLoopMgr::m_WB
SmartIF< IHiveWhiteBoard > m_WB
Definition: MinimalEventLoopMgr.h:120
IIncidentSvc.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
IOTest.start
start
Definition: IOTest.py:99
Gaudi::Details::PropertyBase
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
MinimalEventLoopMgr::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
Definition: MinimalEventLoopMgr.h:47
std::vector
STL class.
MinimalEventLoopMgr::m_outStreamList
ListAlg m_outStreamList
List of output streams.
Definition: MinimalEventLoopMgr.h:52
IHiveWhiteBoard.h
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
IIncidentListener.h
MinimalEventLoopMgr
This is the default processing manager of the application manager.
Definition: MinimalEventLoopMgr.h:28
maxevt
int maxevt
Definition: Bootstrap.cpp:279
executeRun
return ep &&ep executeRun(maxevt).isSuccess()
Gaudi::StateMachine::OFFLINE
Definition: StateMachine.h:15
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
MinimalEventLoopMgr::m_appMgrUI
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.
Definition: MinimalEventLoopMgr.h:45
MinimalEventLoopMgr::m_topAlgList
ListAlg m_topAlgList
Definition: MinimalEventLoopMgr.h:50