Gaudi Framework, version v23r5

Home   Generated: Wed Nov 28 2012
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlgorithmManager.h
Go to the documentation of this file.
1 // $Id: AlgorithmManager.h,v 1.4 2008/06/02 14:21:35 marcocle Exp $ //
2 #ifndef GAUDISVC_ALGORITHMMANAGER_H
3 #define GAUDISVC_ALGORITHMMANAGER_H
4 
5 // Include files
6 #include "GaudiKernel/Kernel.h"
10 #include "GaudiKernel/SmartIF.h"
11 #include "GaudiKernel/IAlgorithm.h"
12 #include <string>
13 #include <list>
14 #include <map>
15 
16 // Forward declarations
17 class ISvcLocator;
18 class IMessageSvc;
19 
32 class AlgorithmManager : public extends1<ComponentManager, IAlgManager>{
33 public:
34 
35  struct AlgorithmItem {
36  AlgorithmItem(IAlgorithm *s, bool managed = false):
37  algorithm(s), managed(managed) {}
39  bool managed;
40  inline bool operator==(const std::string &name) const {
41  return algorithm->name() == name;
42  }
43  inline bool operator==(const IAlgorithm *ptr) const {
44  return algorithm.get() == ptr;
45  }
46  };
47 
50 
52  AlgorithmManager( IInterface* iface );
54  virtual ~AlgorithmManager();
55 
57  virtual StatusCode addAlgorithm(IAlgorithm* alg);
61  virtual StatusCode createAlgorithm(const std::string& algtype, const std::string& algname,
62  IAlgorithm*& algorithm, bool managed = false);
63 
65  virtual bool existsAlgorithm(const std::string& name) const;
67  virtual const std::list<IAlgorithm*>& getAlgorithms() const;
68 
70  virtual StatusCode initialize();
72  virtual StatusCode start();
74  virtual StatusCode stop();
76  virtual StatusCode finalize();
77 
79  virtual StatusCode reinitialize();
81  virtual StatusCode restart();
82 
84  const std::string &name() const {
85  static std::string _name = "AlgorithmManager";
86  return _name;
87  }
88 
89  virtual SmartIF<IAlgorithm> &algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf = true);
90 
91 private:
93 
96 
97 };
98 #endif // GAUDISVC_ALGORITHMFACTORY_H
99 

Generated at Wed Nov 28 2012 12:17:11 for Gaudi Framework, version v23r5 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004