Gaudi Framework, version v23r9
Home
Generated: Thu Jul 18 2013
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiCoreSvc
src
EventSelector
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
15
#include "
GaudiKernel/IEvtSelector.h
"
16
#include "
GaudiKernel/IDataStreamTool.h
"
17
32
class
EvtSelectorContext
:
public
IEvtSelector::Context
{
33
// Friend declaration
34
friend
class
EventSelector
;
35
friend
class
EventCollectionSelector
;
36
private
:
38
EvtSelectorContext
(
const
EvtSelectorContext
& copy)
39
:
IEvtSelector
::Context(copy),
40
m_count
(copy.
m_count
),
41
m_strCount
(copy.
m_strCount
),
42
m_pSelector
(copy.
m_pSelector
),
43
m_context
(copy.
m_context
),
44
m_pAddress
(copy.
m_pAddress
)
45
{
46
}
47
protected
:
49
IDataStreamTool::size_type
m_streamID
;
51
long
m_count
;
53
long
m_strCount
;
55
const
IEvtSelector
*
m_pSelector
;
57
IEvtSelector::Context
*
m_context
;
59
IOpaqueAddress
*
m_pAddress
;
61
void
set
(
const
IEvtSelector
*
sel
,
IDataStreamTool::size_type
id,
IEvtSelector::Context
* it,
IOpaqueAddress
* pA) {
62
m_pSelector
=
sel
;
63
m_context
= it;
64
m_streamID
= id;
65
m_pAddress
= pA;
66
m_strCount
= -1;
67
}
69
void
set
(
IEvtSelector::Context
* it,
IOpaqueAddress
* pA) {
70
m_context
= it;
71
m_pAddress
= pA;
72
}
74
void
set
(
IOpaqueAddress
* pA) {
75
m_pAddress
= pA;
76
}
78
IEvtSelector::Context
*
context
()
const
{
79
return
m_context
;
80
}
82
IDataStreamTool::size_type
increaseCounters
(
bool
reset=
false
) {
83
m_count
++;
84
m_strCount
= (reset) ? 0 :
m_strCount
+1;
85
return
m_count
;
86
}
88
IDataStreamTool::size_type
decreaseCounters
(
bool
reset=
false
) {
89
m_count
++;
90
m_strCount
= (reset) ? 0 :
m_strCount
-1;
91
return
m_count
;
92
}
93
public
:
95
EvtSelectorContext
(
const
IEvtSelector
* selector )
96
:
m_streamID
(-1),
97
m_count
(-1),
98
m_strCount
(-1),
99
m_pSelector
(selector),
100
m_context
(0),
101
m_pAddress
(0)
102
{
103
}
105
virtual
~EvtSelectorContext
() {
106
}
108
virtual
EvtSelectorContext
&
operator=
(
const
EvtSelectorContext
& copy) {
109
m_streamID
= copy.
m_streamID
;
110
m_count
= copy.
m_count
;
111
m_strCount
= copy.
m_strCount
;
112
m_pSelector
= copy.
m_pSelector
;
113
m_context
= copy.
m_context
;
114
m_pAddress
= copy.
m_pAddress
;
115
return
*
this
;
116
}
118
virtual
IDataStreamTool::size_type
ID
()
const
{
119
return
m_streamID
;
120
}
122
long
numEvent
()
const
{
123
return
m_count
;
124
}
126
long
numStreamEvent
()
const
{
127
return
m_strCount
;
128
}
129
void
*
identifier
()
const
{
130
return
(
void
*)
m_pSelector
;
131
}
132
};
133
#endif // GAUDISVC_EVENTSELECTOR_EVENTITERATOR_H
Generated at Thu Jul 18 2013 12:18:02 for Gaudi Framework, version v23r9 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004