| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# AlgorithmManager.h

Go to the documentation of this file.

    00001 // $Id: AlgorithmManager.h,v 1.4 2008/06/02 14:21:35 marcocle Exp $     //
    00002 #ifndef GAUDISVC_ALGORITHMMANAGER_H
    00003 #define GAUDISVC_ALGORITHMMANAGER_H
    00004
    00005 // Include files
    00006 #include "GaudiKernel/Kernel.h"
    00007 #include "GaudiKernel/IAlgManager.h"
    00008 #include "GaudiKernel/IStateful.h"
    00009 #include "GaudiKernel/SmartIF.h"
    00010 #include <string>
    00011 #include <list>
    00012 #include <map>
    00013
    00014 // Forward declarations
    00015 class IAlgorithm;
    00016 class ISvcLocator;
    00017 class IMessageSvc;
    00018
    00031 class AlgorithmManager : virtual public  IAlgManager  {
    00032   public:
    00034   typedef std::list<IAlgorithm*> ListAlg;
    00035
    00037   AlgorithmManager( IInterface* iface );
    00039   virtual ~AlgorithmManager();
    00040
    00042   virtual unsigned long addRef();
    00044   virtual unsigned long release();
    00046   virtual StatusCode queryInterface(const InterfaceID& iid, void** pinterface);
    00047
    00049   virtual StatusCode addAlgorithm( IAlgorithm* alg);
    00051   virtual StatusCode removeAlgorithm( IAlgorithm* alg);
    00053   virtual StatusCode createAlgorithm( const std::string& algtype, const std::string& algname,
    00054                                       IAlgorithm*& algorithm, bool managed = false );
    00056   virtual StatusCode getAlgorithm( const std::string& name, IAlgorithm*& alg) const;
    00058   virtual bool existsAlgorithm( const std::string& name) const;
    00060   virtual std::list<IAlgorithm*>& getAlgorithms( ) const;
    00062   virtual StatusCode initializeAlgorithms();
    00064   virtual StatusCode startAlgorithms();
    00066   virtual StatusCode stopAlgorithms();
    00068   virtual StatusCode finalizeAlgorithms();
    00070   virtual StatusCode reinitializeAlgorithms();
    00072   virtual StatusCode restartAlgorithms();
    00073
    00074 private:
    00075
    00076   IMessageSvc *msgSvc();
    00077
    00078   IInterface*   m_pOuter;
    00079   unsigned long m_refcount;
    00080   ListAlg*      m_listalg;
    00081   ListAlg*      m_listmgralg;
    00082   ISvcLocator*  m_svclocator;
    00083   IMessageSvc*  m_msgsvc;
    00084   SmartIF<IStateful> m_statemgr;
    00085 };
    00086 #endif  // GAUDISVC_ALGORITHMFACTORY_H
    00087