All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ReplayOutputStream.h
Go to the documentation of this file.
1 #ifndef COMPONENT_REPLAYOUTPUTSTREAM_H
2 #define COMPONENT_REPLAYOUTPUTSTREAM_H 1
3 // Include files
4 // from Gaudi
6 #include "GaudiKernel/HashMap.h"
7 #include "GaudiKernel/SmartIF.h"
8 
9 class IAlgManager;
10 class IDataManagerSvc;
11 
19 public:
21  ReplayOutputStream(const std::string& name, ISvcLocator* pSvcLocator);
22  virtual ~ReplayOutputStream();
23 
24  virtual StatusCode initialize();
25  virtual StatusCode start ();
26  virtual StatusCode execute ();
27  virtual StatusCode stop ();
28  virtual StatusCode finalize ();
29 
32 
33 protected:
34 private:
35 
37  void i_addOutputStream(const Gaudi::Utils::TypeNameString &outStream);
38 
41  public:
43  inline void operator() (const Gaudi::Utils::TypeNameString &outStream) {
44  m_ptr->i_addOutputStream(outStream);
45  }
46  private:
48  };
49 
52  public:
54  inline void operator() (const std::string &name) const {
56  if (alg.isValid()) {
57  if (!alg->isExecuted()) {
58  alg->sysExecute();
59  } else {
60  m_ptr->warning() << name
61  << " already executed for the current event" << endmsg;
62  }
63  } else {
64  m_ptr->warning() << "invalid OuputStream " << name << endmsg;
65  }
66  }
67  private:
69  };
70 
73  template <Gaudi::StateMachine::Transition TR>
75 
77  std::vector<std::string> m_outputStreamNames;
80 
83 };
84 
85 #endif // COMPONENT_REPLAYOUTPUTSTREAM_H
MsgStream & warning() const
shortcut for the method msgStream ( MSG::WARNING )
Definition: GaudiCommon.h:495
ReplayOutputStream(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual StatusCode finalize()
Algorithm finalization.
OutStreamsMapType m_outputStreams
Internal storage for the OutputStreams to call.
Helper class to call the required OutputStream.
virtual StatusCode stop()
Algorithm finalization.
virtual StatusCode start()
Algorithm initialization.
OutStreamTrigger(ReplayOutputStream *ptr)
virtual ~ReplayOutputStream()
Destructor.
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition: IAlgManager.h:28
StatusCode i_outStreamTransition()
Helper function to call the transition on the contained OutputStreams.
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
virtual StatusCode execute()
Algorithm execution.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
The identifying name of the algorithm object.
Definition: Algorithm.cpp:837
The useful base class for data processing algorithms.
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.
GaudiUtils::HashMap< std::string, SmartIF< IAlgorithm > > OutStreamsMapType
Class used to hold the OutputStream instances.
void operator()(const std::string &name) const
Common class providing an architecture-independent hash map.
Definition: HashMap.h:108
void operator()(const Gaudi::Utils::TypeNameString &outStream)
SmartIF< IDataManagerSvc > m_evtMgr
OutStreamAdder(ReplayOutputStream *ptr)
SmartIF< IAlgManager > m_algMgr
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
virtual StatusCode initialize()
Algorithm initialization.