| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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/Service.h"
10 #include "GaudiKernel/IEvtSelector.h"
11 #include "GaudiKernel/IDataStreamTool.h"
12 #include "GaudiKernel/IIncidentSvc.h"
13 #include "GaudiKernel/AlgTool.h"
14
15 class IIncidentSvc;
16
29 class GAUDI_API DataStreamTool: public extends<AlgTool,
30 IDataStreamTool> {
31 public:
32
33 typedef std::vector<EventSelectorDataStream*> Streams;
34 typedef std::vector<StringProperty> Properties;
35
37 DataStreamTool( const std::string& type,
38 const std::string& name,
39 const IInterface* parent);
40
41 ~DataStreamTool( ) override = default;
42
43 StatusCode initialize() override;
44
45 StatusCode finalize() override;
46
48 StatusCode initializeStream( EventSelectorDataStream* ) override;
49
51 StatusCode finalizeStream( EventSelectorDataStream* ) override;
52
53 StatusCode getNextStream( const EventSelectorDataStream* &, size_type & ) override;
54
55 StatusCode getPreviousStream( const EventSelectorDataStream* &, size_type & ) override;
56
57 StatusCode addStream(const std::string &) override;
58
59 StatusCode addStreams(const StreamSpecs &) override;
60
61 StatusCode eraseStream( const std::string& ) override;
63 EventSelectorDataStream* getStream( const std::string& ) override;
64
65 EventSelectorDataStream* getStream( size_type ) override;
66
67 EventSelectorDataStream* lastStream() override;
68
69 size_type size() override { return m_streams.size(); };
70
71 StatusCode clear() override;
72
73 virtual Streams& getStreams() { return m_streams; };
74
75 virtual Streams::iterator beginOfStreams() {return m_streams.begin(); };
76
77 virtual Streams::iterator endOfStreams() {return m_streams.end(); };
78
79 protected:
80
81 StatusCode createSelector( const std::string& , const std::string& ,
82 IEvtSelector*& ) override;
83
84 StatusCode createStream(const std::string&, const std::string&,
85 EventSelectorDataStream*& ) override;
86
88 StatusCode connectStream( EventSelectorDataStream *);
90 StatusCode connectStream( const std::string & );
91
92 size_type m_streamID = 0;
93
94 size_type m_streamCount = 0;
95
96 Streams m_streams;
97
98 StreamSpecs m_streamSpecs;
99
101 SmartIF<IIncidentSvc> m_incidentSvc = nullptr;
102
103 Streams::iterator getStreamIterator ( const std::string& );
104
105 private:
107 DataStreamTool(const DataStreamTool&) = delete;
109 DataStreamTool& operator= (const DataStreamTool&) = delete;
110
111 };
112 #endif // GAUDIKERNEL_DATASTREAMTOOL_H
DataStreamTool
Definition: DataStreamTool.h:29
SmartIF< IIncidentSvc >
AnalysisTest.initialize
def initialize()
Definition: AnalysisTest.py:12
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
DataStreamTool::beginOfStreams
virtual Streams::iterator beginOfStreams()
Definition: DataStreamTool.h:75
DataStreamTool::Streams
std::vector< EventSelectorDataStream * > Streams
Definition: DataStreamTool.h:33
IEvtSelector
The Event Selector Interface.
Definition: IEvtSelector.h:18
AlgTool.h
DataStreamTool::endOfStreams
virtual Streams::iterator endOfStreams()
Definition: DataStreamTool.h:77
DataStreamTool::Properties
std::vector< StringProperty > Properties
Definition: DataStreamTool.h:34
IDataStreamTool.h
std::string
STL class.
DataStreamTool::size
size_type size() override
Definition: DataStreamTool.h:69
Service.h
gaudirun.type
string type
Definition: gaudirun.py:151
IIncidentSvc.h
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
IInterface
Definition of the basic interface.
Definition: IInterface.h:234
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:96
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
DataStreamTool::m_streamSpecs
StreamSpecs m_streamSpecs
Definition: DataStreamTool.h:98
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:21
DataStreamTool::getStreams
virtual Streams & getStreams()
Definition: DataStreamTool.h:73