| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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/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 {
30 public:
31 typedef std::vector<EventSelectorDataStream*> Streams;
32 typedef std::vector<Gaudi::Property<std::string>> Properties;
33
35 DataStreamTool( const std::string& type, const std::string& name, const IInterface* parent );
36
37 ~DataStreamTool() override = default;
38
39 StatusCode initialize() override;
40
41 StatusCode finalize() override;
42
44 StatusCode initializeStream( EventSelectorDataStream* ) override;
45
47 StatusCode finalizeStream( EventSelectorDataStream* ) override;
48
49 StatusCode getNextStream( const EventSelectorDataStream*&, size_type& ) override;
50
51 StatusCode getPreviousStream( const EventSelectorDataStream*&, size_type& ) override;
52
53 StatusCode addStream( const std::string& ) override;
54
55 StatusCode addStreams( const StreamSpecs& ) override;
56
57 StatusCode eraseStream( const std::string& ) override;
59 EventSelectorDataStream* getStream( const std::string& ) override;
60
61 EventSelectorDataStream* getStream( size_type ) override;
62
63 EventSelectorDataStream* lastStream() override;
64
65 size_type size() override { return m_streams.size(); };
66
67 StatusCode clear() override;
68
69 virtual Streams& getStreams() { return m_streams; };
70
71 virtual Streams::iterator beginOfStreams() { return m_streams.begin(); };
72
73 virtual Streams::iterator endOfStreams() { return m_streams.end(); };
74
75 protected:
76 StatusCode createSelector( const std::string&, const std::string&, IEvtSelector*& ) override;
77
78 StatusCode createStream( const std::string&, const std::string&, EventSelectorDataStream*& ) override;
79
81 StatusCode connectStream( EventSelectorDataStream* );
83 StatusCode connectStream( const std::string& );
84
85 size_type m_streamID = 0;
86
87 size_type m_streamCount = 0;
88
89 Streams m_streams;
90
91 StreamSpecs m_streamSpecs;
92
94 SmartIF<IIncidentSvc> m_incidentSvc = nullptr;
95
96 Streams::iterator getStreamIterator( const std::string& );
97
98 private:
100 DataStreamTool( const DataStreamTool& ) = delete;
102 DataStreamTool& operator=( const DataStreamTool& ) = delete;
103 };
104 #endif // GAUDIKERNEL_DATASTREAMTOOL_H
DataStreamTool
Definition: DataStreamTool.h:28
SmartIF< IIncidentSvc >
DataStreamTool::Properties
std::vector< Gaudi::Property< std::string > > Properties
Definition: DataStreamTool.h:32
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
DataStreamTool::beginOfStreams
virtual Streams::iterator beginOfStreams()
Definition: DataStreamTool.h:71
DataStreamTool::Streams
std::vector< EventSelectorDataStream * > Streams
Definition: DataStreamTool.h:31
IEvtSelector
The Event Selector Interface.
Definition: IEvtSelector.h:18
AlgTool.h
DataStreamTool::endOfStreams
virtual Streams::iterator endOfStreams()
Definition: DataStreamTool.h:73
IDataStreamTool.h
operator=
PropertyMgr & operator=(const PropertyMgr &)=delete
std::string
STL class.
DataStreamTool::size
size_type size() override
Definition: DataStreamTool.h:65
Service.h
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
gaudirun.type
type
Definition: gaudirun.py:125
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:89
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
DataStreamTool::m_streamSpecs
StreamSpecs m_streamSpecs
Definition: DataStreamTool.h:91
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23
DataStreamTool::getStreams
virtual Streams & getStreams()
Definition: DataStreamTool.h:69