|
Gaudi Framework, version v22r0 |
| Home | Generated: 9 Feb 2011 |
00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/MinimalEventLoopMgr.h,v 1.4 2008/07/15 12:48:18 marcocle Exp $ 00002 #ifndef GAUDIKERNEL_MINIMALEVENTLOOPMGR_H 00003 #define GAUDIKERNEL_MINIMALEVENTLOOPMGR_H 1 00004 00005 // Framework include files 00006 #include "GaudiKernel/Service.h" 00007 #include "GaudiKernel/IAppMgrUI.h" 00008 #include "GaudiKernel/IEventProcessor.h" 00009 #include "GaudiKernel/IAlgorithm.h" 00010 #include "GaudiKernel/IIncidentSvc.h" 00011 #include "GaudiKernel/IIncidentListener.h" 00012 00013 // STL include files 00014 #include <list> 00015 #include <vector> 00016 00026 class GAUDI_API MinimalEventLoopMgr: public extends1<Service, IEventProcessor> 00027 { 00028 public: 00030 typedef std::list<SmartIF<IAlgorithm> > ListAlg; 00031 typedef std::list<IAlgorithm*> ListAlgPtrs; 00032 typedef std::list<std::string> ListName; 00033 typedef std::vector<std::string> VectorName; 00034 00035 protected: 00036 // enums 00037 enum State { OFFLINE, CONFIGURED, FINALIZED, INITIALIZED }; 00039 SmartIF<IAppMgrUI> m_appMgrUI; 00041 SmartIF<IIncidentSvc> m_incidentSvc; 00043 ListAlg m_topAlgList; 00045 ListAlg m_outStreamList; 00047 std::string m_outStreamType; 00049 StringArrayProperty m_topAlgNames; 00051 StringArrayProperty m_outStreamNames; 00053 State m_state; 00055 bool m_scheduledStop; 00057 SmartIF<IIncidentListener> m_abortEventListener; 00060 bool m_abortEvent; 00062 std::string m_abortEventSource; 00063 00064 public: 00066 MinimalEventLoopMgr(const std::string& nam, ISvcLocator* svcLoc); 00068 virtual ~MinimalEventLoopMgr(); 00069 00070 #if defined(GAUDI_V20_COMPAT) && !defined(G21_NO_DEPRECATED) 00071 protected: 00073 template<class T> T* releaseInterface(T* iface) { 00074 if ( 0 != iface ) iface->release(); 00075 return 0; 00076 } 00077 public: 00078 #endif 00079 00081 virtual StatusCode initialize(); 00083 virtual StatusCode start(); 00085 virtual StatusCode stop(); 00087 virtual StatusCode finalize(); 00089 virtual StatusCode reinitialize(); 00091 virtual StatusCode restart(); 00092 00094 virtual StatusCode nextEvent(int maxevt); 00096 virtual StatusCode executeEvent(void* par ); 00098 virtual StatusCode executeRun(int maxevt); 00100 virtual StatusCode stopRun(); 00101 00103 void topAlgHandler( Property& p); 00105 StatusCode decodeTopAlgs(); 00107 void outStreamHandler( Property& p); 00109 StatusCode decodeOutStreams(); 00110 00111 private: 00113 MinimalEventLoopMgr(const MinimalEventLoopMgr&); 00115 MinimalEventLoopMgr& operator= (const MinimalEventLoopMgr&); 00116 00117 }; 00118 #endif // GAUDIKERNEL_MINIMALEVENTLOOPMGR_H