![]() |
The Gaudi Framework
v26r0
|
The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms. More...
#include <src/ApplicationMgr/AlgorithmManager.h>
Classes | |
struct | AlgorithmItem |
Public Types | |
typedef std::list< AlgorithmItem > | ListAlg |
typedefs and classes More... | |
typedef std::map< std::string, std::string > | AlgTypeAliasesMap |
![]() | |
typedef extends1 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces1 < IAlgManager > | extend_interfaces_base |
Typedef to the base of this class. More... | |
typedef extend_interfaces_base::ext_iids | interfaces |
MPL set of all the implemented interfaces. More... | |
![]() | |
typedef CommonMessaging | base_class |
![]() | |
typedef implements1 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces1 < IComponentManager > | extend_interfaces_base |
Typedef to the base of this class. More... | |
typedef extend_interfaces_base::ext_iids | interfaces |
MPL set of all the implemented interfaces. More... | |
![]() | |
typedef IComponentManager::iid::iids::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
![]() | |
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR } |
Return status. More... | |
typedef Gaudi::InterfaceId < IInterface, 0, 0 > | iid |
Interface ID. More... | |
typedef mpl::set1< iid > | ext_iids |
Extra interfaces. More... | |
![]() | |
typedef IAlgManager::iid::iids::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
Public Member Functions | |
AlgorithmManager (IInterface *iface) | |
default creator More... | |
virtual | ~AlgorithmManager () |
virtual destructor More... | |
virtual StatusCode | addAlgorithm (IAlgorithm *alg) |
implementation of IAlgManager::addAlgorithm More... | |
virtual StatusCode | removeAlgorithm (IAlgorithm *alg) |
implementation of IAlgManager::removeAlgorithm More... | |
virtual StatusCode | createAlgorithm (const std::string &algtype, const std::string &algname, IAlgorithm *&algorithm, bool managed=false) |
implementation of IAlgManager::createAlgorithm More... | |
virtual bool | existsAlgorithm (const std::string &name) const |
implementation of IAlgManager::existsAlgorithm More... | |
virtual const std::vector < IAlgorithm * > & | getAlgorithms () const |
implementation of IAlgManager::getAlgorithms More... | |
virtual StatusCode | initialize () |
Initialization (from CONFIGURED to INITIALIZED). More... | |
virtual StatusCode | start () |
Start (from INITIALIZED to RUNNING). More... | |
virtual StatusCode | stop () |
Stop (from RUNNING to INITIALIZED). More... | |
virtual StatusCode | finalize () |
Finalize (from INITIALIZED to CONFIGURED). More... | |
virtual StatusCode | reinitialize () |
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More... | |
virtual StatusCode | restart () |
Initialization (from RUNNING to RUNNING, via INITIALIZED). More... | |
const std::string & | name () const |
Return the name of the manager (implementation of INamedInterface) More... | |
virtual SmartIF< IAlgorithm > & | algorithm (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) |
Returns a smart pointer to a service. More... | |
AlgTypeAliasesMap & | typeAliases () |
const AlgTypeAliasesMap & | typeAliases () const |
![]() | |
extends1 (A1 a1, A2 a2, A3 a3) | |
Templated constructor with 3 arguments. More... | |
extends1 (A1 a1, A2 a2) | |
Templated constructor with 2 arguments. More... | |
extends1 (A1 a1) | |
Templated constructor with 1 argument. More... | |
extends1 () | |
Default constructor. More... | |
virtual void * | i_cast (const InterfaceID &tid) const |
Implementation of IInterface::i_cast. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp) |
Implementation of IInterface::queryInterface. More... | |
virtual std::vector< std::string > | getInterfaceNames () const |
Implementation of IInterface::getInterfaceNames. More... | |
virtual | ~extends1 () |
Virtual destructor. More... | |
![]() | |
ComponentManager (IInterface *application, const InterfaceID &baseIID) | |
Constructor. More... | |
virtual const InterfaceID & | componentBaseInterface () const |
Basic interface id of the managed components. More... | |
virtual | ~ComponentManager () |
Virtual destructor. More... | |
virtual SmartIF< ISvcLocator > & | serviceLocator () const |
Needed to locate the message service. More... | |
virtual StatusCode | configure () |
Configuration (from OFFLINE to CONFIGURED). More... | |
virtual StatusCode | terminate () |
Initialization (from CONFIGURED to OFFLINE). More... | |
virtual Gaudi::StateMachine::State | FSMState () const |
Get the current state. More... | |
virtual Gaudi::StateMachine::State | targetFSMState () const |
When we are in the middle of a transition, get the state where the transition is leading us. More... | |
![]() | |
CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3) | |
Templated constructor with 3 arguments. More... | |
CommonMessaging (const A1 &a1, const A2 &a2) | |
Templated constructor with 2 arguments. More... | |
CommonMessaging (const A1 &a1) | |
Templated constructor with 1 argument. More... | |
CommonMessaging () | |
Default constructor. More... | |
virtual | ~CommonMessaging () |
Virtual destructor. More... | |
SmartIF< IMessageSvc > & | msgSvc () const |
The standard message service. More... | |
MsgStream & | msgStream () const |
Return an uninitialized MsgStream. More... | |
MsgStream & | msgStream (const MSG::Level level) const |
Predefined configurable message stream for the efficient printouts. More... | |
MsgStream & | always () const |
shortcut for the method msgStream(MSG::ALWAYS) More... | |
MsgStream & | fatal () const |
shortcut for the method msgStream(MSG::FATAL) More... | |
MsgStream & | err () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | error () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | warning () const |
shortcut for the method msgStream(MSG::WARNING) More... | |
MsgStream & | info () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MsgStream & | debug () const |
shortcut for the method msgStream(MSG::DEBUG) More... | |
MsgStream & | verbose () const |
shortcut for the method msgStream(MSG::VERBOSE) More... | |
MsgStream & | msg () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MSG::Level | msgLevel () const |
get the output level from the embedded MsgStream More... | |
bool | msgLevel (MSG::Level lvl) const |
get the output level from the embedded MsgStream More... | |
![]() | |
virtual | ~extend_interfaces1 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IComponentManager, 1, 0) | |
InterfaceID. More... | |
virtual | ~IComponentManager () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IStateful, 1, 0) | |
InterfaceID. More... | |
virtual | ~IStateful () |
![]() | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | release ()=0 |
Release Interface instance. More... | |
virtual unsigned long | refCount () const =0 |
Current reference count. More... | |
virtual | ~IInterface () |
Virtual destructor. More... | |
![]() | |
virtual | ~extend_interfaces1 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IAlgManager, 6, 0) | |
InterfaceID. More... | |
virtual StatusCode | getAlgorithm (const std::string &name, IAlgorithm *&alg) const |
Find an algorithm with given name in the list of known algorithms. More... | |
virtual StatusCode | initializeAlgorithms () |
Initializes the list of "managed" algorithms. More... | |
virtual StatusCode | startAlgorithms () |
Starts the list of "managed" algorithms. More... | |
virtual StatusCode | stopAlgorithms () |
Stops the list of "managed" algorithms. More... | |
virtual StatusCode | finalizeAlgorithms () |
Finalizes the list of "managed" algorithms. More... | |
virtual StatusCode | reinitializeAlgorithms () |
Initializes the list of "managed" algorithms. More... | |
virtual StatusCode | restartAlgorithms () |
Starts the list of "managed" algorithms. More... | |
template<typename T > | |
SmartIF< T > | algorithm (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) |
Returns a smart pointer to the requested interface of a service. More... | |
Private Attributes | |
ListAlg | m_listalg |
List of algorithms maintained by AlgorithmManager. More... | |
std::vector< IAlgorithm * > | m_listOfPtrs |
List of pointers to the know services used to implement getAlgorithms() More... | |
AlgTypeAliasesMap | m_algTypeAliases |
Additional Inherited Members | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
![]() | |
void | updateMsgStreamOutputLevel (int level) |
Update the output level of the cached MsgStream. More... | |
![]() | |
SmartIF< IInterface > | m_application |
Pointer to the owner of the manager. More... | |
SmartIF< IStateful > | m_stateful |
Pointer to the IStateful interface of the owner. More... | |
InterfaceID | m_basicInterfaceId |
Basic interface id of the managed components. More... | |
SmartIF< ISvcLocator > | m_svcLocator |
Service locator (needed to access the MessageSvc) More... | |
![]() | |
SmartIF< IMessageSvc > | m_msgsvc |
Pointer to the message service;. More... | |
std::auto_ptr< MsgStream > | m_msgStream |
The predefined message stream. More... | |
bool | m_streamWithService |
Flag to create a new MsgStream if it was created without the message service. More... | |
The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms.
The ApplicationMgr delegates the creation and bookkeeping of algorithms to the algorithm factory. In order to be able to create algorithms from which it does not know the concrete type it requires that the algorithm has been declared in one of 3 possible ways: an abstract static creator function, a dynamic link library or an abstract factory reference.
Definition at line 31 of file AlgorithmManager.h.
typedef std::map<std::string, std::string> AlgorithmManager::AlgTypeAliasesMap |
Definition at line 49 of file AlgorithmManager.h.
typedef std::list<AlgorithmItem> AlgorithmManager::ListAlg |
typedefs and classes
Definition at line 48 of file AlgorithmManager.h.
AlgorithmManager::AlgorithmManager | ( | IInterface * | iface | ) |
default creator
Definition at line 18 of file AlgorithmManager.cpp.
|
virtual |
|
virtual |
implementation of IAlgManager::addAlgorithm
Implements IAlgManager.
Definition at line 29 of file AlgorithmManager.cpp.
|
virtual |
Returns a smart pointer to a service.
Implements IAlgManager.
Definition at line 105 of file AlgorithmManager.cpp.
|
virtual |
implementation of IAlgManager::createAlgorithm
Implements IAlgManager.
Definition at line 45 of file AlgorithmManager.cpp.
|
virtual |
implementation of IAlgManager::existsAlgorithm
Implements IAlgManager.
Definition at line 120 of file AlgorithmManager.cpp.
|
virtual |
Finalize (from INITIALIZED to CONFIGURED).
Reimplemented from ComponentManager.
Definition at line 171 of file AlgorithmManager.cpp.
|
virtual |
implementation of IAlgManager::getAlgorithms
Implements IAlgManager.
Definition at line 126 of file AlgorithmManager.cpp.
|
virtual |
Initialization (from CONFIGURED to INITIALIZED).
Reimplemented from ComponentManager.
Definition at line 138 of file AlgorithmManager.cpp.
|
inlinevirtual |
Return the name of the manager (implementation of INamedInterface)
Implements CommonMessaging< implements1< IComponentManager > >.
Definition at line 84 of file AlgorithmManager.h.
|
virtual |
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Reimplemented from ComponentManager.
Definition at line 186 of file AlgorithmManager.cpp.
|
virtual |
implementation of IAlgManager::removeAlgorithm
Implements IAlgManager.
Definition at line 35 of file AlgorithmManager.cpp.
|
virtual |
Initialization (from RUNNING to RUNNING, via INITIALIZED).
Reimplemented from ComponentManager.
Definition at line 200 of file AlgorithmManager.cpp.
|
virtual |
Start (from INITIALIZED to RUNNING).
Reimplemented from ComponentManager.
Definition at line 149 of file AlgorithmManager.cpp.
|
virtual |
Stop (from RUNNING to INITIALIZED).
Reimplemented from ComponentManager.
Definition at line 160 of file AlgorithmManager.cpp.
|
inline |
Definition at line 91 of file AlgorithmManager.h.
|
inline |
Definition at line 92 of file AlgorithmManager.h.
|
private |
Definition at line 100 of file AlgorithmManager.h.
|
private |
List of algorithms maintained by AlgorithmManager.
Definition at line 95 of file AlgorithmManager.h.
|
mutableprivate |
List of pointers to the know services used to implement getAlgorithms()
Definition at line 98 of file AlgorithmManager.h.