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/Service.h"
6 #include "GaudiKernel/IAppMgrUI.h"
7 #include "GaudiKernel/IEventProcessor.h"
8 #include "GaudiKernel/IAlgorithm.h"
9 #include "GaudiKernel/IIncidentSvc.h"
10 #include "GaudiKernel/IIncidentListener.h"
11 
12 // STL include files
13 #include <list>
14 #include <vector>
15 
25 class GAUDI_API MinimalEventLoopMgr: public extends1<Service, IEventProcessor>
26 {
27 public:
28  typedef std::vector<SmartIF<IAlgorithm> > ListAlg;
29 
30 protected:
31  // enums
32  enum State { OFFLINE, CONFIGURED, FINALIZED, INITIALIZED };
34  SmartIF<IAppMgrUI> m_appMgrUI;
36  SmartIF<IIncidentSvc> m_incidentSvc;
38  ListAlg m_topAlgList;
40  ListAlg m_outStreamList;
42  std::string m_outStreamType;
44  StringArrayProperty m_topAlgNames;
46  StringArrayProperty m_outStreamNames;
48  State m_state = OFFLINE;
50  bool m_scheduledStop = false;
52  SmartIF<IIncidentListener> m_abortEventListener;
55  bool m_abortEvent = false;
57  std::string m_abortEventSource;
58 
59 public:
61  MinimalEventLoopMgr(const std::string& nam, ISvcLocator* svcLoc);
63  ~MinimalEventLoopMgr() override = default;
64 
65 #if defined(GAUDI_V20_COMPAT) && !defined(G21_NO_DEPRECATED)
66 protected:
68  template<class T> T* releaseInterface(T* iface) {
69  if ( 0 != iface ) iface->release();
70  return 0;
71  }
72 public:
73 #endif
74 
76  virtual StatusCode initialize();
78  virtual StatusCode start();
80  virtual StatusCode stop();
82  virtual StatusCode finalize();
84  virtual StatusCode reinitialize();
86  virtual StatusCode restart();
87 
89  virtual StatusCode nextEvent(int maxevt);
91  virtual StatusCode executeEvent(void* par );
93  virtual StatusCode executeRun(int maxevt);
95  virtual StatusCode stopRun();
96 
98  void topAlgHandler( Property& p);
100  StatusCode decodeTopAlgs();
102  void outStreamHandler( Property& p);
104  StatusCode decodeOutStreams();
105 
106 private:
110  MinimalEventLoopMgr& operator= (const MinimalEventLoopMgr&);
111 
112 };
113 #endif // GAUDIKERNEL_MINIMALEVENTLOOPMGR_H
def initialize()
Definition: AnalysisTest.py:12
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
#define GAUDI_API
Definition: Kernel.h:107
State
Allowed states for classes implementing the state machine (ApplicationMgr, Algorithm, Service, AlgTool).
Definition: StateMachine.h:12
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:38
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
This is the default processing manager of the application manager.
return ep &&ep executeRun(maxevt).isSuccess()
tuple start
Definition: IOTest.py:88