Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
MuonSpectrometer
MuonPhaseII
MuonCnv
xAODMuonViewAlgs
src
SegmentViewAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
SegmentViewAlg.h
"
5
#include <
AthContainers/ConstDataVector.h
>
6
namespace
MuonR4
{
7
8
StatusCode
SegmentViewAlg::initialize
(){
9
ATH_CHECK
(
m_readKeys
.initialize());
10
ATH_CHECK
(
m_writeKey
.
initialize
());
11
if
(
m_readKeys
.empty()) {
12
ATH_MSG_FATAL
(
"Please configure at least one read key"
);
13
return
StatusCode::FAILURE;
14
}
15
16
return
StatusCode::SUCCESS;
17
}
18
StatusCode
SegmentViewAlg::execute
(
const
EventContext& ctx)
const
{
19
20
ConstDataVector<xAOD::MuonSegmentContainer>
viewCont{
SG::VIEW_ELEMENTS
};
21
for
(
const
SG::ReadHandleKey<xAOD::MuonSegmentContainer>
&
key
:
m_readKeys
) {
22
const
xAOD::MuonSegmentContainer
* segCont{
nullptr
};
23
ATH_CHECK
(
SG::get
(segCont,
key
, ctx));
24
viewCont.insert(viewCont.end(), segCont->begin(), segCont->end());
25
}
26
SG::WriteHandle
writeHandle{
m_writeKey
, ctx};
27
ATH_CHECK
(writeHandle.record(std::make_unique<xAOD::MuonSegmentContainer>(*viewCont.asDataVector())));
28
return
StatusCode::SUCCESS;
29
}
30
}
MuonR4::SegmentViewAlg::m_readKeys
SG::ReadHandleKeyArray< xAOD::MuonSegmentContainer > m_readKeys
Definition:
SegmentViewAlg.h:19
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition:
AthMsgStreamMacros.h:34
SegmentViewAlg.h
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition:
OwnershipPolicy.h:18
ConstDataVector.h
DataVector adapter that acts like it holds const pointers.
SG::ReadHandleKey< xAOD::MuonSegmentContainer >
MuonR4::SegmentViewAlg::execute
StatusCode execute(const EventContext &ctx) const override final
Definition:
SegmentViewAlg.cxx:18
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition:
ReadCondHandle.h:287
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition:
AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition:
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:794
MuonR4::SegmentViewAlg::initialize
StatusCode initialize() override final
Definition:
SegmentViewAlg.cxx:8
MuonR4::SegmentViewAlg::m_writeKey
SG::WriteHandleKey< xAOD::MuonSegmentContainer > m_writeKey
Definition:
SegmentViewAlg.h:20
MuonR4
This header ties the generic definitions in this package.
Definition:
HoughEventData.h:16
SG::WriteHandle
Definition:
StoreGate/StoreGate/WriteHandle.h:73
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition:
ConstDataVector.h:76
mapkey::key
key
Definition:
TElectronEfficiencyCorrectionTool.cxx:37
Generated on Mon May 12 2025 21:17:36 for ATLAS Offline Software by
1.8.18