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
MuonTruthAlgs
MuonTruthAlgs
DecorUtils.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONTRUTHALGS_DECORUTILS_H
5
#define MUONTRUTHALGS_DECORUTILS_H
6
7
#include "
StoreGate/WriteDecorHandleKey.h
"
8
#include "
StoreGate/WriteDecorHandleKeyArray.h
"
9
#include "
StoreGate/WriteDecorHandle.h
"
10
11
namespace
Muon
{
12
template
<
typename
ContType,
typename
DataType>
13
using
DecorHandlePtr_wt
= std::unique_ptr<SG::WriteDecorHandle<ContType, DataType>>;
14
template
<
typename
ContType,
typename
DataType>
15
using
DecorHandlePtrVec_t
= std::vector<DecorHandlePtr_wt<ContType, DataType>>;
16
17
19
template
<
typename
DataType,
typename
ContType>
20
DecorHandlePtr_wt<ContType, DataType>
21
makeHandle
(
const
EventContext& ctx,
22
const
SG::WriteDecorHandleKey<ContType>
&
key
,
23
const
DataType
defVal
= {}) {
24
if
(
key
.empty()) {
25
return
nullptr
;
26
}
27
auto
decorHandle = std::make_unique<SG::WriteDecorHandle<ContType, DataType>>(
key
, ctx);
28
for
(
const
auto
*
obj
: (**decorHandle)){
29
(*decorHandle)(*obj) =
defVal
;
30
}
31
return
decorHandle;
32
}
33
34
template
<
typename
DataType,
typename
ContType>
35
DecorHandlePtrVec_t<ContType, DataType>
36
makeHandles
(
const
EventContext& ctx,
37
const
SG::WriteDecorHandleKeyArray<ContType>
&
keys
,
38
const
DataType
defVal
= {}) {
39
DecorHandlePtrVec_t<ContType, DataType> handles{};
40
for
(
const
SG::WriteDecorHandleKey<ContType>
&
key
:
keys
) {
41
handles.emplace_back(
makeHandle
(ctx,
key
,
defVal
));
42
}
43
return
handles;
44
}
45
}
46
#endif
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition:
StoreGate/StoreGate/WriteDecorHandleKey.h:89
WriteCalibToCool.defVal
defVal
Definition:
WriteCalibToCool.py:442
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition:
RoIBResultByteStreamTool.cxx:25
SG::HandleKeyArray
Definition:
StoreGate/StoreGate/HandleKeyArray.h:38
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition:
TrackSystemController.h:45
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Muon::makeHandles
DecorHandlePtrVec_t< ContType, DataType > makeHandles(const EventContext &ctx, const SG::WriteDecorHandleKeyArray< ContType > &keys, const DataType defVal={})
Definition:
DecorUtils.h:36
Muon::DecorHandlePtr_wt
std::unique_ptr< SG::WriteDecorHandle< ContType, DataType > > DecorHandlePtr_wt
Definition:
DecorUtils.h:13
Muon::makeHandle
DecorHandlePtr_wt< ContType, DataType > makeHandle(const EventContext &ctx, const SG::WriteDecorHandleKey< ContType > &key, const DataType defVal={})
Returns a unique_ptr with an initialized WriteDecorHandle
Definition:
DecorUtils.h:21
WriteDecorHandle.h
Handle class for adding a decoration to an object.
WriteDecorHandleKeyArray.h
python.Bindings.keys
keys
Definition:
Control/AthenaPython/python/Bindings.py:798
python.PyAthena.obj
obj
Definition:
PyAthena.py:132
mapkey::key
key
Definition:
TElectronEfficiencyCorrectionTool.cxx:37
Muon::DecorHandlePtrVec_t
std::vector< DecorHandlePtr_wt< ContType, DataType > > DecorHandlePtrVec_t
Definition:
DecorUtils.h:15
Generated on Thu May 22 2025 21:08:44 for ATLAS Offline Software by
1.8.18