3 #include "GaudiKernel/IAlgorithm.h"
4 #include "GaudiKernel/Algorithm.h"
5 #include "GaudiKernel/ISvcLocator.h"
6 #include "GaudiKernel/System.h"
7 #include "GaudiKernel/MsgStream.h"
8 #include "GaudiKernel/TypeNameString.h"
46 const std::string& algname,
55 std::string actualalgtype(algtype);
57 if ((actualalgtype.size() > 8) && (actualalgtype.substr(0, 8) ==
"unalias:")) {
58 actualalgtype = actualalgtype.substr(8);
62 actualalgtype = typeAlias->second;
65 algorithm = Algorithm::Factory::create(actualalgtype, algname,
serviceLocator().
get());
69 fatal() <<
"Incompatible interface IAlgorithm version for " << actualalgtype <<
endmsg;
86 this->
error() <<
"Failed to initialize algorithm: [" << algname <<
"]" <<
endmsg;
91 this->
error() <<
"Algorithm of type " << actualalgtype
92 <<
" is unknown (No factory available)." <<
endmsg;
100 this->
error() <<
"More information may be available by setting the global jobOpt \"PluginDebugLevel\" to 1" <<
endmsg;
106 ListAlg::iterator it = std::find(
m_listalg.begin(),
m_listalg.end(), typeName.name());
108 return it->algorithm;
112 if (
createAlgorithm(typeName.type(), typeName.name(), alg,
true).isSuccess()) {
132 [](ListAlg::const_reference alg) {
133 return const_cast<IAlgorithm*
>(alg.algorithm.get());
140 ListAlg::iterator it;
142 if (!it->managed)
continue;
143 rc = it->algorithm->sysInitialize();
151 ListAlg::iterator it;
153 if (!it->managed)
continue;
154 rc = it->algorithm->sysStart();
162 ListAlg::iterator it;
164 if (!it->managed)
continue;
165 rc = it->algorithm->sysStop();
173 ListAlg::iterator it =
m_listalg.begin();
176 rc = it->algorithm->sysFinalize();
188 ListAlg::iterator it;
190 if (!it->managed)
continue;
191 rc = it->algorithm->sysReinitialize();
193 this->
error() <<
"Unable to re-initialize algorithm: " << it->algorithm->name() <<
endmsg;
202 ListAlg::iterator it;
204 if (!it->managed)
continue;
205 rc = it->algorithm->sysRestart();
207 this->
error() <<
"Unable to re-initialize algorithm: " << it->algorithm->name() <<
endmsg;