Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
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 * (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #pragma once
12 
15 
31  // Friend declaration
32  friend class EventSelector;
34 
35 private:
38 
39 protected:
43  long m_count = -1;
45  long m_strCount = -1;
47  const IEvtSelector* m_pSelector = nullptr;
54  m_pSelector = sel;
55  m_context = it;
56  m_streamID = id;
57  m_pAddress = pA;
58  m_strCount = -1;
59  }
62  m_context = it;
63  m_pAddress = pA;
64  }
66  void set( IOpaqueAddress* pA ) { m_pAddress = pA; }
71  m_count++;
72  m_strCount = ( reset ) ? 0 : m_strCount + 1;
73  return m_count;
74  }
77  m_count++;
78  m_strCount = ( reset ) ? 0 : m_strCount - 1;
79  return m_count;
80  }
81 
82 public:
84  EvtSelectorContext( const IEvtSelector* selector ) : m_pSelector( selector ) {}
85 
87  virtual IDataStreamTool::size_type ID() const { return m_streamID; }
89  long numEvent() const { return m_count; }
91  long numStreamEvent() const { return m_strCount; }
92  void* identifier() const override { return (void*)m_pSelector; }
93 };
EvtSelectorContext::increaseCounters
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
Definition: EventIterator.h:70
IOpaqueAddress
Definition: IOpaqueAddress.h:28
IEvtSelector
Definition: IEvtSelector.h:26
EvtSelectorContext::context
IEvtSelector::Context * context() const
Access "real" iterator.
Definition: EventIterator.h:68
IEvtSelector.h
EvtSelectorContext::EvtSelectorContext
EvtSelectorContext(const EvtSelectorContext &)=default
Copy constructor.
EvtSelectorContext::ID
virtual IDataStreamTool::size_type ID() const
Stream identifier.
Definition: EventIterator.h:87
IEvtSelector::Context
Definition: IEvtSelector.h:31
GaudiPartProp.tests.id
id
Definition: tests.py:111
EvtSelectorContext::decreaseCounters
IDataStreamTool::size_type decreaseCounters(bool reset=false)
Decrease counters.
Definition: EventIterator.h:76
EvtSelectorContext
Definition of class EventIterator.
Definition: EventIterator.h:30
EvtSelectorContext::set
void set(IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:61
EvtSelectorContext::numEvent
long numEvent() const
Access counter.
Definition: EventIterator.h:89
EvtSelectorContext::numStreamEvent
long numStreamEvent() const
Access counter within stream.
Definition: EventIterator.h:91
EvtSelectorContext::m_pAddress
IOpaqueAddress * m_pAddress
Pointer to opaque address.
Definition: EventIterator.h:51
EvtSelectorContext::m_count
long m_count
Event counter.
Definition: EventIterator.h:43
IOTest.sel
sel
Definition: IOTest.py:106
EvtSelectorContext::identifier
void * identifier() const override
Definition: EventIterator.h:92
EvtSelectorContext::m_pSelector
const IEvtSelector * m_pSelector
Pointer to event selector.
Definition: EventIterator.h:47
IDataStreamTool::size_type
long size_type
Definition: IDataStreamTool.h:33
EvtSelectorContext::EvtSelectorContext
EvtSelectorContext(const IEvtSelector *selector)
Standard constructor.
Definition: EventIterator.h:84
EventCollectionSelector
Definition of class EventCollectionSelector.
Definition: EventCollectionSelector.h:41
EvtSelectorContext::set
void set(IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:66
EvtSelectorContext::m_strCount
long m_strCount
Event counter within stream.
Definition: EventIterator.h:45
IDataStreamTool.h
EvtSelectorContext::m_context
IEvtSelector::Context * m_context
Pointer to "real" iterator.
Definition: EventIterator.h:49
EvtSelectorContext::set
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition: EventIterator.h:53
EventSelector
Definition of class EventSelector.
Definition: EventSelector.h:41
EvtSelectorContext::m_streamID
IDataStreamTool::size_type m_streamID
Stream identifier.
Definition: EventIterator.h:41