All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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"
24 
25 // STL include files
26 #include <vector>
27 
28 // Forward declarations
29 class IIncidentSvc;
30 class IAddressCreator;
31 class IToolSvc;
33 class EvtSelectorContext;
34 class IDataStreamTool;
35 
53 class EventSelector : public extends1<Service, IEvtSelector> {
54 public:
55  typedef std::vector<EventSelectorDataStream*> Streams;
56  typedef std::vector<std::string> StreamSpecs;
57  typedef std::vector<StringProperty> Properties;
58 
59  long int m_streamID;
60 
61 protected:
64 
66 
68 
82  int m_evtMax;
85 
86  std::string m_streamManager;
87 
88 
89 
91  virtual void printEvtInfo(const EvtSelectorContext* iter) const;
92 
93 public:
95  virtual StatusCode initialize();
96 
98  virtual StatusCode finalize();
99 
101  virtual StatusCode reinitialize();
102 
104 
108  virtual StatusCode createContext(Context*& refpCtxt) const;
109 
111 
115  virtual StatusCode next(Context& refCtxt) const;
116 
118 
122  virtual StatusCode next(Context& refCtxt,int jump) const;
123 
125 
130  virtual StatusCode previous(Context& refCtxt) const;
131 
133 
138  virtual StatusCode previous(Context& refCtxt,int jump) const;
139 
141 
145  virtual StatusCode rewind(Context& refCtxt) const;
146 
148 
153  virtual StatusCode createAddress(const Context& refCtxt, IOpaqueAddress*& refpAddr) const;
154 
156 
160  virtual StatusCode releaseContext(Context*& refCtxt) const;
161 
170  virtual StatusCode resetCriteria(const std::string& cr,Context& c)const;
171 
177  virtual StatusCode last(Context& c) const;
178 
180  StatusCode firstOfNextStream( bool shutDown, EvtSelectorContext& it) const;
182  StatusCode lastOfPreviousStream ( bool shutDown, EvtSelectorContext& it) const;
183 
185  EventSelector( const std::string& name, ISvcLocator* svcloc );
186 
188  virtual ~EventSelector();
189 };
190 
191 #endif // GAUDISVC_EVENTSELECTOR_EVENTSELECTOR_H
StatusCode lastOfPreviousStream(bool shutDown, EvtSelectorContext &it) const
Retrieve last entry of the previous data stream.
SmartIF< IIncidentSvc > m_incidentSvc
Reference to the indicent service.
Definition: EventSelector.h:63
The interface implemented by the IToolSvc base class.
Definition: IToolSvc.h:17
int m_evtPrintFrequency
Printout frequency.
Definition: EventSelector.h:84
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
int m_firstEvent
First event to be processed.
Definition: EventSelector.h:80
int m_evtMax
Maximum number of events to be processed.
Definition: EventSelector.h:82
std::vector< EventSelectorDataStream * > Streams
Definition: EventSelector.h:55
tuple c
Definition: gaudirun.py:341
IDataStreamTool * m_streamtool
Definition: EventSelector.h:67
Streams m_streams
Input streams.
Definition: EventSelector.h:76
IAddressCreator interface definition.
long int m_streamID
Definition: EventSelector.h:59
virtual StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&refpAddr) const
Create new Opaque address corresponding to the current record.
virtual void printEvtInfo(const EvtSelectorContext *iter) const
Progress report.
StatusCode firstOfNextStream(bool shutDown, EvtSelectorContext &it) const
Retrieve first entry of the next data stream.
virtual StatusCode rewind(Context &refCtxt) const
Rewind the dataset.
virtual StatusCode createContext(Context *&refpCtxt) const
Create a new event loop context.
StreamSpecs m_streamSpecsLast
Input stream specifiers (last used)
Definition: EventSelector.h:74
virtual StatusCode finalize()
IService implementation: Service finalization.
std::vector< StringProperty > Properties
Definition: EventSelector.h:57
Definition of class EventIterator.
Definition: EventIterator.h:32
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
virtual StatusCode last(Context &c) const
Access last item in the iteration.
StreamSpecs m_streamSpecs
Input stream specifiers (for job options)
Definition: EventSelector.h:72
virtual ~EventSelector()
Standard Destructor.
virtual StatusCode next(Context &refCtxt) const
Get next iteration item from the event loop context.
virtual StatusCode releaseContext(Context *&refCtxt) const
Release existing event iteration context.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
std::vector< std::string > StreamSpecs
Definition: EventSelector.h:56
SmartIF< IToolSvc > m_toolSvc
Definition: EventSelector.h:65
Definition of class EventSelectorDataStream.
virtual StatusCode initialize()
IService implementation: Db event selector override.
int m_streamCount
Input stream counter (0..oo, monotonely increasing)
Definition: EventSelector.h:78
virtual StatusCode resetCriteria(const std::string &cr, Context &c) const
Will set a new criteria for the selection of the next list of events and will change the state of the...
Definition of class EventSelector.
Definition: EventSelector.h:53
virtual StatusCode previous(Context &refCtxt) const
Get previous iteration item from the event loop context.
EventSelector(const std::string &name, ISvcLocator *svcloc)
Standard Constructor.
bool m_reconfigure
Reconfigure occurred.
Definition: EventSelector.h:70
Opaque address interface definition.
virtual StatusCode reinitialize()
Service override: Reinitialize service.
std::string m_streamManager
Definition: EventSelector.h:86
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:22