Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
EventIterator.h
Go to the documentation of this file.
1 // ============================================================
2 //
3 // EventIterator.h
4 // ------------------------------------------------------------
5 //
6 // Package : EventSelector
7 //
8 // Author : Markus Frank
9 //
10 // ===========================================================
11 #ifndef GAUDISVC_EVENTSELECTOR_EVENTITERATOR_H
12 #define GAUDISVC_EVENTSELECTOR_EVENTITERATOR_H 1
13 
14 // Include files
17 
33  // Friend declaration
34  friend class EventSelector;
36 
37 private:
39  EvtSelectorContext( const EvtSelectorContext& ) = default;
40 
41 protected:
45  long m_count = -1;
47  long m_strCount = -1;
49  const IEvtSelector* m_pSelector = nullptr;
56  m_pSelector = sel;
57  m_context = it;
58  m_streamID = id;
59  m_pAddress = pA;
60  m_strCount = -1;
61  }
63  void set( IEvtSelector::Context* it, IOpaqueAddress* pA ) {
64  m_context = it;
65  m_pAddress = pA;
66  }
68  void set( IOpaqueAddress* pA ) { m_pAddress = pA; }
73  m_count++;
74  m_strCount = ( reset ) ? 0 : m_strCount + 1;
75  return m_count;
76  }
79  m_count++;
80  m_strCount = ( reset ) ? 0 : m_strCount - 1;
81  return m_count;
82  }
83 
84 public:
86  EvtSelectorContext( const IEvtSelector* selector ) : m_pSelector( selector ) {}
87 
89  virtual IDataStreamTool::size_type ID() const { return m_streamID; }
91  long numEvent() const { return m_count; }
93  long numStreamEvent() const { return m_strCount; }
94  void* identifier() const override { return (void*)m_pSelector; }
95 };
96 #endif // GAUDISVC_EVENTSELECTOR_EVENTITERATOR_H
IEvtSelector::Context * context() const
Access "real" iterator.
Definition: EventIterator.h:70
EvtSelectorContext(const IEvtSelector *selector)
Standard constructor.
Definition: EventIterator.h:86
long m_count
Event counter.
Definition: EventIterator.h:45
The Event Selector Interface.
Definition: IEvtSelector.h:18
sel
Definition: IOTest.py:93
long m_strCount
Event counter within stream.
Definition: EventIterator.h:47
IEvtSelector::Context * m_context
Pointer to "real" iterator.
Definition: EventIterator.h:51
IOpaqueAddress * m_pAddress
Pointer to opaque address.
Definition: EventIterator.h:53
Definition of class EventIterator.
Definition: EventIterator.h:32
void * identifier() const override
Definition: EventIterator.h:94
long numStreamEvent() const
Access counter within stream.
Definition: EventIterator.h:93
IDataStreamTool::size_type decreaseCounters(bool reset=false)
Decrease counters.
Definition: EventIterator.h:78
Definition of class EventCollectionSelector.
const IEvtSelector * m_pSelector
Pointer to event selector.
Definition: EventIterator.h:49
virtual IDataStreamTool::size_type ID() const
Stream identifier.
Definition: EventIterator.h:89
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
Definition: EventIterator.h:72
Definition of class EventSelector.
Definition: EventSelector.h:53
Opaque address interface definition.
IDataStreamTool::size_type m_streamID
Stream identifier.
Definition: EventIterator.h:43
long numEvent() const
Access counter.
Definition: EventIterator.h:91
EvtSelectorContext(const EvtSelectorContext &)=default
Copy constructor.