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 
39  // enums
40  enum State { OFFLINE, CONFIGURED, FINALIZED, INITIALIZED };
47  ListAlg m_topAlgList;
49  ListAlg m_outStreamList;
51  State m_state = OFFLINE;
53  bool m_scheduledStop = false;
58  bool m_abortEvent = false;
61 
62 public:
64  MinimalEventLoopMgr( const std::string& nam, ISvcLocator* svcLoc );
65 
66 #if defined( GAUDI_V20_COMPAT ) && !defined( G21_NO_DEPRECATED )
67 protected:
69  template <class T>
70  T* releaseInterface( T* iface )
71  {
72  if ( 0 != iface ) iface->release();
73  return 0;
74  }
75 
76 public:
77 #endif
78 
80  StatusCode initialize() override;
82  StatusCode start() override;
84  StatusCode stop() override;
86  StatusCode finalize() override;
88  StatusCode reinitialize() override;
90  StatusCode restart() override;
91 
93  StatusCode nextEvent( int maxevt ) override;
95  StatusCode executeEvent( void* par ) override;
97  StatusCode executeRun( int maxevt ) override;
99  StatusCode stopRun() override;
100 
102  void topAlgHandler( Gaudi::Details::PropertyBase& p );
104  StatusCode decodeTopAlgs();
106  void outStreamHandler( Gaudi::Details::PropertyBase& p );
108  StatusCode decodeOutStreams();
109 
110 private:
115 
118 
119  // number of events processed
120  size_t m_nevt {0};
121 
122 };
123 #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:313
SmartIF< IAlgExecStateSvc > m_aess
List of top level algorithms.
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
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
EventContext * m_eventContext
EventContext.
SmartIF< IAppMgrUI > m_appMgrUI
Reference to the IAppMgrUI interface of the application manager.