Loading [MathJax]/extensions/tex2jax.js
Go to the documentation of this file.
34 template <Gaudi::StateMachine::Transition TR>
35 class OutStreamTransition {
40 void operator()( ItemType& item );
50 void OutStreamTransition<Gaudi::StateMachine::INITIALIZE>::operator()( ItemType& item ) {
51 const StatusCode sc = item.second->sysInitialize();
58 void OutStreamTransition<Gaudi::StateMachine::START>::operator()( ItemType& item ) {
66 void OutStreamTransition<Gaudi::StateMachine::STOP>::operator()( ItemType& item ) {
74 void OutStreamTransition<Gaudi::StateMachine::FINALIZE>::operator()( ItemType& item ) {
75 const StatusCode sc = item.second->sysFinalize();
83 template <Gaudi::StateMachine::Transition TR>
85 OutStreamTransition<TR> trans(
msg() );
87 return trans.result();
100 if ( !
m_algMgr )
return Error(
"cannot retrieve IAlgManager" );
103 if ( !
m_evtMgr )
return Error(
"cannot retrieve IDataManagerSvc " );
107 return i_outStreamTransition<Gaudi::StateMachine::INITIALIZE>();
116 return i_outStreamTransition<Gaudi::StateMachine::START>();
128 if ( lvl > 0 ) names.push_back( pReg->name() );
135 SmartIF<IAlgorithm>& alg = this->m_outputStreams[name];
137 const auto& ctx = Gaudi::Hive::currentContext();
138 if ( alg->execState( ctx ).state() != AlgExecState::State::Done ) {
139 alg->sysExecute( ctx ).ignore( );
141 this->warning() << name <<
" already executed for the current event" << endmsg;
144 this->warning() <<
"invalid OuputStream " << name << endmsg;
157 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::FINALIZE>();
172 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::STOP>();
189 warning() <<
"OutputStream instance " << outStream.
name() <<
" already added, ignoring " << outStream <<
endmsg;
StatusCode execute() override
Algorithm execution.
StatusCode finalize() override
standard finalization method
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.
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
StatusCode initialize() override
standard initialization 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.
SmartIF< IAlgManager > m_algMgr
StatusCode stop() override
Algorithm finalization.
StatusCode finalize() override
Algorithm finalization.
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
StatusCode Error(std::string_view msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
SmartIF< IDataManagerSvc > m_evtMgr