ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
PileUpTools
PileUpTools
PileUpStream.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef PILEUPSTREAM_PILEUPSTREAM_H
6
#define PILEUPSTREAM_PILEUPSTREAM_H
11
12
#include <string>
13
14
// Framework include files
15
#include "GaudiKernel/IEvtSelector.h"
16
#include "GaudiKernel/ServiceHandle.h"
17
#include "
AthenaBaseComps/AthMessaging.h
"
18
19
#include "
PileUpTools/PileUpMergeSvc.h
"
20
#include "
xAODEventInfo/EventInfo.h
"
//typedef, cannot fwd declare
21
22
// Forward declarations
23
class
ISvcLocator;
24
class
StoreGateSvc
;
25
26
30
class
PileUpStream
31
:
public
AthMessaging
32
{
33
public
:
34
typedef
IEvtSelector::Context
EvtIterator
;
35
37
38
PileUpStream
();
39
PileUpStream
(
const
PileUpStream
& rhs) =
delete
;
40
PileUpStream
&
operator=
(
const
PileUpStream
& rhs) =
delete
;
41
PileUpStream
(
PileUpStream
&& rhs);
42
PileUpStream
&
operator=
(
PileUpStream
&& rhs);
43
PileUpStream
(
const
std::string&
name
,
44
ISvcLocator* svcLoc,
45
const
std::string& selecName);
46
PileUpStream
(
const
std::string&
name
,
47
ISvcLocator* svcLoc,
48
IEvtSelector*
sel
);
49
50
virtual
~PileUpStream
();
52
54
inline
const
std::string&
name
() {
return
m_name
; }
55
inline
IEvtSelector&
selector
() {
return
*
m_sel
; }
56
inline
EvtIterator
&
iterator
() {
return
*
p_iter
; }
57
inline
StoreGateSvc
&
store
() {
return
*
m_SG
; }
58
inline
const
IEvtSelector&
selector
()
const
{
return
*
m_sel
; }
59
inline
const
EvtIterator
&
iterator
()
const
{
return
*
p_iter
; }
60
inline
const
StoreGateSvc
&
store
()
const
{
return
*
m_SG
; }
62
64
const
xAOD::EventInfo
*
nextEventPre
(
bool
readRecord=
true
);
65
67
bool
nextEventPre_Passive
(
bool
readRecord);
68
70
bool
setupStore
();
72
inline
bool
setupStore
(
bool
) {
return
setupStore
();}
73
75
StatusCode
finalize
();
76
78
bool
used
()
const
{
return
m_used
;}
79
void
setUsed
() {
m_used
=
true
;}
80
void
resetUsed
() {
m_used
=
false
;}
81
bool
hasRing
()
const
{
return
m_hasRing
; }
83
unsigned
int
originalIRing
()
const
{
return
m_iOriginalRing
; }
84
void
setOriginalIRing
(
unsigned
int
iR) {
85
if
(!
m_hasRing
) {
86
m_hasRing
=
true
;
87
m_iOriginalRing
=iR;
88
}
89
}
90
91
92
private
:
93
ISvcLocator*
serviceLocator
() {
return
p_svcLoc
; }
94
96
StatusCode
nextRecordPre
();
97
99
StatusCode
nextRecordPre_Passive
();
100
102
bool
loadStore
();
103
105
void
setActiveStore
();
106
108
std::string
m_name
;
110
ISvcLocator*
p_svcLoc
{
nullptr
};
112
SmartIF<IEvtSelector>
m_sel
;
114
SmartIF<StoreGateSvc>
m_SG
;
116
EvtIterator
*
p_iter
{
nullptr
};
117
118
ServiceHandle<PileUpMergeSvc>
m_mergeSvc
;
119
120
121
bool
m_ownEvtIterator
{
false
};
122
bool
m_neverLoaded
{
true
};
123
bool
m_ownStore
{
false
};
124
125
bool
m_used
{
false
};
126
bool
m_hasRing
{
false
};
127
unsigned
int
m_iOriginalRing
{0};
128
};
129
#endif
// PILEUPSTREAM_PILEUPSTREAM_H
130
131
132
133
134
AthMessaging.h
PileUpMergeSvc.h
the preferred mechanism to access information from the different event stores in a pileup job.
sel
sel
Definition
SUSYToolsTester.cxx:92
AthMessaging::AthMessaging
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Definition
AthMessaging.cxx:13
PileUpStream::used
bool used() const
has this stream already be used in this event?
Definition
PileUpStream.h:78
PileUpStream::setUsed
void setUsed()
Definition
PileUpStream.h:79
PileUpStream::store
StoreGateSvc & store()
Definition
PileUpStream.h:57
PileUpStream::operator=
PileUpStream & operator=(const PileUpStream &rhs)=delete
PileUpStream::m_ownEvtIterator
bool m_ownEvtIterator
do we own p_iter?
Definition
PileUpStream.h:121
PileUpStream::m_ownStore
bool m_ownStore
is m_SG a store we cloned from the master one?
Definition
PileUpStream.h:123
PileUpStream::setupStore
bool setupStore()
setup input and overlay selectors and iters
Definition
PileUpStream.cxx:98
PileUpStream::name
const std::string & name()
Definition
PileUpStream.h:54
PileUpStream::m_neverLoaded
bool m_neverLoaded
has an event been loaded into this stream?
Definition
PileUpStream.h:122
PileUpStream::setupStore
bool setupStore(bool)
backward compatibility
Definition
PileUpStream.h:72
PileUpStream::PileUpStream
PileUpStream(const PileUpStream &rhs)=delete
PileUpStream::selector
const IEvtSelector & selector() const
Definition
PileUpStream.h:58
PileUpStream::serviceLocator
ISvcLocator * serviceLocator()
Definition
PileUpStream.h:93
PileUpStream::nextEventPre
const xAOD::EventInfo * nextEventPre(bool readRecord=true)
return next Event, load store with next Event
Definition
PileUpStream.cxx:193
PileUpStream::hasRing
bool hasRing() const
Definition
PileUpStream.h:81
PileUpStream::nextRecordPre_Passive
StatusCode nextRecordPre_Passive()
increment event iterator
Definition
PileUpStream.cxx:160
PileUpStream::m_used
bool m_used
has this stream already been used? (for the current event)
Definition
PileUpStream.h:125
PileUpStream::setOriginalIRing
void setOriginalIRing(unsigned int iR)
Definition
PileUpStream.h:84
PileUpStream::~PileUpStream
virtual ~PileUpStream()
Definition
PileUpStream.cxx:94
PileUpStream::loadStore
bool loadStore()
clear store and load new proxies
Definition
PileUpStream.cxx:179
PileUpStream::m_sel
SmartIF< IEvtSelector > m_sel
Selector.
Definition
PileUpStream.h:112
PileUpStream::PileUpStream
PileUpStream()
Structors.
Definition
PileUpStream.cxx:25
PileUpStream::nextRecordPre
StatusCode nextRecordPre()
increment event iterator before loading store
Definition
PileUpStream.cxx:170
PileUpStream::originalIRing
unsigned int originalIRing() const
index of the ring for which this stream was used originally
Definition
PileUpStream.h:83
PileUpStream::m_name
std::string m_name
Stream name.
Definition
PileUpStream.h:108
PileUpStream::finalize
StatusCode finalize()
finalize and release store. To be called on ... finalize()
Definition
PileUpStream.cxx:232
PileUpStream::m_iOriginalRing
unsigned int m_iOriginalRing
original ring in which event was used
Definition
PileUpStream.h:127
PileUpStream::store
const StoreGateSvc & store() const
Definition
PileUpStream.h:60
PileUpStream::p_iter
EvtIterator * p_iter
Input Iterators.
Definition
PileUpStream.h:116
PileUpStream::iterator
EvtIterator & iterator()
Definition
PileUpStream.h:56
PileUpStream::EvtIterator
IEvtSelector::Context EvtIterator
Definition
PileUpStream.h:34
PileUpStream::resetUsed
void resetUsed()
Definition
PileUpStream.h:80
PileUpStream::m_SG
SmartIF< StoreGateSvc > m_SG
StoreGateSvc;.
Definition
PileUpStream.h:114
PileUpStream::setActiveStore
void setActiveStore()
set ActiveStore
Definition
PileUpStream.cxx:155
PileUpStream::nextEventPre_Passive
bool nextEventPre_Passive(bool readRecord)
like nextEventPre, but doesn't actually load anything
Definition
PileUpStream.cxx:218
PileUpStream::selector
IEvtSelector & selector()
Definition
PileUpStream.h:55
PileUpStream::m_hasRing
bool m_hasRing
Definition
PileUpStream.h:126
PileUpStream::iterator
const EvtIterator & iterator() const
Definition
PileUpStream.h:59
PileUpStream::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition
PileUpStream.h:118
PileUpStream::p_svcLoc
ISvcLocator * p_svcLoc
ServiceLocator.
Definition
PileUpStream.h:110
ServiceHandle
Definition
ClusterMakerTool.h:36
StoreGateSvc
The Athena Transient Store API.
Definition
StoreGateSvc.h:120
xAOD::EventInfo
EventInfo_v1 EventInfo
Definition of the latest event info version.
Definition
IEventInfoCnvTool.h:16
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0