The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
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
35private:
38
39protected:
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 }
60
62 m_context = it;
63 m_pAddress = pA;
64 }
65
66 void set( IOpaqueAddress* pA ) { m_pAddress = pA; }
71 m_count++;
72 m_strCount = ( reset ) ? 0 : m_strCount + 1;
73 return m_count;
74 }
75
77 m_count++;
78 m_strCount = ( reset ) ? 0 : m_strCount - 1;
79 return m_count;
80 }
81
82public:
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};
IDataStreamTool::size_type m_streamID
Stream identifier.
long numEvent() const
Access counter.
IEvtSelector::Context * m_context
Pointer to "real" iterator.
EvtSelectorContext(const IEvtSelector *selector)
Standard constructor.
virtual IDataStreamTool::size_type ID() const
Stream identifier.
const IEvtSelector * m_pSelector
Pointer to event selector.
EvtSelectorContext(const EvtSelectorContext &)=default
Copy constructor.
void set(IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
IEvtSelector::Context * context() const
Access "real" iterator.
IOpaqueAddress * m_pAddress
Pointer to opaque address.
IDataStreamTool::size_type decreaseCounters(bool reset=false)
Decrease counters.
friend class EventCollectionSelector
long m_count
Event counter.
long numStreamEvent() const
Access counter within stream.
void set(const IEvtSelector *sel, IDataStreamTool::size_type id, IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
friend class EventSelector
void * identifier() const override
long m_strCount
Event counter within stream.
void set(IOpaqueAddress *pA)
Set the address of the iterator.
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
The Event Selector Interface.
Opaque address interface definition.