The Gaudi Framework  v30r3 (a5ef0a68)
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
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:
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 };
50  ListAlg m_topAlgList;
52  ListAlg m_outStreamList;
54  State m_state = OFFLINE;
56  bool m_scheduledStop = false;
61  bool m_abortEvent = false;
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:
118 
121 
122  // number of events processed
123  size_t m_nevt{0};
124 };
125 #endif // GAUDIKERNEL_MINIMALEVENTLOOPMGR_H
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
Implementation of property with value of concrete type.
Definition: Property.h:381
SmartIF< IAlgExecStateSvc > m_aess
List of top level algorithms.
PropertyMgr & operator=(const PropertyMgr &)=delete
STL class.
std::vector< SmartIF< IAlgorithm > > ListAlg
std::string m_abortEventSource
Source of the AbortEvent incident.
SmartIF< IIncidentListener > m_abortEventListener
Instance of the incident listener waiting for AbortEvent.
SmartIF< IHiveWhiteBoard > m_WB
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
start
Definition: IOTest.py:99
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
Definition: Property.h:32
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the incident service.
STL class.
ListAlg m_outStreamList
List of output streams.
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
This is the default processing manager of the application manager.
int maxevt
Definition: Bootstrap.cpp:276
return ep &&ep executeRun(maxevt).isSuccess()
#define GAUDI_API
Definition: Kernel.h:104
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.