ATLAS Offline Software
Event
xAOD
xAODForward
Root
ZdcModuleToString.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
xAODForward/ZdcModuleToString.h
"
6
#include "
AthContainers/ConstAccessor.h
"
7
#include <sstream>
8
9
std::string
ZdcModuleToString
(
const
xAOD::ZdcModule
& zm)
10
{
11
std::stringstream o;
12
o <<
" ID="
<< zm.
zdcId
();
13
o <<
" S/M/T/C="
<< zm.
zdcSide
();
14
o <<
"/"
<< zm.
zdcModule
();
15
o <<
"/"
<< zm.
zdcType
();
16
o <<
"/"
<< zm.
zdcChannel
();
17
o <<
"\n"
;
18
for
(
auto
s
: {
"g0data"
,
"g1data"
,
"g0d0data"
,
"g0d1data"
,
"g1d0data"
,
"g1d1data"
} )
19
{
20
SG::ConstAccessor<std::vector<uint16_t>
>
acc
(
s
);
21
if
(
acc
.isAvailable(zm))
22
{
23
o <<
s
<<
": "
;
24
const
std::vector<uint16_t>&
v
= zm.
getWaveform
(
s
);
25
for
(
uint16_t
d
:
v
)
26
{
27
o <<
" "
<<
std::to_string
(
d
);
28
}
29
o <<
"\n"
;
30
}
31
32
}
33
static
const
SG::ConstAccessor<uint16_t>
LucrodTriggerAmpAcc(
"LucrodTriggerAmp"
);
34
if
(LucrodTriggerAmpAcc.
isAvailable
(zm))
35
{
36
o <<
"Trigger amp:"
<< LucrodTriggerAmpAcc(zm) <<
"\n"
;
37
}
38
static
const
SG::ConstAccessor<uint16_t>
LucrodTriggerSideAmpAcc(
"LucrodTriggerSideAmp"
);
39
if
(LucrodTriggerSideAmpAcc.
isAvailable
(zm))
40
{
41
o <<
"Trigger side amp:"
<< LucrodTriggerSideAmpAcc(zm) <<
"\n"
;
42
}
43
return
o.str();
44
}
45
46
std::string
ZdcModuleToString
(
const
xAOD::ZdcModuleContainer
& zc)
47
{
48
std::stringstream o;
49
for
(
auto
z
: zc) { o <<
ZdcModuleToString
(*
z
); }
50
return
o.str();
51
}
python.SystemOfUnits.s
int s
Definition:
SystemOfUnits.py:131
hist_file_dump.d
d
Definition:
hist_file_dump.py:137
xAOD::ZdcModule_v1
Class containing ZDC Module information.
Definition:
ZdcModule_v1.h:25
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition:
ConstAccessor.h:55
xAOD::ZdcModule_v1::zdcModule
int zdcModule() const
xAOD::ZdcModule_v1::zdcSide
int zdcSide() const
xAOD::uint16_t
setWord1 uint16_t
Definition:
eFexEMRoI_v1.cxx:88
xAOD::ZdcModule_v1::getWaveform
const std::vector< uint16_t > & getWaveform(const std::string &) const
Definition:
ZdcModule_v1.cxx:28
z
#define z
xAOD::ZdcModule_v1::zdcId
uint32_t zdcId() const
AthenaPoolTestRead.acc
acc
Definition:
AthenaPoolTestRead.py:16
DataVector
Derived DataVector<T>.
Definition:
DataVector.h:581
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition:
GeometryDefs.h:34
python.PyAthena.v
v
Definition:
PyAthena.py:154
xAOD::ZdcModule_v1::zdcChannel
int zdcChannel() const
ZdcModuleToString.h
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
ConstAccessor.h
Helper class to provide constant type-safe access to aux data.
xAOD::ZdcModule_v1::zdcType
int zdcType() const
ZdcModuleToString
std::string ZdcModuleToString(const xAOD::ZdcModule &zm)
Definition:
ZdcModuleToString.cxx:9
Generated on Thu Nov 7 2024 21:32:20 for ATLAS Offline Software by
1.8.18