| The Gaudi Framework v32r1 (f65d50dc)

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
5 #include "GaudiAlg/GaudiAlgorithm.h"
6 #include "GaudiKernel/HashMap.h"
7 #include "GaudiKernel/SmartIF.h"
8 #include "GaudiKernel/ThreadLocalContext.h"
9
10 class IAlgManager;
11 struct IDataManagerSvc;
12
19 class ReplayOutputStream : public GaudiAlgorithm {
20 public:
22 using GaudiAlgorithm::GaudiAlgorithm;
23
24 StatusCode initialize() override;
25 StatusCode start() override;
26 StatusCode execute() override;
27 StatusCode stop() override;
28 StatusCode finalize() override;
29
31 typedef GaudiUtils::HashMap<std::string, SmartIF<IAlgorithm>> OutStreamsMapType;
32
33 private:
35 void i_addOutputStream( const Gaudi::Utils::TypeNameString& outStream );
36
38 class OutStreamAdder {
39 public:
40 OutStreamAdder( ReplayOutputStream* ptr ) : m_ptr( ptr ) {}
41 inline void operator()( const Gaudi::Utils::TypeNameString& outStream ) { m_ptr->i_addOutputStream( outStream ); }
42
43 private:
44 ReplayOutputStream* m_ptr;
45 };
46
49 template <Gaudi::StateMachine::Transition TR>
50 StatusCode i_outStreamTransition();
51
52 Gaudi::Property<std::vector<std::string>> m_outputStreamNames{
53 this, "OutputStreams", {}, "OutputStream instances that can be called."};
54
56 OutStreamsMapType m_outputStreams;
57
58 SmartIF<IAlgManager> m_algMgr;
59 SmartIF<IDataManagerSvc> m_evtMgr;
60 };
61
62 #endif // COMPONENT_REPLAYOUTPUTSTREAM_H
SmartIF< IAlgManager >
ReplayOutputStream
Definition: ReplayOutputStream.h:19
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:352
ReplayOutputStream::m_outputStreams
OutStreamsMapType m_outputStreams
Internal storage for the OutputStreams to call.
Definition: ReplayOutputStream.h:56
IDataManagerSvc
Definition: IDataManagerSvc.h:45
ReplayOutputStream::finalize
StatusCode finalize() override
Algorithm finalization.
Definition: ReplayOutputStream.cpp:141
ThreadLocalContext.h
GaudiAlgorithm.h
Header file for class GaudiAlgorithm.
IAlgManager
The IAlgManager is the interface implemented by the Algorithm Factory in the Application Manager to s...
Definition: IAlgManager.h:27
ReplayOutputStream::OutStreamAdder::m_ptr
ReplayOutputStream * m_ptr
Definition: ReplayOutputStream.h:44
HashMap.h
ReplayOutputStream::i_outStreamTransition
StatusCode i_outStreamTransition()
Helper function to call the transition on the contained OutputStreams.
Definition: ReplayOutputStream.cpp:74
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:10
ReplayOutputStream::stop
StatusCode stop() override
Algorithm finalization.
Definition: ReplayOutputStream.cpp:156
ReplayOutputStream::m_outputStreamNames
Gaudi::Property< std::vector< std::string > > m_outputStreamNames
Definition: ReplayOutputStream.h:52
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
SmartIF.h
GaudiAlgorithm
The useful base class for data processing algorithms.
Definition: GaudiAlgorithm.h:94
ReplayOutputStream::i_addOutputStream
void i_addOutputStream(const Gaudi::Utils::TypeNameString &outStream)
Add a new algorithm to the list of OutputStreams.
Definition: ReplayOutputStream.cpp:166
ReplayOutputStream::OutStreamAdder
Helper class to fill the internal map of OutputStreams.
Definition: ReplayOutputStream.h:38
ReplayOutputStream::execute
StatusCode execute() override
Algorithm execution.
Definition: ReplayOutputStream.cpp:112
ReplayOutputStream::start
StatusCode start() override
Algorithm initialization.
Definition: ReplayOutputStream.cpp:100
ReplayOutputStream::OutStreamsMapType
GaudiUtils::HashMap< std::string, SmartIF< IAlgorithm > > OutStreamsMapType
Class used to hold the OutputStream instances.
Definition: ReplayOutputStream.h:31
GaudiUtils::HashMap
Common class providing an architecture-independent hash map.
Definition: HashMap.h:73
ReplayOutputStream::initialize
StatusCode initialize() override
Algorithm initialization.
Definition: ReplayOutputStream.cpp:83
ReplayOutputStream::OutStreamAdder::operator()
void operator()(const Gaudi::Utils::TypeNameString &outStream)
Definition: ReplayOutputStream.h:41
ReplayOutputStream::m_evtMgr
SmartIF< IDataManagerSvc > m_evtMgr
Definition: ReplayOutputStream.h:59
ReplayOutputStream::OutStreamAdder::OutStreamAdder
OutStreamAdder(ReplayOutputStream *ptr)
Definition: ReplayOutputStream.h:40
ReplayOutputStream::m_algMgr
SmartIF< IAlgManager > m_algMgr
Definition: ReplayOutputStream.h:58
GaudiAlgorithm::GaudiAlgorithm
GaudiAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
Definition: GaudiAlgorithm.cpp:35