2 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 10 template <StatusCode ( Gaudi::Algorithm::*f )(),
typename C>
11 bool for_algorithms( C&
c ) {
13 [](
bool b,
Gaudi::Algorithm* a ) {
return ( a->*f )().isSuccess() && b; } );
21 if ( !for_algorithms<&Algorithm::sysInitialize>(
m_subAlgms ) ) {
22 error() <<
"error initializing one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
35 if ( !for_algorithms<&Algorithm::sysFinalize>(
m_subAlgms ) ) {
36 error() <<
"error finalizing one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
51 if ( !for_algorithms<&Algorithm::sysStart>(
m_subAlgms ) ) {
52 error() <<
"error starting one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
61 if ( !for_algorithms<&Algorithm::sysStop>(
m_subAlgms ) ) {
62 error() <<
"error stopping one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
71 if ( !for_algorithms<&Algorithm::sysReinitialize>(
m_subAlgms ) ) {
72 error() <<
"error re-initializing one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
81 if ( !for_algorithms<&Algorithm::sysRestart>(
m_subAlgms ) ) {
82 error() <<
"error re-restarting one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
93 if ( !for_algorithms<&Algorithm::sysBeginRun>(
m_subAlgms ) ) {
94 error() <<
"error calling beginRun for one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
103 if ( !for_algorithms<&Algorithm::sysEndRun>(
m_subAlgms ) ) {
104 error() <<
"error calling endRun for one or several sub-algorithms of Sequence " <<
name() <<
endmsg;
132 pSubAlgorithm =
dynamic_cast<Algorithm*
>( tmp );
bool isEnabled() const override
Is this algorithm enabled or disabled?
StatusCode restart() override
the default (empty) implementation of IStateful::restart() method
StatusCode start() override
the default (empty) implementation of IStateful::start() method
const std::string & name() const override
The identifying name of the algorithm object.
void acceptDHVisitor(IDataHandleVisitor *) const override
StatusCode endRun() override
endRun method invoked by the framework.
constexpr static const auto SUCCESS
StatusCode stop() override
System stop.
StatusCode reinitialize() override
Reinitialization method invoked by the framework.
virtual void visit(const IDataHandleHolder *)=0
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
StatusCode createSubAlgorithm(const std::string &type, const std::string &name, Algorithm *&pSubAlg)
Create a sub algorithm.
std::vector< Algorithm * > m_subAlgms
Sub algorithms.
This class is used for returning status codes from appropriate routines.
const std::vector< Algorithm * > * subAlgorithms() const
List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
Gaudi::StateMachine::State FSMState() const override
returns the current state of the algorithm
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
StatusCode finalize() override
System finalization.
The IAlgorithm is the interface implemented by the Algorithm base class.
StatusCode beginRun() override
Algorithm begin run.
const std::string & type() const override
The type of the algorithm object.
StatusCode reinitialize() override
the default (empty) implementation of IStateful::reinitialize() method
StatusCode start() override
System start.
StatusCode restart() override
Restart method invoked by the framework.
Base class from which all concrete algorithm classes should be derived.
virtual StatusCode createAlgorithm(const std::string &algtype, const std::string &algname, IAlgorithm *&alg, bool managed=false, bool checkIfExists=true )=0
Create an instance of a algorithm type that has been declared beforehand and assigns to it a name...
constexpr static const auto FAILURE
SmartIF< ISvcLocator > & serviceLocator() const override
The standard service locator.
StatusCode endRun() override
Algorithm end run. This method is called at the end of the event loop.
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode beginRun() override
beginRun method invoked by the framework.
void acceptDHVisitor(IDataHandleVisitor *) const override