Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

MinimalEventLoopMgr.h

Go to the documentation of this file.
00001 //====================================================================
00002 //      MinimalEventLoopMgr.h
00003 //--------------------------------------------------------------------
00004 //
00005 //      Package    : GaudiSvc ( The LHCb Offline System)
00006 //
00007 //  Description: definition of the default processing manager
00008 //               service for the application manager
00009 //
00010 //      Author     : M.Frank
00011 //====================================================================
00012 #ifndef GAUDISVC_MINIMALEVENTLOOPMGR_H
00013 #define GAUDISVC_MINIMALEVENTLOOPMGR_H 1
00014 
00015 // Framework include files
00016 #include "GaudiKernel/Service.h"
00017 #include "GaudiKernel/IAppMgrUI.h"
00018 #include "GaudiKernel/IEventProcessor.h"
00019 
00020 // STL include files
00021 #include <list>
00022 #include <vector>
00023 
00024 // Forward declarations
00025 class IAlgorithm;
00026 
00044 class MinimalEventLoopMgr : public Service, 
00045                              virtual public IAppMgrUI,
00046                              virtual public IEventProcessor
00047 {
00048 public:
00050   friend class SvcFactory<MinimalEventLoopMgr>;
00051   typedef std::list<IAlgorithm*>   ListAlg;
00052   typedef std::list<std::string>   ListName;
00053   typedef std::vector<std::string> VectorName;
00054 
00055 protected:
00056   // enums
00057   enum State { OFFLINE, CONFIGURED, FINALIZED, INITIALIZED };
00059   IAppMgrUI*          m_appMgrUI;
00061   ListAlg             m_topAlgList;
00063   ListAlg             m_outStreamList;
00065   StringArrayProperty m_topAlgNames;
00067   StringArrayProperty m_outStreamNames;
00069   State               m_state;
00070 
00071 protected:
00073   MinimalEventLoopMgr(const std::string& nam, ISvcLocator* svcLoc);
00075   virtual ~MinimalEventLoopMgr();
00076 
00078   template<class T> T* releaseInterface(T* iface)   {
00079     if ( 0 != iface ) iface->release();
00080     return 0;
00081   }
00082 
00083 public:
00085   virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvInterface);
00087   virtual StatusCode run();
00089   virtual StatusCode configure();
00091   virtual StatusCode terminate();
00093   virtual StatusCode initialize();
00095   virtual StatusCode finalize();
00097   virtual StatusCode nextEvent(int maxevt);
00099   virtual const std::string& state()  const;
00101   virtual const std::string& name()  const   {
00102     return Service::name();
00103   }
00104 
00106   virtual StatusCode executeEvent(void* par );
00107 
00109   void topAlgHandler( Property& p);
00111   StatusCode decodeTopAlgs();
00113   void outStreamHandler( Property& p);
00115   StatusCode decodeOutStreams();
00116 
00117 };
00118 #endif // GAUDISVC_MINIMALEVENTLOOPMGR_H

Generated at Wed Nov 21 12:22:30 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000