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
12 #include "GaudiKernel/Service.h"
13 
14 // STL include files
15 #include <list>
16 #include <vector>
17 
27 class GAUDI_API MinimalEventLoopMgr : public extends<Service, IEventProcessor>
28 {
29 public:
31 
32 protected:
33  // Properties
34  Gaudi::Property<std::vector<std::string>> m_topAlgNames{this, "TopAlg", {}, "list of top level algorithms names"};
35  Gaudi::Property<std::vector<std::string>> m_outStreamNames{this, "OutStream", {}, "list of output stream names"};
36  Gaudi::Property<std::string> m_outStreamType{this, "OutStreamType", "OutputStream",
37  "[[deprecated]] default type for OutputStream instances"};
38  Gaudi::Property<bool> m_printCFExp{this, "PrintControlFlowExpression", false,
39  "Print the control flow expression representing the content of TopAlg"};
40 
41  // enums
42  enum State { OFFLINE, CONFIGURED, FINALIZED, INITIALIZED };
49  ListAlg m_topAlgList;
51  ListAlg m_outStreamList;
53  State m_state = OFFLINE;
55  bool m_scheduledStop = false;
60  bool m_abortEvent = false;
63 
64 public:
66  MinimalEventLoopMgr( const std::string& nam, ISvcLocator* svcLoc );
67 
68 #if defined( GAUDI_V20_COMPAT ) && !defined( G21_NO_DEPRECATED )
69 protected:
71  template <class T>
72  T* releaseInterface( T* iface )
73  {
74  if ( 0 != iface ) iface->release();
75  return 0;
76  }
77 
78 public:
79 #endif
80 
82  StatusCode initialize() override;
84  StatusCode start() override;
86  StatusCode stop() override;
88  StatusCode finalize() override;
90  StatusCode reinitialize() override;
92  StatusCode restart() override;
93 
95  StatusCode nextEvent( int maxevt ) override;
97  StatusCode executeEvent( void* par ) override;
99  StatusCode executeRun( int maxevt ) override;
101  StatusCode stopRun() override;
102 
104  void topAlgHandler( Gaudi::Details::PropertyBase& p );
106  StatusCode decodeTopAlgs();
108  void outStreamHandler( Gaudi::Details::PropertyBase& p );
110  StatusCode decodeOutStreams();
111 
112 private:
117 
118  // number of events processed
119  size_t m_nevt {0};
120 
121 };
122 #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:314
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.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
start
Definition: IOTest.py:88
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:279
return ep &&ep executeRun(maxevt).isSuccess()
#define GAUDI_API
Definition: Kernel.h:107
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.