| The Gaudi Framework v27r1

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

- File List
- File Members

EventSelector.h
Go to the documentation of this file.
1 //====================================================================
2 // EventSelector.h
3 //--------------------------------------------------------------------
4 //
5 // Package : EventSelector (LHCb Event Selector Package)
6 //
7 // Author : M.Frank
8 // Created : 4/10/00
9 //
10 //====================================================================
11 // Modified : 11/11/06
12 //
13 // Author : Andres Felipe OSORIO OLIVEROS
14 // : Marco CLEMENCIC
15 //
16 //====================================================================
17
18 #ifndef GAUDISVC_EVENTSELECTOR_EVENTSELECTOR_H
19 #define GAUDISVC_EVENTSELECTOR_EVENTSELECTOR_H 1
20
21 // Include files
22 #include "GaudiKernel/Service.h"
23 #include "GaudiKernel/IEvtSelector.h"
24
25 // STL include files
26 #include <vector>
27
28 // Forward declarations
29 class IIncidentSvc;
30 class IAddressCreator;
31 class IToolSvc;
32 class EventSelectorDataStream;
33 class EvtSelectorContext;
34 class IDataStreamTool;
35
53 class EventSelector : public extends<Service,
54 IEvtSelector> {
55 public:
56 typedef std::vector<EventSelectorDataStream*> Streams;
57 typedef std::vector<std::string> StreamSpecs;
58 typedef std::vector<StringProperty> Properties;
59
60 long int m_streamID;
61
62 protected:
64 SmartIF<IIncidentSvc> m_incidentSvc = nullptr;
65
66 SmartIF<IToolSvc> m_toolSvc = nullptr;
67
68 IDataStreamTool* m_streamtool = nullptr;
69
71 bool m_reconfigure = false;
73 StreamSpecs m_streamSpecs;
75 StreamSpecs m_streamSpecsLast;
77 Streams m_streams;
79 int m_streamCount = 0;
81 int m_firstEvent = 0;
83 int m_evtMax = INT_MAX;
85 int m_evtPrintFrequency = 10;
86
87 std::string m_streamManager="DataStreamTool";
88
89
90
92 virtual void printEvtInfo(const EvtSelectorContext* iter) const;
93
94 public:
96 StatusCode initialize() override;
97
99 StatusCode finalize() override;
100
102 StatusCode reinitialize() override;
103
105
109 StatusCode createContext(Context*& refpCtxt) const override;
110
112
116 StatusCode next(Context& refCtxt) const override;
117
119
123 StatusCode next(Context& refCtxt,int jump) const override;
124
126
131 StatusCode previous(Context& refCtxt) const override;
132
134
139 StatusCode previous(Context& refCtxt,int jump) const override;
140
142
146 StatusCode rewind(Context& refCtxt) const override;
147
149
154 StatusCode createAddress(const Context& refCtxt, IOpaqueAddress*& refpAddr) const override;
155
157
161 StatusCode releaseContext(Context*& refCtxt) const override;
162
171 StatusCode resetCriteria(const std::string& cr,Context& c) const override;
172
178 StatusCode last(Context& c) const override;
179
181 StatusCode firstOfNextStream( bool shutDown, EvtSelectorContext& it) const;
183 StatusCode lastOfPreviousStream ( bool shutDown, EvtSelectorContext& it) const;
184
186 EventSelector( const std::string& name, ISvcLocator* svcloc );
187
189 ~EventSelector() override = default;
190 };
191
192 #endif // GAUDISVC_EVENTSELECTOR_EVENTSELECTOR_H
EventSelector::lastOfPreviousStream
StatusCode lastOfPreviousStream(bool shutDown, EvtSelectorContext &it) const
Retrieve last entry of the previous data stream.
Definition: EventSelector.cpp:121
EventSelector::m_incidentSvc
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
Definition: EventSelector.h:64
IToolSvc
The interface implemented by the IToolSvc base class.
Definition: IToolSvc.h:18
SmartIF< IIncidentSvc >
EventSelector::m_evtPrintFrequency
int m_evtPrintFrequency
Printout frequency.
Definition: EventSelector.h:85
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
EventSelector::m_firstEvent
int m_firstEvent
First event to be processed.
Definition: EventSelector.h:81
EventSelector::m_evtMax
int m_evtMax
Maximum number of events to be processed.
Definition: EventSelector.h:83
EventSelector::Streams
std::vector< EventSelectorDataStream * > Streams
Definition: EventSelector.h:56
gaudirun.c
tuple c
Definition: gaudirun.py:391
EventSelector::releaseContext
StatusCode releaseContext(Context *&refCtxt) const override
Release existing event iteration context.
Definition: EventSelector.cpp:331
EventSelector::resetCriteria
StatusCode resetCriteria(const std::string &cr, Context &c) const override
Will set a new criteria for the selection of the next list of events and will change the state of the...
Definition: EventSelector.cpp:32
EventSelector::~EventSelector
~EventSelector() override=default
Standard Destructor.
EventSelector::m_streamtool
IDataStreamTool * m_streamtool
Definition: EventSelector.h:68
EventSelector::m_streams
Streams m_streams
Input streams.
Definition: EventSelector.h:77
IAddressCreator
IAddressCreator interface definition.
Definition: IAddressCreator.h:28
EventSelector::m_streamID
long int m_streamID
Definition: EventSelector.h:60
EventSelector::printEvtInfo
virtual void printEvtInfo(const EvtSelectorContext *iter) const
Progress report.
Definition: EventSelector.cpp:39
EventSelector::firstOfNextStream
StatusCode firstOfNextStream(bool shutDown, EvtSelectorContext &it) const
Retrieve first entry of the next data stream.
Definition: EventSelector.cpp:62
EventSelector::m_streamSpecsLast
StreamSpecs m_streamSpecsLast
Input stream specifiers (last used)
Definition: EventSelector.h:75
std::string
STL class.
Service.h
EventSelector::next
StatusCode next(Context &refCtxt) const override
Get next iteration item from the event loop context.
Definition: EventSelector.cpp:199
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
EventSelector::Properties
std::vector< StringProperty > Properties
Definition: EventSelector.h:58
EventSelector::rewind
StatusCode rewind(Context &refCtxt) const override
Rewind the dataset.
Definition: EventSelector.cpp:288
EventSelector::reinitialize
StatusCode reinitialize() override
Service override: Reinitialize service.
Definition: EventSelector.cpp:406
EventSelector::previous
StatusCode previous(Context &refCtxt) const override
Get previous iteration item from the event loop context.
Definition: EventSelector.cpp:243
EvtSelectorContext
Definition of class EventIterator.
Definition: EventIterator.h:32
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
EventSelector::initialize
StatusCode initialize() override
IService implementation: Db event selector override.
Definition: EventSelector.cpp:350
EventSelector::m_streamSpecs
StreamSpecs m_streamSpecs
Input stream specifiers (for job options)
Definition: EventSelector.h:73
EventSelector::finalize
StatusCode finalize() override
IService implementation: Service finalization.
Definition: EventSelector.cpp:424
EventSelector::StreamSpecs
std::vector< std::string > StreamSpecs
Definition: EventSelector.h:57
EventSelector::m_toolSvc
SmartIF< IToolSvc > m_toolSvc
Definition: EventSelector.h:66
std::vector< EventSelectorDataStream * >
IDataStreamTool
Definition: IDataStreamTool.h:22
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
EventSelectorDataStream
Definition of class EventSelectorDataStream.
Definition: EventSelectorDataStream.h:45
EventSelector::m_streamCount
int m_streamCount
Input stream counter (0..oo, monotonely increasing)
Definition: EventSelector.h:79
IEvtSelector.h
EventSelector
Definition of class EventSelector.
Definition: EventSelector.h:53
EventSelector::createAddress
StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&refpAddr) const override
Create new Opaque address corresponding to the current record.
Definition: EventSelector.cpp:309
EventSelector::EventSelector
EventSelector(const std::string &name, ISvcLocator *svcloc)
Standard Constructor.
Definition: EventSelector.cpp:21
EventSelector::m_reconfigure
bool m_reconfigure
Reconfigure occurred.
Definition: EventSelector.h:71
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
EventSelector::last
StatusCode last(Context &c) const override
Access last item in the iteration.
Definition: EventSelector.cpp:280
EventSelector::m_streamManager
std::string m_streamManager
Definition: EventSelector.h:87
EventSelector::createContext
StatusCode createContext(Context *&refpCtxt) const override
Create a new event loop context.
Definition: EventSelector.cpp:171
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:21