| The Gaudi Framework v32r1 (f65d50dc)

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...
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...
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 CommonMessaging< implements< IComponentManager > >
MSG::Level | msgLevel () const
| get the cached level (originally extracted from the embedded MsgStream) More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const
| Backward compatibility function for getting the output level. 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...

## 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 () const
| 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

## ◆ AlgTypeAliasesMap

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

typedefs and classes

Definition at line 42 of file AlgorithmManager.h.

## Constructor & Destructor Documentation

## ◆ AlgorithmManager()

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

default creator

Definition at line 19 of file AlgorithmManager.cpp.

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

## Member Function Documentation

## ◆ addAlgorithm()

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

implementation of IAlgManager::addAlgorithm

Definition at line 24 of file AlgorithmManager.cpp.

24 {
25 m_algs.push_back( alg );
26 return StatusCode::SUCCESS;
27 }
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85

## ◆ algorithm()

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

Definition at line 93 of file AlgorithmManager.cpp.

93 {
94 auto it = std::find( m_algs.begin(), m_algs.end(), typeName.name() );
95 if ( it != m_algs.end() ) { // found
96 return it->algorithm;
97 }
98 if ( createIf ) {
99 IAlgorithm* alg;
100 if ( createAlgorithm( typeName.type(), typeName.name(), alg, true ).isSuccess() ) {
101 return algorithm( typeName, false );
102 }
103 }
104 return no_algorithm;
105 }
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:28
std::find
T find(T... args)
AlgorithmManager::algorithm
SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
Definition: AlgorithmManager.cpp:93
GaudiDict::typeName
std::string typeName(const std::type_info &typ)
Definition: Dictionary.cpp:21
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:40

## ◆ createAlgorithm()

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 40 of file AlgorithmManager.cpp.

41 {
42 // Check is the algorithm is already existing
43 if ( checkIfExists ) {
44 if ( existsAlgorithm( algname ) ) {
45 // return an error because an algorithm with that name already exists
46 return StatusCode::FAILURE;
47 }
48 }
49 std::string actualalgtype( algtype );
50 // a '\' in front of the type name prevents alias replacement
51 if ( ( actualalgtype.size() > 8 ) && ( actualalgtype.compare( 0, 8, "unalias:" ) == 0 ) ) {
52 actualalgtype = actualalgtype.substr( 8 );
53 } else {
54 auto typeAlias = m_algTypeAliases.find( algtype );
55 if ( typeAlias != m_algTypeAliases.end() ) { actualalgtype = typeAlias->second; }
56 }
57 algorithm = Gaudi::Algorithm::Factory::create( actualalgtype, algname, serviceLocator().get() ).release();
58 if ( !algorithm ) {
59 this->error() << "Algorithm of type " << actualalgtype << " is unknown (No factory available)." << endmsg;
60 #ifndef _WIN32
61 errno =
62 0xAFFEDEAD; // code used by Gaudi for library load errors: forces getLastErrorString do use dlerror (on Linux)
63 #endif
64 std::string err = System::getLastErrorString();
65 if ( !err.empty() ) this->error() << err << endmsg;
66 this->error() << "More information may be available by setting the global jobOpt \"PluginDebugLevel\" to 1"
67 << endmsg;
68 return StatusCode::FAILURE;
69 }
70 // Check the compatibility of the version of the interface obtained
71 if ( !isValidInterface( algorithm ) ) {
72 fatal() << "Incompatible interface IAlgorithm version for " << actualalgtype << endmsg;
73 return StatusCode::FAILURE;
74 }
75 m_algs.emplace_back( algorithm, managed );
76 // let the algorithm know its type
77 algorithm->setType( algtype );
78 // this is needed to keep the reference count correct, since isValidInterface(algorithm)
79 // implies an increment of the counter by 1
80 algorithm->release();
81 StatusCode rc;
82 if ( managed ) {
83 // Bring the created algorithm to the target state of the ApplicationMgr
84 if ( targetFSMState() >= Gaudi::StateMachine::INITIALIZED ) {
85 rc = algorithm->sysInitialize();
86 if ( rc.isSuccess() && targetFSMState() >= Gaudi::StateMachine::RUNNING ) { rc = algorithm->sysStart(); }
87 }
88 if ( !rc.isSuccess() ) { this->error() << "Failed to initialize algorithm: [" << algname << "]" << endmsg; }
89 }
90 return rc;
91 }
ComponentManager::targetFSMState
Gaudi::StateMachine::State targetFSMState() const override
When we are in the middle of a transition, get the state where the transition is leading us.
Definition: ComponentManager.h:63
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
IAlgorithm::sysStart
virtual StatusCode sysStart()=0
Startup method invoked by the framework.
AlgorithmManager::m_algTypeAliases
AlgTypeAliasesMap m_algTypeAliases
Definition: AlgorithmManager.h:94
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
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:341
AlgorithmManager::existsAlgorithm
bool existsAlgorithm(const std::string &name) const override
implementation of IAlgManager::existsAlgorithm
Definition: AlgorithmManager.cpp:108
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:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IOTest.rc
rc
Definition: IOTest.py:101
IAlgorithm::setType
virtual void setType(const std::string &)=0
std::map::find
T find(T... args)
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16
Gaudi::Functional::details::get
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
Definition: FunctionalDetails.h:332
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
ComponentManager::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Definition: ComponentManager.h:29
AlgorithmManager::algorithm
SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
Definition: AlgorithmManager.cpp:93
CommonMessagingBase::err
MsgStream & err() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:95
System::getLastErrorString
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:262
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:92
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ existsAlgorithm()

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

implementation of IAlgManager::existsAlgorithm

Definition at line 108 of file AlgorithmManager.cpp.

108 {
109 return m_algs.end() != std::find( m_algs.begin(), m_algs.end(), name );
110 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
AlgorithmManager::name
const std::string & name() const override
Return the name of the manager (implementation of INamedInterface)
Definition: AlgorithmManager.h:75
std::find
T find(T... args)

## ◆ finalize()

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

Finalize (from INITIALIZED to CONFIGURED).

Definition at line 151 of file AlgorithmManager.cpp.

151 {
152 StatusCode rc;
153 auto it = m_algs.begin();
154 while ( it != m_algs.end() ) { // finalize and remove from the list the managed algorithms
155 if ( it->managed ) {
156 rc = it->algorithm->sysFinalize();
157 if ( rc.isFailure() ) return rc;
158 it = m_algs.erase( it );
159 } else {
160 ++it;
161 }
162 }
163 return rc;
164 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IOTest.rc
rc
Definition: IOTest.py:101

## ◆ getAlgorithms()

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

implementation of IAlgManager::getAlgorithms

Definition at line 113 of file AlgorithmManager.cpp.

113 {
114 m_listOfPtrs.clear();
115 m_listOfPtrs.reserve( m_algs.size() );
116 std::transform( std::begin( m_algs ), std::end( m_algs ), std::back_inserter( m_listOfPtrs ),
117 []( const AlgorithmItem& alg ) { return alg.algorithm.get(); } );
118 return m_listOfPtrs;
119 }
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
AlgorithmManager::m_listOfPtrs
std::vector< IAlgorithm * > m_listOfPtrs
List of pointers to the know services used to implement getAlgorithms()
Definition: AlgorithmManager.h:92
std::end
T end(T... args)
std::vector::clear
T clear(T... args)
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)

## ◆ initialize()

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

Initialization (from CONFIGURED to INITIALIZED).

Definition at line 121 of file AlgorithmManager.cpp.

121 {
122 StatusCode rc;
123 for ( auto& it : m_algs ) {
124 if ( !it.managed || it.algorithm->FSMState() >= Gaudi::StateMachine::INITIALIZED ) continue;
125 rc = it.algorithm->sysInitialize();
126 if ( rc.isFailure() ) return rc;
127 }
128 return rc;
129 }
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IOTest.rc
rc
Definition: IOTest.py:101

## ◆ name()

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

Return the name of the manager (implementation of INamedInterface)

Definition at line 75 of file AlgorithmManager.h.

75 {
76 static const std::string _name = "AlgorithmManager";
77 return _name;
78 }
std::string
STL class.

## ◆ outputLevelUpdate()

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

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

Definition at line 201 of file AlgorithmManager.cpp.

201 {
202 resetMessaging();
203 for ( auto& algItem : m_algs ) {
204 const auto alg = dynamic_cast<Gaudi::Algorithm*>( algItem.algorithm.get() );
205 if ( alg ) alg->resetMessaging();
206 }
207 }
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
CommonMessaging< implements< IComponentManager > >::resetMessaging
MSG::Level resetMessaging()
Reinitialize internal states.
Definition: CommonMessaging.h:174

## ◆ reinitialize()

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

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

Definition at line 166 of file AlgorithmManager.cpp.

166 {
167 StatusCode rc;
168 for ( auto& it : m_algs ) {
169 if ( !it.managed ) continue;
170 rc = it.algorithm->sysReinitialize();
171 if ( rc.isFailure() ) {
172 this->error() << "Unable to re-initialize algorithm: " << it.algorithm->name() << endmsg;
173 return rc;
174 }
175 }
176 return rc;
177 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IOTest.rc
rc
Definition: IOTest.py:101
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:192

## ◆ removeAlgorithm()

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

implementation of IAlgManager::removeAlgorithm

Definition at line 30 of file AlgorithmManager.cpp.

30 {
31 auto it = std::find( m_algs.begin(), m_algs.end(), alg );
32 if ( it != m_algs.end() ) {
33 m_algs.erase( it );
34 return StatusCode::SUCCESS;
35 }
36 return StatusCode::FAILURE;
37 }
ManySmallAlgs.alg
alg
Definition: ManySmallAlgs.py:69
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:85
std::find
T find(T... args)
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86

## ◆ restart()

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

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Definition at line 179 of file AlgorithmManager.cpp.

179 {
180 SmartIF<IAlgExecStateSvc> m_aess;
181 m_aess = serviceLocator()->service( "AlgExecStateSvc" );
182 if ( !m_aess.isValid() ) {
183 fatal() << "Error retrieving AlgExecStateSvc" << endmsg;
184 return StatusCode::FAILURE;
185 }
186
187 StatusCode rc;
188
189 for ( auto& it : m_algs ) {
190 if ( !it.managed ) continue;
191 rc = it.algorithm->sysRestart();
192 m_aess->resetErrorCount( it.algorithm );
193 if ( rc.isFailure() ) {
194 this->error() << "Unable to re-initialize algorithm: " << it.algorithm->name() << endmsg;
195 return rc;
196 }
197 }
198 return rc;
199 }
SmartIF< IAlgExecStateSvc >
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
SmartIF::isValid
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:62
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:76
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:98
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IOTest.rc
rc
Definition: IOTest.py:101
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:86
ComponentManager::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Definition: ComponentManager.h:29
CommonMessagingBase::fatal
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Definition: CommonMessaging.h:92
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:192

## ◆ start()

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

Start (from INITIALIZED to RUNNING).

Definition at line 131 of file AlgorithmManager.cpp.

131 {
132 StatusCode rc;
133 for ( auto& it : m_algs ) {
134 if ( !it.managed || it.algorithm->FSMState() >= Gaudi::StateMachine::RUNNING ) continue;
135 rc = it.algorithm->sysStart();
136 if ( rc.isFailure() ) return rc;
137 }
138 return rc;
139 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IOTest.rc
rc
Definition: IOTest.py:101
Gaudi::StateMachine::RUNNING
Definition: StateMachine.h:16

## ◆ stop()

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

Stop (from RUNNING to INITIALIZED).

Definition at line 141 of file AlgorithmManager.cpp.

141 {
142 StatusCode rc;
143 for ( auto& it : m_algs ) {
144 if ( !it.managed ) continue;
145 rc = it.algorithm->sysStop();
146 if ( rc.isFailure() ) return rc;
147 }
148 return rc;
149 }
AlgorithmManager::m_algs
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
Definition: AlgorithmManager.h:89
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
IOTest.rc
rc
Definition: IOTest.py:101

## ◆ typeAliases() [1/2]

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

Definition at line 82 of file AlgorithmManager.h.

82 { return m_algTypeAliases; }
AlgorithmManager::m_algTypeAliases
AlgTypeAliasesMap m_algTypeAliases
Definition: AlgorithmManager.h:94

## ◆ typeAliases() [2/2]

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

Definition at line 83 of file AlgorithmManager.h.

83 { return m_algTypeAliases; }
AlgorithmManager::m_algTypeAliases
AlgTypeAliasesMap m_algTypeAliases
Definition: AlgorithmManager.h:94

## Member Data Documentation

## ◆ m_algs

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

algorithms maintained by AlgorithmManager

Definition at line 89 of file AlgorithmManager.h.

## ◆ m_algTypeAliases

AlgTypeAliasesMap AlgorithmManager::m_algTypeAliases
| private

Definition at line 94 of file AlgorithmManager.h.

## ◆ m_listOfPtrs

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

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

Definition at line 92 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