MinimalEventLoopMgr.h
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/MinimalEventLoopMgr.h,v 1.4 2008/07/15 12:48:18 marcocle Exp $
2 #ifndef GAUDIKERNEL_MINIMALEVENTLOOPMGR_H
3 #define GAUDIKERNEL_MINIMALEVENTLOOPMGR_H 1
4 
5 // Framework include files
6 #include "GaudiKernel/Service.h"
7 #include "GaudiKernel/IAppMgrUI.h"
8 #include "GaudiKernel/IEventProcessor.h"
9 #include "GaudiKernel/IAlgorithm.h"
10 #include "GaudiKernel/IIncidentSvc.h"
11 #include "GaudiKernel/IIncidentListener.h"
12 
13 // STL include files
14 #include <list>
15 #include <vector>
16 
26 class GAUDI_API MinimalEventLoopMgr: public extends1<Service, IEventProcessor>
27 {
28 public:
29  typedef std::list<SmartIF<IAlgorithm> > ListAlg;
30  typedef std::list<IAlgorithm*> ListAlgPtrs;
31  typedef std::list<std::string> ListName;
32  typedef std::vector<std::string> VectorName;
33 
34 protected:
35  // enums
36  enum State { OFFLINE, CONFIGURED, FINALIZED, INITIALIZED };
38  SmartIF<IAppMgrUI> m_appMgrUI;
40  SmartIF<IIncidentSvc> m_incidentSvc;
42  ListAlg m_topAlgList;
44  ListAlg m_outStreamList;
46  std::string m_outStreamType;
48  StringArrayProperty m_topAlgNames;
50  StringArrayProperty m_outStreamNames;
52  State m_state;
54  bool m_scheduledStop;
56  SmartIF<IIncidentListener> m_abortEventListener;
59  bool m_abortEvent;
61  std::string m_abortEventSource;
62 
63 public:
65  MinimalEventLoopMgr(const std::string& nam, ISvcLocator* svcLoc);
67  virtual ~MinimalEventLoopMgr();
68 
69 #if defined(GAUDI_V20_COMPAT) && !defined(G21_NO_DEPRECATED)
70 protected:
72  template<class T> T* releaseInterface(T* iface) {
73  if ( 0 != iface ) iface->release();
74  return 0;
75  }
76 public:
77 #endif
78 
80  virtual StatusCode initialize();
82  virtual StatusCode start();
84  virtual StatusCode stop();
86  virtual StatusCode finalize();
88  virtual StatusCode reinitialize();
90  virtual StatusCode restart();
91 
93  virtual StatusCode nextEvent(int maxevt);
95  virtual StatusCode executeEvent(void* par );
97  virtual StatusCode executeRun(int maxevt);
99  virtual StatusCode stopRun();
100 
102  void topAlgHandler( Property& p);
104  StatusCode decodeTopAlgs();
106  void outStreamHandler( Property& p);
108  StatusCode decodeOutStreams();
109 
110 private:
114  MinimalEventLoopMgr& operator= (const MinimalEventLoopMgr&);
115 
116 };
117 #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:26
#define GAUDI_API
Definition: Kernel.h:108
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:30
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
This is the default processing manager of the application manager.
tuple start
Definition: IOTest.py:88