| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Private Attributes | List of all members
AlgorithmManager Class Reference

The AlgorithmManager class is in charge of the creation of concrete instances of Algorithms. More...

`#include <src/ApplicationMgr/AlgorithmManager.h>`

Inheritance diagram for AlgorithmManager:
[legend]
Collaboration diagram for AlgorithmManager:
[legend]

## Classes
struct | AlgorithmItem

## Public Types
typedef std::map< std::string, std::string > | AlgTypeAliasesMap
| typedefs and classes More...
Public Types inherited from extends< ComponentManager, IAlgManager >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from CommonMessaging< implements< IComponentManager > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...

## Public Member Functions
| AlgorithmManager (IInterface *iface)
| default creator More...
| ~AlgorithmManager () override=default
| virtual destructor More...
StatusCode | addAlgorithm (IAlgorithm *alg) override
| implementation of IAlgManager::addAlgorithm More...
StatusCode | removeAlgorithm (IAlgorithm *alg) override
| implementation of IAlgManager::removeAlgorithm More...
StatusCode | createAlgorithm (const std::string &algtype, const std::string &algname, IAlgorithm *&algorithm, bool managed=false, bool checkIfExists=true) override
| implementation of IAlgManager::createAlgorithm More...
bool | existsAlgorithm (const std::string &name) const override
| implementation of IAlgManager::existsAlgorithm More...
const std::vector< IAlgorithm * > & | getAlgorithms () const override
| implementation of IAlgManager::getAlgorithms More...
StatusCode | initialize () override
| Initialization (from CONFIGURED to INITIALIZED). More...
StatusCode | start () override
| Start (from INITIALIZED to RUNNING). More...
StatusCode | stop () override
| Stop (from RUNNING to INITIALIZED). More...
StatusCode | finalize () override
| Finalize (from INITIALIZED to CONFIGURED). More...
StatusCode | reinitialize () override
| Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
StatusCode | restart () override
| Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
const std::string & | name () const override
| Return the name of the manager (implementation of INamedInterface) More...
SmartIF< IAlgorithm > & | algorithm (const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
AlgTypeAliasesMap & | typeAliases ()
const AlgTypeAliasesMap & | typeAliases () const
void | outputLevelUpdate () override
| Function to call to update the outputLevel of the components (after a change in MessageSvc). More...
Public Member Functions inherited from extends< ComponentManager, IAlgManager >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from ComponentManager
| ComponentManager (IInterface *application, const InterfaceID &baseIID)
| Constructor. More...
const InterfaceID & | componentBaseInterface () const override
| Basic interface id of the managed components. More...
StatusCode | queryInterface (const InterfaceID &iid, void **pinterface) override
| Specialized queryInterface implementation. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
StatusCode | configure () override
| Configuration (from OFFLINE to CONFIGURED). More...
StatusCode | initialize () override
| Initialization (from CONFIGURED to INITIALIZED). More...
StatusCode | start () override
| Start (from INITIALIZED to RUNNING). More...
StatusCode | stop () override
| Stop (from RUNNING to INITIALIZED). More...
StatusCode | finalize () override
| Finalize (from INITIALIZED to CONFIGURED). More...
StatusCode | terminate () override
| Initialization (from CONFIGURED to OFFLINE). More...
StatusCode | reinitialize () override
| Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
StatusCode | restart () override
| Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
Gaudi::StateMachine::State | FSMState () const override
| Get the current state. More...
Gaudi::StateMachine::State | targetFSMState () const override
| When we are in the middle of a transition, get the state where the transition is leading us. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
const 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 cached level (originally extracted from the embedded MsgStream) More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Private Attributes
std::vector< AlgorithmItem > | m_algs
| 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
Protected Member Functions inherited from CommonMessaging< implements< IComponentManager > >
MSG::Level | setUpMessaging ()
| Set up local caches. More...
MSG::Level | resetMessaging ()
| Reinitialize internal states. More...
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from ComponentManager
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...
friend | ApplicationMgr

## Detailed Description

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.

Author
  Pere Mato

Definition at line 31 of file AlgorithmManager.h.

## Member Typedef Documentation

typedef std::map<std::string, std::string> AlgorithmManager::AlgTypeAliasesMap

typedefs and classes

Definition at line 43 of file AlgorithmManager.h.

## Constructor & Destructor Documentation

AlgorithmManager::AlgorithmManager | ( | IInterface * | iface | ) |

default creator

Definition at line 19 of file AlgorithmManager.cpp.

19 : base_class( application, IAlgorithm::interfaceID() )
20 {
21 addRef(); // Initial count set to 1
22 }
extends< ComponentManager, IAlgManager >::base_class
extends base_class
Typedef to this class.
Definition: extends.h:15

AlgorithmManager::~AlgorithmManager | ( |  | ) |
| override default

virtual destructor

## Member Function Documentation

StatusCode AlgorithmManager::addAlgorithm | ( | IAlgorithm * | alg | ) |
| override

implementation of IAlgManager::addAlgorithm

Definition at line 25 of file AlgorithmManager.cpp.

26 {
27 m_algs.push_back( alg );
28 return StatusCode::SUCCESS;
29 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93

SmartIF< IAlgorithm > & AlgorithmManager::algorithm | ( | const Gaudi::Utils::TypeNameString & | typeName,
|  | const bool | createIf = `true`
| ) |  |
| override

Definition at line 103 of file AlgorithmManager.cpp.

104 {
105 auto it = std::find( m_algs.begin(), m_algs.end(), typeName.name() );
106 if ( it != m_algs.end() ) { // found
107 return it->algorithm;
108 }
109 if ( createIf ) {
110 IAlgorithm* alg;
111 if ( createAlgorithm( typeName.type(), typeName.name(), alg, true ).isSuccess() ) {
112 return algorithm( typeName, false );
113 }
114 }
115 return no_algorithm;
116 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
std::find
T find(T...args)
Gaudi::Utils::TypeNameString::type
const std::string & type() const
Definition: TypeNameString.h:39
AlgorithmManager::algorithm
SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
Definition: AlgorithmManager.cpp:103
Gaudi::Utils::TypeNameString::name
const std::string & name() const
Definition: TypeNameString.h:40
AlgorithmManager::createAlgorithm
StatusCode createAlgorithm(const std::string &algtype, const std::string &algname, IAlgorithm *&algorithm, bool managed=false, bool checkIfExists=true) override
implementation of IAlgManager::createAlgorithm
Definition: AlgorithmManager.cpp:43

StatusCode AlgorithmManager::createAlgorithm | ( | const std::string & | algtype,
|  | const std::string & | algname,
|  | IAlgorithm *& | algorithm,
|  | bool | managed = `false`,
|  | bool | checkIfExists = `true`
| ) |  |
| override

implementation of IAlgManager::createAlgorithm

Definition at line 43 of file AlgorithmManager.cpp.

45 {
46 // Check is the algorithm is already existing
47 if ( checkIfExists ) {
48 if ( existsAlgorithm( algname ) ) {
49 // return an error because an algorithm with that name already exists
50 return StatusCode::FAILURE;
51 }
52 }
53 std::string actualalgtype( algtype );
54 // a '\' in front of the type name prevents alias replacement
55 if ( ( actualalgtype.size() > 8 ) && ( actualalgtype.compare( 0, 8, "unalias:" ) == 0 ) ) {
56 actualalgtype = actualalgtype.substr( 8 );
57 } else {
58 auto typeAlias = m_algTypeAliases.find( algtype );
59 if ( typeAlias != m_algTypeAliases.end() ) {
60 actualalgtype = typeAlias->second;
61 }
62 }
63 algorithm = Algorithm::Factory::create( actualalgtype, algname, serviceLocator().get() );
64 if ( !algorithm ) {
65 this->error() << "Algorithm of type " << actualalgtype << " is unknown (No factory available)." << endmsg;
66 #ifndef _WIN32
67 errno =
68 0xAFFEDEAD; // code used by Gaudi for library load errors: forces getLastErrorString do use dlerror (on Linux)
69 #endif
70 std::string err = System::getLastErrorString();
71 if ( !err.empty() ) this->error() << err << endmsg;
72 this->error() << "More information may be available by setting the global jobOpt \"PluginDebugLevel\" to 1"
73 << endmsg;
74 return StatusCode::FAILURE;
75 }
76 // Check the compatibility of the version of the interface obtained
77 if ( !isValidInterface( algorithm ) ) {
78 fatal() << "Incompatible interface IAlgorithm version for " << actualalgtype << endmsg;
79 return StatusCode::FAILURE;
80 }
81 m_algs.emplace_back( algorithm, managed );
82 // let the algorithm know its type
83 algorithm->setType( algtype );
84 // this is needed to keep the reference count correct, since isValidInterface(algorithm)
85 // implies an increment of the counter by 1
86 algorithm->release();
87 StatusCode rc;
88 if ( managed ) {
89 // Bring the created algorithm to the same state of the ApplicationMgr
90 if ( FSMState() >= Gaudi::StateMachine::INITIALIZED ) {
91 rc = algorithm->sysInitialize();
92 if ( rc.isSuccess() && FSMState() >= Gaudi::StateMachine::RUNNING ) {
93 rc = algorithm->sysStart();
94 }
95 }
96 if ( !rc.isSuccess() ) {
97 this->error() << "Failed to initialize algorithm: [" << algname << "]" << endmsg;
98 }
99 }
100 return rc;
101 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:17
std::string::empty
T empty(T...args)
IAlgorithm::sysStart
virtual StatusCode sysStart()=0
Startup method invoked by the framework.
AlgorithmManager::m_algTypeAliases
AlgTypeAliasesMap m_algTypeAliases
Definition: AlgorithmManager.h:98
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:50
ComponentManager::FSMState
Gaudi::StateMachine::State FSMState() const override
Get the current state.
Definition: ComponentManager.h:61
std::map::end
T end(T...args)
isValidInterface
bool isValidInterface(I *i)
Templated function that throws an exception if the version if the interface implemented by the object...
Definition: IInterface.h:374
ComponentManager::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Definition: ComponentManager.h:30
CommonMessagingBase::err
MsgStream & err() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:103
IAlgorithm::sysInitialize
virtual StatusCode sysInitialize()=0
Initialization method invoked by the framework.
std::string
STL class.
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
AlgorithmManager::existsAlgorithm
bool existsAlgorithm(const std::string &name) const override
implementation of IAlgManager::existsAlgorithm
Definition: AlgorithmManager.cpp:119
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IOTest.rc
rc
Definition: IOTest.py:103
IAlgorithm::setType
virtual void setType(const std::string &)=0
std::map::find
T find(T...args)
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:18
StatusCode::FAILURE
Definition: StatusCode.h:29
System::getLastErrorString
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:298
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:100
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

bool AlgorithmManager::existsAlgorithm | ( | const std::string & | name | ) | const
| override

implementation of IAlgManager::existsAlgorithm

Definition at line 119 of file AlgorithmManager.cpp.

120 {
121 return m_algs.end() != std::find( m_algs.begin(), m_algs.end(), name );
122 }
AlgorithmManager::name
const std::string & name() const override
Return the name of the manager (implementation of INamedInterface)
Definition: AlgorithmManager.h:78
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
std::find
T find(T...args)

StatusCode AlgorithmManager::finalize | ( |  | ) |
| override

Finalize (from INITIALIZED to CONFIGURED).

Definition at line 167 of file AlgorithmManager.cpp.

168 {
169 StatusCode rc;
170 auto it = m_algs.begin();
171 while ( it != m_algs.end() ) { // finalize and remove from the list the managed algorithms
172 if ( it->managed ) {
173 rc = it->algorithm->sysFinalize();
174 if ( rc.isFailure() ) return rc;
175 it = m_algs.erase( it );
176 } else {
177 ++it;
178 }
179 }
180 return rc;
181 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IOTest.rc
rc
Definition: IOTest.py:103

const std::vector< IAlgorithm * > & AlgorithmManager::getAlgorithms | ( |  | ) | const
| override

implementation of IAlgManager::getAlgorithms

Definition at line 125 of file AlgorithmManager.cpp.

126 {
127 m_listOfPtrs.clear();
128 m_listOfPtrs.reserve( m_algs.size() );
129 std::transform( std::begin( m_algs ), std::end( m_algs ), std::back_inserter( m_listOfPtrs ),
130 []( const AlgorithmItem& alg ) { return const_cast<IAlgorithm*>( alg.algorithm.get() ); } );
131 return m_listOfPtrs;
132 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
AlgorithmManager::m_listOfPtrs
std::vector< IAlgorithm * > m_listOfPtrs
List of pointers to the know services used to implement getAlgorithms()
Definition: AlgorithmManager.h:96
std::end
T end(T...args)
std::vector::clear
T clear(T...args)
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
std::begin
T begin(T...args)
std::back_inserter
T back_inserter(T...args)
std::transform
T transform(T...args)
std::vector::reserve
T reserve(T...args)

StatusCode AlgorithmManager::initialize | ( |  | ) |
| override

Initialization (from CONFIGURED to INITIALIZED).

Definition at line 134 of file AlgorithmManager.cpp.

135 {
136 StatusCode rc;
137 for ( auto& it : m_algs ) {
138 if ( !it.managed ) continue;
139 rc = it.algorithm->sysInitialize();
140 if ( rc.isFailure() ) return rc;
141 }
142 return rc;
143 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IOTest.rc
rc
Definition: IOTest.py:103

const std::string& AlgorithmManager::name | ( |  | ) | const
| inline override

Return the name of the manager (implementation of INamedInterface)

Definition at line 78 of file AlgorithmManager.h.

79 {
80 static const std::string _name = "AlgorithmManager";
81 return _name;
82 }
std::string
STL class.

void AlgorithmManager::outputLevelUpdate | ( |  | ) |
| override

Function to call to update the outputLevel of the components (after a change in MessageSvc).

Definition at line 220 of file AlgorithmManager.cpp.

221 {
222 resetMessaging();
223 for ( auto& algItem : m_algs ) {
224 const auto alg = dynamic_cast<Algorithm*>( algItem.algorithm.get() );
225 if ( alg ) alg->resetMessaging();
226 }
227 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
CommonMessaging< implements< IComponentManager > >::resetMessaging
MSG::Level resetMessaging()
Reinitialize internal states.
Definition: CommonMessaging.h:181
Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:79

StatusCode AlgorithmManager::reinitialize | ( |  | ) |
| override

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Definition at line 183 of file AlgorithmManager.cpp.

184 {
185 StatusCode rc;
186 for ( auto& it : m_algs ) {
187 if ( !it.managed ) continue;
188 rc = it.algorithm->sysReinitialize();
189 if ( rc.isFailure() ) {
190 this->error() << "Unable to re-initialize algorithm: " << it.algorithm->name() << endmsg;
191 return rc;
192 }
193 }
194 return rc;
195 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IOTest.rc
rc
Definition: IOTest.py:103
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode AlgorithmManager::removeAlgorithm | ( | IAlgorithm * | alg | ) |
| override

implementation of IAlgManager::removeAlgorithm

Definition at line 32 of file AlgorithmManager.cpp.

33 {
34 auto it = std::find( m_algs.begin(), m_algs.end(), alg );
35 if ( it != m_algs.end() ) {
36 m_algs.erase( it );
37 return StatusCode::SUCCESS;
38 }
39 return StatusCode::FAILURE;
40 }
StatusCode::SUCCESS
Definition: StatusCode.h:29
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
std::find
T find(T...args)
StatusCode::FAILURE
Definition: StatusCode.h:29

StatusCode AlgorithmManager::restart | ( |  | ) |
| override

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Definition at line 197 of file AlgorithmManager.cpp.

198 {
199 SmartIF<IAlgExecStateSvc> m_aess;
200 m_aess = serviceLocator()->service( "AlgExecStateSvc" );
201 if ( !m_aess.isValid() ) {
202 fatal() << "Error retrieving AlgExecStateSvc" << endmsg;
203 return StatusCode::FAILURE;
204 }
205
206 StatusCode rc;
207
208 for ( auto& it : m_algs ) {
209 if ( !it.managed ) continue;
210 rc = it.algorithm->sysRestart();
211 m_aess->resetErrorCount( it.algorithm );
212 if ( rc.isFailure() ) {
213 this->error() << "Unable to re-initialize algorithm: " << it.algorithm->name() << endmsg;
214 return rc;
215 }
216 }
217 return rc;
218 }
SmartIF< IAlgExecStateSvc >
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
ComponentManager::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Definition: ComponentManager.h:30
ISvcLocator::service
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IOTest.rc
rc
Definition: IOTest.py:103
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
StatusCode::FAILURE
Definition: StatusCode.h:29
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:100
IAlgExecStateSvc::resetErrorCount
virtual void resetErrorCount(const IAlgorithm *iAlg)=0
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209

StatusCode AlgorithmManager::start | ( |  | ) |
| override

Start (from INITIALIZED to RUNNING).

Definition at line 145 of file AlgorithmManager.cpp.

146 {
147 StatusCode rc;
148 for ( auto& it : m_algs ) {
149 if ( !it.managed ) continue;
150 rc = it.algorithm->sysStart();
151 if ( rc.isFailure() ) return rc;
152 }
153 return rc;
154 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IOTest.rc
rc
Definition: IOTest.py:103

StatusCode AlgorithmManager::stop | ( |  | ) |
| override

Stop (from RUNNING to INITIALIZED).

Definition at line 156 of file AlgorithmManager.cpp.

157 {
158 StatusCode rc;
159 for ( auto& it : m_algs ) {
160 if ( !it.managed ) continue;
161 rc = it.algorithm->sysStop();
162 if ( rc.isFailure() ) return rc;
163 }
164 return rc;
165 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:93
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:61
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IOTest.rc
rc
Definition: IOTest.py:103

AlgTypeAliasesMap& AlgorithmManager::typeAliases | ( |  | ) |
| inline

Definition at line 86 of file AlgorithmManager.h.

86 { return m_algTypeAliases; }
AlgorithmManager::m_algTypeAliases
AlgTypeAliasesMap m_algTypeAliases
Definition: AlgorithmManager.h:98

const AlgTypeAliasesMap& AlgorithmManager::typeAliases | ( |  | ) | const
| inline

Definition at line 87 of file AlgorithmManager.h.

87 { return m_algTypeAliases; }
AlgorithmManager::m_algTypeAliases
AlgTypeAliasesMap m_algTypeAliases
Definition: AlgorithmManager.h:98

## Member Data Documentation

std::vector<AlgorithmItem> AlgorithmManager::m_algs
| private

algorithms maintained by AlgorithmManager

Definition at line 93 of file AlgorithmManager.h.

AlgTypeAliasesMap AlgorithmManager::m_algTypeAliases
| private

Definition at line 98 of file AlgorithmManager.h.

std::vector<IAlgorithm*> AlgorithmManager::m_listOfPtrs
| mutable private

List of pointers to the know services used to implement getAlgorithms()

Definition at line 96 of file AlgorithmManager.h.

The documentation for this class was generated from the following files:

- GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.h
- GaudiCoreSvc/src/ApplicationMgr/AlgorithmManager.cpp