29 declareProperty(
"OutputStreams", m_outputStreamNames,
30 "OutputStream instances that can be called.");
41 template <Gaudi::StateMachine::Transition TR>
42 class OutStreamTransition {
50 void operator() (ItemType &
item);
59 void OutStreamTransition<Gaudi::StateMachine::INITIALIZE>::operator() (ItemType &
item) {
67 void OutStreamTransition<Gaudi::StateMachine::START>::operator() (ItemType &item) {
75 void OutStreamTransition<Gaudi::StateMachine::STOP>::operator() (ItemType &item) {
83 void OutStreamTransition<Gaudi::StateMachine::FINALIZE>::operator() (ItemType &item) {
84 const StatusCode sc = item.second->sysFinalize();
93 template <Gaudi::StateMachine::Transition TR>
95 OutStreamTransition<TR> trans(
msg());
97 return trans.result();
111 return Error(
"cannot retrieve IAlgManager");
116 return Error(
"cannot retrieve IDataManagerSvc ");
122 return i_outStreamTransition<Gaudi::StateMachine::INITIALIZE>();
131 return i_outStreamTransition<Gaudi::StateMachine::START>();
139 std::list<std::string>
names;
154 OutputStreamsCollector collector;
157 std::for_each(collector.names.begin(), collector.names.end(),
169 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::FINALIZE>();
184 StatusCode sc = i_outStreamTransition<Gaudi::StateMachine::STOP>();
194 const std::string algId =
"/" + outStream.
name();
201 warning() <<
"OutputStream instance " << outStream.
name()
202 <<
" already added, ignoring " << outStream <<
endmsg;
MsgStream & warning() const
shortcut for the method msgStream ( MSG::WARNING )
Definition of the MsgStream class used to transmit messages.
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
virtual StatusCode start()
the default (empty) implementation of IStateful::start() method
virtual StatusCode finalize()
Algorithm finalization.
OutStreamsMapType m_outputStreams
Internal storage for the OutputStreams to call.
Helper class to call the required OutputStream.
bool isSuccess() const
Test for a status code of SUCCESS.
virtual bool analyse(IRegistry *pObject, int level)=0
Analyse the data object.
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.
virtual StatusCode stop()
Algorithm finalization.
virtual StatusCode start()
Algorithm initialization.
virtual StatusCode initialize()
standard initialization method
virtual ~ReplayOutputStream()
Destructor.
virtual const name_type & name() const =0
Name of the directory (or key)
bool isFailure() const
Test for a status code of FAILURE.
virtual StatusCode stop()
the default (empty) implementation of IStateful::stop() method
MSG::Level msgLevel() const
The current message service output level.
StatusCode i_outStreamTransition()
Helper function to call the transition on the contained OutputStreams.
virtual StatusCode finalize()
standard finalization method
Helper class to parse a string of format "type/name".
bool isValid() const
Allow for check if smart pointer is valid.
virtual StatusCode execute()
Algorithm execution.
This class is used for returning status codes from appropriate routines.
std::pair< const std::string, SmartIF< IAlgorithm > > value_type
iterator find(const key_type &key)
#define DECLARE_ALGORITHM_FACTORY(x)
virtual const std::string & name() const
The identifying name of the algorithm object.
The useful base class for data processing algorithms.
MsgStream & msg() const
shortcut for the method msgStream ( MSG::INFO )
The IRegistry represents the entry door to the environment any data object residing in a transient da...
MsgStream & debug() const
shortcut for the method msgStream ( MSG::DEBUG )
void i_addOutputStream(const Gaudi::Utils::TypeNameString &outStream)
Add a new algorithm to the list of OutputStreams.
std::vector< std::string > m_outputStreamNames
(property) Type/Name list of OutputStream we have to call.
Helper class to fill the internal map of OutputStreams.
SmartIF< IDataProviderSvc > & evtSvc() const
shortcut for method eventSvc
Generic data agent interface.
const std::string & name() const
SmartIF< IDataManagerSvc > m_evtMgr
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
SmartIF< IAlgManager > m_algMgr
void reset(TYPE *ptr=0)
Set the internal pointer to the passed one disposing of the old one.
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.
virtual StatusCode initialize()
Algorithm initialization.