The Gaudi Framework
master (9f3f8895)
Toggle main menu visibility
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
13
#include <
GaudiKernel/IDataStreamTool.h
>
14
#include <
GaudiKernel/IEvtSelector.h
>
15
30
class
EvtSelectorContext
:
public
IEvtSelector::Context
{
31
// Friend declaration
32
friend
class
EventSelector
;
33
friend
class
EventCollectionSelector
;
34
35
private
:
37
EvtSelectorContext
(
const
EvtSelectorContext
& ) =
default
;
38
39
protected
:
41
IDataStreamTool::size_type
m_streamID
= -1;
43
long
m_count
= -1;
45
long
m_strCount
= -1;
47
const
IEvtSelector
*
m_pSelector
=
nullptr
;
49
IEvtSelector::Context
*
m_context
=
nullptr
;
51
IOpaqueAddress
*
m_pAddress
=
nullptr
;
53
void
set
(
const
IEvtSelector
* sel,
IDataStreamTool::size_type
id
,
IEvtSelector::Context
* it,
IOpaqueAddress
* pA ) {
54
m_pSelector
= sel;
55
m_context
= it;
56
m_streamID
= id;
57
m_pAddress
= pA;
58
m_strCount
= -1;
59
}
60
61
void
set
(
IEvtSelector::Context
* it,
IOpaqueAddress
* pA ) {
62
m_context
= it;
63
m_pAddress
= pA;
64
}
65
66
void
set
(
IOpaqueAddress
* pA ) {
m_pAddress
= pA; }
68
IEvtSelector::Context
*
context
()
const
{
return
m_context
; }
70
IDataStreamTool::size_type
increaseCounters
(
bool
reset =
false
) {
71
m_count
++;
72
m_strCount
= ( reset ) ? 0 :
m_strCount
+ 1;
73
return
m_count
;
74
}
75
76
IDataStreamTool::size_type
decreaseCounters
(
bool
reset =
false
) {
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
};
IDataStreamTool.h
IEvtSelector.h
EvtSelectorContext::m_streamID
IDataStreamTool::size_type m_streamID
Stream identifier.
Definition
EventIterator.h:41
EvtSelectorContext::numEvent
long numEvent() const
Access counter.
Definition
EventIterator.h:89
EvtSelectorContext::m_context
IEvtSelector::Context * m_context
Pointer to "real" iterator.
Definition
EventIterator.h:49
EvtSelectorContext::EvtSelectorContext
EvtSelectorContext(const IEvtSelector *selector)
Standard constructor.
Definition
EventIterator.h:84
EvtSelectorContext::ID
virtual IDataStreamTool::size_type ID() const
Stream identifier.
Definition
EventIterator.h:87
EvtSelectorContext::m_pSelector
const IEvtSelector * m_pSelector
Pointer to event selector.
Definition
EventIterator.h:47
EvtSelectorContext::EvtSelectorContext
EvtSelectorContext(const EvtSelectorContext &)=default
Copy constructor.
EvtSelectorContext::set
void set(IEvtSelector::Context *it, IOpaqueAddress *pA)
Set the address of the iterator.
Definition
EventIterator.h:61
EvtSelectorContext::context
IEvtSelector::Context * context() const
Access "real" iterator.
Definition
EventIterator.h:68
EvtSelectorContext::m_pAddress
IOpaqueAddress * m_pAddress
Pointer to opaque address.
Definition
EventIterator.h:51
EvtSelectorContext::decreaseCounters
IDataStreamTool::size_type decreaseCounters(bool reset=false)
Decrease counters.
Definition
EventIterator.h:76
EvtSelectorContext::EventCollectionSelector
friend class EventCollectionSelector
Definition
EventIterator.h:33
EvtSelectorContext::m_count
long m_count
Event counter.
Definition
EventIterator.h:43
EvtSelectorContext::numStreamEvent
long numStreamEvent() const
Access counter within stream.
Definition
EventIterator.h:91
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
EvtSelectorContext::EventSelector
friend class EventSelector
Definition
EventIterator.h:32
EvtSelectorContext::identifier
void * identifier() const override
Definition
EventIterator.h:92
EvtSelectorContext::m_strCount
long m_strCount
Event counter within stream.
Definition
EventIterator.h:45
EvtSelectorContext::set
void set(IOpaqueAddress *pA)
Set the address of the iterator.
Definition
EventIterator.h:66
EvtSelectorContext::increaseCounters
IDataStreamTool::size_type increaseCounters(bool reset=false)
Increase counters.
Definition
EventIterator.h:70
IDataStreamTool::size_type
long size_type
Definition
IDataStreamTool.h:33
IEvtSelector::Context
Definition
IEvtSelector.h:31
IEvtSelector
The Event Selector Interface.
Definition
IEvtSelector.h:26
IOpaqueAddress
Opaque address interface definition.
Definition
IOpaqueAddress.h:28
GaudiCoreSvc
src
EventSelector
EventIterator.h
Generated on
for The Gaudi Framework by
1.17.0