26 template <Gaudi::StateMachine::Transition TR>
27 class OutStreamTransition
45 const StatusCode sc = item.second->sysInitialize();
72 const StatusCode sc = item.second->sysFinalize();
80 template <Gaudi::StateMachine::Transition TR>
83 OutStreamTransition<TR> trans(
msg() );
84 std::for_each( m_outputStreams.begin(), m_outputStreams.end(), trans );
85 return trans.result();
98 m_algMgr = service(
"ApplicationMgr" );
99 if (
UNLIKELY( !m_algMgr ) )
return Error(
"cannot retrieve IAlgManager" );
102 if (
UNLIKELY( !m_evtMgr ) )
return Error(
"cannot retrieve IDataManagerSvc " );
106 return i_outStreamTransition<Gaudi::StateMachine::INITIALIZE>();
116 return i_outStreamTransition<Gaudi::StateMachine::START>();
125 bool analyse(
IRegistry* pRegistry,
int lvl )
override 140 OutputStreamsCollector collector;
155 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::FINALIZE>();
158 m_outputStreams.clear();
171 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::STOP>();
183 if ( m_outputStreams.find( algId ) == m_outputStreams.end() ) {
184 m_outputStreams[algId] = m_algMgr->algorithm( outStream );
185 if ( !m_outputStreams[algId] ) {
189 warning() <<
"OutputStream instance " << outStream.
name() <<
" already added, ignoring " << outStream <<
endmsg;
constexpr static const auto FAILURE
Definition of the MsgStream class used to transmit messages.
Define general base for Gaudi exception.
Helper class to call the required OutputStream.
StatusCode finalize() override
Algorithm finalization.
StatusCode initialize() override
standard initialization method
virtual const name_type & name() const =0
Name of the directory (or key)
#define DECLARE_COMPONENT(type)
StatusCode i_outStreamTransition()
Helper function to call the transition on the contained OutputStreams.
Helper class to parse a string of format "type/name".
StatusCode stop() override
Algorithm finalization.
This class is used for returning status codes from appropriate routines.
StatusCode finalize() override
standard finalization method
The IRegistry represents the entry door to the environment any data object residing in a transient da...
void i_addOutputStream(const Gaudi::Utils::TypeNameString &outStream)
Add a new algorithm to the list of OutputStreams.
Helper class to fill the internal map of OutputStreams.
constexpr static const auto SUCCESS
StatusCode execute() override
Algorithm execution.
Generic data agent interface.
virtual Out operator()(const vector_of_const_< In > &inputs) const =0
StatusCode start() override
Algorithm initialization.
StatusCode start() override
the default (empty) implementation of IStateful::start() method
StatusCode initialize() override
Algorithm initialization.
const std::string & name() const
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.
static const std::string locationRoot()
Return the path in the Transient Store used to record the triggered instances.