| The Gaudi Framework v32r1 (f65d50dc)

DataStreamTool.h
Go to the documentation of this file.
1 #ifndef GAUDIKERNEL_DATASTREAMTOOL_H
2 #define GAUDIKERNEL_DATASTREAMTOOL_H 1
3
4 // Include files
5
6 #include <vector>
7
8 // from Gaudi
9 #include "GaudiKernel/AlgTool.h"
10 #include "GaudiKernel/IDataStreamTool.h"
11 #include "GaudiKernel/IEvtSelector.h"
12 #include "GaudiKernel/IIncidentSvc.h"
13 #include "GaudiKernel/Service.h"
14
15 class IIncidentSvc;
16
28 class GAUDI_API DataStreamTool : public extends<AlgTool, IDataStreamTool> {
29 public:
30 typedef std::vector<EventSelectorDataStream*> Streams;
31 typedef std::vector<Gaudi::Property<std::string>> Properties;
32
34 using extends::extends;
35
36 StatusCode initialize() override;
37
38 StatusCode finalize() override;
39
41 StatusCode initializeStream( EventSelectorDataStream* ) override;
42
44 StatusCode finalizeStream( EventSelectorDataStream* ) override;
45
46 StatusCode getNextStream( const EventSelectorDataStream*&, size_type& ) override;
47
48 StatusCode getPreviousStream( const EventSelectorDataStream*&, size_type& ) override;
49
50 StatusCode addStream( const std::string& ) override;
51
52 StatusCode addStreams( const StreamSpecs& ) override;
53
54 StatusCode eraseStream( const std::string& ) override;
56 EventSelectorDataStream* getStream( const std::string& ) override;
57
58 EventSelectorDataStream* getStream( size_type ) override;
59
60 EventSelectorDataStream* lastStream() override;
61
62 size_type size() override { return m_streams.size(); };
63
64 StatusCode clear() override;
65
66 virtual Streams& getStreams() { return m_streams; };
67
68 virtual Streams::iterator beginOfStreams() { return m_streams.begin(); };
69
70 virtual Streams::iterator endOfStreams() { return m_streams.end(); };
71
72 protected:
73 StatusCode createSelector( const std::string&, const std::string&, IEvtSelector*& ) override;
74
75 StatusCode createStream( const std::string&, const std::string&, EventSelectorDataStream*& ) override;
76
78 StatusCode connectStream( EventSelectorDataStream* );
80 StatusCode connectStream( const std::string& );
81
82 size_type m_streamID = 0;
83
84 size_type m_streamCount = 0;
85
86 Streams m_streams;
87
88 StreamSpecs m_streamSpecs;
89
91 SmartIF<IIncidentSvc> m_incidentSvc = nullptr;
92
93 Streams::iterator getStreamIterator( const std::string& );
94
95 private:
97 DataStreamTool( const DataStreamTool& ) = delete;
99 DataStreamTool& operator=( const DataStreamTool& ) = delete;
100 };
101 #endif // GAUDIKERNEL_DATASTREAMTOOL_H
DataStreamTool
Definition: DataStreamTool.h:28
SmartIF< IIncidentSvc >
DataStreamTool::Properties
std::vector< Gaudi::Property< std::string > > Properties
Definition: DataStreamTool.h:31
DataStreamTool::beginOfStreams
virtual Streams::iterator beginOfStreams()
Definition: DataStreamTool.h:68
DataStreamTool::Streams
std::vector< EventSelectorDataStream * > Streams
Definition: DataStreamTool.h:30
IEvtSelector
The Event Selector Interface.
Definition: IEvtSelector.h:18
AlgTool.h
DataStreamTool::endOfStreams
virtual Streams::iterator endOfStreams()
Definition: DataStreamTool.h:70
IDataStreamTool.h
std::string
STL class.
DataStreamTool::size
size_type size() override
Definition: DataStreamTool.h:62
Service.h
IIncidentSvc.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
std::vector< EventSelectorDataStream * >
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
EventSelectorDataStream
Definition of class EventSelectorDataStream.
Definition: EventSelectorDataStream.h:45
IEvtSelector.h
DataStreamTool::m_streams
Streams m_streams
Definition: DataStreamTool.h:86
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:71
DataStreamTool::m_streamSpecs
StreamSpecs m_streamSpecs
Definition: DataStreamTool.h:88
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23
DataStreamTool::getStreams
virtual Streams & getStreams()
Definition: DataStreamTool.h:66