Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
42 if ( it !=
m_algs.end() ) {
51 bool managed,
bool checkIfExists ) {
53 if ( checkIfExists ) {
61 if ( ( actualalgtype.
size() > 8 ) && ( actualalgtype.
compare( 0, 8,
"unalias:" ) == 0 ) ) {
62 actualalgtype = actualalgtype.
substr( 8 );
69 this->error() <<
"Algorithm of type " << actualalgtype <<
" is unknown (No factory available)." <<
endmsg;
76 this->error() <<
"More information may be available by setting the global jobOpt \"PluginDebugLevel\" to 1"
82 fatal() <<
"Incompatible interface IAlgorithm version for " << actualalgtype <<
endmsg;
98 if ( !
rc.isSuccess() ) { this->error() <<
"Failed to initialize algorithm: [" << algname <<
"]" <<
endmsg; }
105 if ( it !=
m_algs.end() ) {
106 return it->algorithm;
133 for (
auto& it :
m_algs ) {
135 rc = it.algorithm->sysInitialize();
136 if (
rc.isFailure() )
return rc;
143 for (
auto& it :
m_algs ) {
145 rc = it.algorithm->sysStart();
146 if (
rc.isFailure() )
return rc;
153 for (
auto& it :
m_algs ) {
154 if ( !it.managed )
continue;
155 rc = it.algorithm->sysStop();
156 if (
rc.isFailure() )
return rc;
164 while ( it !=
m_algs.end() ) {
166 rc = it->algorithm->sysFinalize();
167 if (
rc.isFailure() )
return rc;
178 for (
auto& it :
m_algs ) {
179 if ( !it.managed )
continue;
180 rc = it.algorithm->sysReinitialize();
181 if (
rc.isFailure() ) {
182 this->error() <<
"Unable to re-initialize algorithm: " << it.algorithm->name() <<
endmsg;
193 fatal() <<
"Error retrieving AlgExecStateSvc" <<
endmsg;
199 for (
auto& it :
m_algs ) {
200 if ( !it.managed )
continue;
201 rc = it.algorithm->sysRestart();
202 m_aess->resetErrorCount( it.algorithm );
203 if (
rc.isFailure() ) {
204 this->error() <<
"Unable to re-initialize algorithm: " << it.algorithm->name() <<
endmsg;
213 for (
auto& algItem :
m_algs ) {
215 if (
alg )
alg->resetMessaging();
Gaudi::StateMachine::State targetFSMState() const override
When we are in the middle of a transition, get the state where the transition is leading us.
AlgTypeAliasesMap m_algTypeAliases
bool existsAlgorithm(std::string_view name) const override
implementation of IAlgManager::existsAlgorithm
StatusCode restart() override
Initialization (from RUNNING to RUNNING, via INITIALIZED).
MSG::Level resetMessaging()
Reinitialize internal states.
T back_inserter(T... args)
void outputLevelUpdate() override
Function to call to update the outputLevel of the components (after a change in MessageSvc).
StatusCode finalize() override
Finalize (from INITIALIZED to CONFIGURED).
std::vector< IAlgorithm * > m_listOfPtrs
List of pointers to the know services used to implement getAlgorithms()
bool isValid() const
Allow for check if smart pointer is valid.
Helper class to parse a string of format "type/name".
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
StatusCode createAlgorithm(std::string algtype, std::string algname, IAlgorithm *&algorithm, bool managed=false, bool checkIfExists=true) override
implementation of IAlgManager::createAlgorithm
Base class from which all concrete algorithm classes should be derived.
StatusCode initialize() override
Initialization (from CONFIGURED to INITIALIZED).
StatusCode removeAlgorithm(IAlgorithm *alg) override
implementation of IAlgManager::removeAlgorithm
StatusCode start() override
Start (from INITIALIZED to RUNNING).
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< ISvcLocator > & serviceLocator() const override
std::vector< AlgorithmItem > m_algs
algorithms maintained by AlgorithmManager
const std::string & name() const override
Return the name of the manager (implementation of INamedInterface)
SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true) override
StatusCode addAlgorithm(IAlgorithm *alg) override
implementation of IAlgManager::addAlgorithm
constexpr static const auto SUCCESS
std::string typeName(const std::type_info &typ)
bool isValidInterface(IFace *i)
Templated function that throws an exception if the version if the interface implemented by the object...
AlgorithmManager(IInterface *iface)
default creator
constexpr static const auto FAILURE
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
StatusCode reinitialize() override
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
const std::vector< IAlgorithm * > & getAlgorithms() const override
implementation of IAlgManager::getAlgorithms
StatusCode stop() override
Stop (from RUNNING to INITIALIZED).