1 #ifndef GAUDISVC_ALGORITHMMANAGER_H
2 #define GAUDISVC_ALGORITHMMANAGER_H
5 #include "GaudiKernel/Kernel.h"
6 #include "GaudiKernel/IAlgManager.h"
7 #include "GaudiKernel/IStateful.h"
8 #include "GaudiKernel/ComponentManager.h"
9 #include "GaudiKernel/SmartIF.h"
10 #include "GaudiKernel/IAlgorithm.h"
40 return algorithm->name() ==
name;
43 return algorithm.
get() == ptr;
66 const std::vector<IAlgorithm*>&
getAlgorithms()
const override;
83 const std::string &
name()
const override {
84 static const std::string _name =
"AlgorithmManager";
102 #endif // GAUDISVC_ALGORITHMFACTORY_H
The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms.
StatusCode initialize() override
Initialization (from CONFIGURED to INITIALIZED).
AlgorithmItem(IAlgorithm *s, bool managed=false)
StatusCode addAlgorithm(IAlgorithm *alg) override
implementation of IAlgManager::addAlgorithm
StatusCode start() override
Start (from INITIALIZED to RUNNING).
const AlgTypeAliasesMap & typeAliases() const
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
AlgTypeAliasesMap m_algTypeAliases
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
const std::string & name() const override
Return the name of the manager (implementation of INamedInterface)
std::vector< IAlgorithm * > m_listOfPtrs
List of pointers to the know services used to implement getAlgorithms()
StatusCode reinitialize() override
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
AlgTypeAliasesMap & typeAliases()
bool existsAlgorithm(const std::string &name) const override
implementation of IAlgManager::existsAlgorithm
StatusCode stop() override
Stop (from RUNNING to INITIALIZED).
StatusCode finalize() override
Finalize (from INITIALIZED to CONFIGURED).
TYPE * get() const
Get interface pointer.
Helper class to parse a string of format "type/name".
const std::vector< IAlgorithm * > & getAlgorithms() const override
implementation of IAlgManager::getAlgorithms
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
StatusCode removeAlgorithm(IAlgorithm *alg) override
implementation of IAlgManager::removeAlgorithm
The IMessage is the interface implemented by the message service.
The IAlgorithm is the interface implemented by the Algorithm base class.
std::map< std::string, std::string > AlgTypeAliasesMap
typedefs and classes
Base class used to extend a class implementing other interfaces.
bool operator==(const std::string &name) const
AlgorithmManager(IInterface *iface)
default creator
SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
std::string typeName(const std::type_info &typ)
bool operator==(const IAlgorithm *ptr) const
~AlgorithmManager() override=default
virtual destructor
StatusCode createAlgorithm(const std::string &algtype, const std::string &algname, IAlgorithm *&algorithm, bool managed=false, bool checkIfExists=true) override
implementation of IAlgManager::createAlgorithm
SmartIF< IAlgorithm > algorithm
StatusCode restart() override
Initialization (from RUNNING to RUNNING, via INITIALIZED).