24 template <Gaudi::StateMachine::Transition TR>
25 class OutStreamTransition {
30 void operator()( ItemType& item );
40 void OutStreamTransition<Gaudi::StateMachine::INITIALIZE>::operator()( ItemType& item ) {
41 const StatusCode sc = item.second->sysInitialize();
48 void OutStreamTransition<Gaudi::StateMachine::START>::operator()( ItemType& item ) {
56 void OutStreamTransition<Gaudi::StateMachine::STOP>::operator()( ItemType& item ) {
64 void OutStreamTransition<Gaudi::StateMachine::FINALIZE>::operator()( ItemType& item ) {
65 const StatusCode sc = item.second->sysFinalize();
73 template <Gaudi::StateMachine::Transition TR>
75 OutStreamTransition<TR> trans(
msg() );
77 return trans.result();
89 m_algMgr = service(
"ApplicationMgr" );
97 return i_outStreamTransition<Gaudi::StateMachine::INITIALIZE>();
106 return i_outStreamTransition<Gaudi::StateMachine::START>();
125 if (
alg->execState(
ctx ).state() != AlgExecState::State::Done ) {
128 this->warning() <<
name <<
" already executed for the current event" <<
endmsg;
131 this->warning() <<
"invalid OuputStream " <<
name <<
endmsg;
144 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::FINALIZE>();
159 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::STOP>();
176 warning() <<
"OutputStream instance " << outStream.
name() <<
" already added, ignoring " << outStream <<
endmsg;
virtual SmartIF< IAlgorithm > & algorithm(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
Definition of the MsgStream class used to transmit messages.
Define general base for Gaudi exception.
OutStreamsMapType m_outputStreams
Internal storage for the OutputStreams to call.
virtual StatusCode traverseSubTree(std::string_view sub_tree_path, IDataStoreAgent *pAgent)=0
Analyse by traversing all data objects below the sub tree identified by its full path name.
StatusCode finalize() override
Algorithm finalization.
StatusCode initialize() override
standard initialization method
WARN_UNUSED StatusCode Error(const std::string &msg, const StatusCode st=StatusCode::FAILURE, const size_t mx=10) const
Print the error message and return with the given StatusCode.
constexpr static const auto SUCCESS
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.
Gaudi::Property< std::vector< std::string > > m_outputStreamNames
const std::string & name() const
This class is used for returning status codes from appropriate routines.
StatusCode finalize() override
standard finalization method
iterator find(const key_type &key)
GAUDI_API const EventContext & currentContext()
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.
StatusCode execute() override
Algorithm execution.
StatusCode start() override
Algorithm initialization.
constexpr static const auto FAILURE
StatusCode initialize() override
Algorithm initialization.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
SmartIF< IDataManagerSvc > m_evtMgr
SmartIF< IAlgManager > m_algMgr
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.