Go to the documentation of this file.
30 template <Gaudi::StateMachine::Transition TR>
31 class OutStreamTransition {
36 void operator()( ItemType& item );
46 void OutStreamTransition<Gaudi::StateMachine::INITIALIZE>::operator()( ItemType& item ) {
47 const StatusCode sc = item.second->sysInitialize();
54 void OutStreamTransition<Gaudi::StateMachine::START>::operator()( ItemType& item ) {
62 void OutStreamTransition<Gaudi::StateMachine::STOP>::operator()( ItemType& item ) {
70 void OutStreamTransition<Gaudi::StateMachine::FINALIZE>::operator()( ItemType& item ) {
71 const StatusCode sc = item.second->sysFinalize();
79 template <Gaudi::StateMachine::Transition TR>
81 OutStreamTransition<TR> trans(
msg() );
83 return trans.result();
97 error() <<
"cannot retrieve IAlgManager" <<
endmsg;
103 error() <<
"cannot retrieve IDataManagerSvc" <<
endmsg;
109 return i_outStreamTransition<Gaudi::StateMachine::INITIALIZE>();
118 return i_outStreamTransition<Gaudi::StateMachine::START>();
130 if ( lvl > 0 ) names.push_back( pReg->name() );
137 SmartIF<IAlgorithm>& alg = this->m_outputStreams[name];
139 const auto& ctx = Gaudi::Hive::currentContext();
140 if ( alg->execState( ctx ).state() != AlgExecState::State::Done ) {
141 alg->sysExecute( ctx ).ignore( );
143 this->warning() << name <<
" already executed for the current event" << endmsg;
146 this->warning() <<
"invalid OuputStream " << name << endmsg;
159 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::FINALIZE>();
174 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::STOP>();
191 warning() <<
"OutputStream instance " << outStream.
name() <<
" already added, ignoring " << outStream <<
endmsg;
StatusCode execute() override
Algorithm execution.
const std::string & name() const
const std::string & name() const override
The identifying name of the algorithm object.
iterator find(const key_type &key)
StatusCode i_outStreamTransition()
Helper function to call the transition on the contained OutputStreams.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Helper class to fill the internal map of OutputStreams.
StatusCode start() override
Algorithm initialization.
StatusCode start() override
the default (empty) implementation of IStateful::start() method
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
void i_addOutputStream(const Gaudi::Utils::TypeNameString &outStream)
Add a new algorithm to the list of OutputStreams.
Helper class to parse a string of format "type/name".
OutStreamsMapType m_outputStreams
Internal storage for the OutputStreams to call.
Gaudi::Property< std::vector< std::string > > m_outputStreamNames
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.
SmartIF< IAlgManager > m_algMgr
StatusCode stop() override
Algorithm finalization.
StatusCode finalize() override
Algorithm finalization.
StatusCode finalize() override
the default (empty) implementation of IStateful::finalize() method
constexpr static const auto SUCCESS
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
#define DECLARE_COMPONENT(type)
StatusCode service(std::string_view name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
StatusCode initialize() override
Algorithm initialization.
constexpr static const auto FAILURE
StatusCode stop() override
the default (empty) implementation of IStateful::stop() method
SmartIF< IDataManagerSvc > m_evtMgr