ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloByteStream
src
ToString.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ToString.h
"
6
#include <sstream>
7
8
9
namespace
{
10
11
template
<
typename
T>
12
std::string
ToString
(
const
std::vector<T>& vv){
13
std::stringstream o;
14
std::string delim =
""
;
15
for
(
auto
val: vv){
16
o << delim << int(val) <<
/*"(0x" << std::hex << int(val) << ")" << */
std::dec;
17
delim =
"|"
;
18
}
19
return
o.str();
20
}
21
}
22
23
std::string
LVL1BS::ToString
(
const
xAOD::TriggerTower
& tt){
24
std::stringstream o;
25
if
(tt.coolId() == 0) {
26
o <<
"xAOD::TriggerTower, coolId=0"
;
27
}
else
{
28
o <<
"xAOD::TriggerTower, coolId="
<< std::hex << tt.coolId() << std::dec
29
<<
", layer="
<< int(tt.layer())
30
<<
", sampling="
<< int(tt.sampling())
31
<<
", eta="
<< tt.eta()
32
<<
", phi="
<< tt.phi()
33
<<
", lut_cp="
<<
::ToString
(tt.lut_cp())
34
<<
", lut_jep="
<<
::ToString
(tt.lut_jep())
35
<<
", correction="
<<
::ToString
(tt.correction())
36
<<
", correctionEnabled="
<<
::ToString
(tt.correctionEnabled())
37
<<
", bcidVec="
<<
::ToString
(tt.bcidVec())
38
<<
", adc="
<<
::ToString
(tt.adc())
39
<<
", bcidExt="
<<
::ToString
(tt.bcidExt())
40
<<
", errorWord="
<< tt.errorWord()
41
<<
", peak="
<< int(tt.peak())
42
<<
", adcPeak="
<< int(tt.adcPeak());
43
if
(!tt.lut_cp().empty()) {
44
o <<
", cpET="
<< int(tt.cpET());
45
}
46
if
(!tt.lut_jep().empty()) {
47
o <<
", jepET="
<< int(tt.jepET());
48
}
49
50
}
51
52
return
o.str();
53
}
54
55
std::string
LVL1BS::ToString
(
const
xAOD::TriggerTowerContainer
& tt){
56
std::stringstream o;
57
for
(
xAOD::TriggerTowerContainer::const_iterator
iter = tt.begin();
58
iter != tt.end(); ++iter){
59
o <<
ToString
(**iter) << std::endl;
60
}
61
return
o.str();
62
}
63
64
std::string
LVL1BS::ToString
(
const
xAOD::CPMTower
& cpm){
65
std::stringstream o;
66
67
o <<
"xAOD::CPMTower"
68
<<
", eta="
<< cpm.
eta
()
69
<<
", phi="
<< cpm.
phi
()
70
<<
", em peak energy="
<< cpm.
emEnergy
()
71
<<
", had peak energy="
<< cpm.
hadEnergy
()
72
;
73
74
return
o.str();
75
}
76
77
std::string
LVL1BS::ToString
(
const
xAOD::CPMTowerContainer
& tt){
78
std::stringstream o;
79
for
(
auto
iter = tt.begin();
80
iter != tt.end(); ++iter){
81
o <<
ToString
(**iter) << std::endl;
82
}
83
return
o.str();
84
}
85
ToString.h
DataVector< xAOD::TriggerTower_v2 >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
xAOD::CPMTower_v2::emEnergy
uint8_t emEnergy() const
get emEnergy for emEnergyVec[peak] - time slice that (hopefully) contains the collision
Definition
CPMTower_v2.cxx:56
xAOD::CPMTower_v2::hadEnergy
uint8_t hadEnergy() const
get hadEnergy for hadEnergyVec[peak] - time slice that (hopefully) contains the collision
Definition
CPMTower_v2.cxx:61
xAOD::CPMTower_v2::phi
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
xAOD::CPMTower_v2::eta
float eta() const
get eta
LVL1BS::ToString
std::string ToString(const xAOD::TriggerTower &tt)
Definition
ToString.cxx:23
xAOD::CPMTowerContainer
CPMTowerContainer_v2 CPMTowerContainer
Define the latest version of the CPMHits container.
Definition
CPMTowerContainer.h:15
xAOD::TriggerTowerContainer
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.
Definition
TriggerTowerContainer.h:15
xAOD::CPMTower
CPMTower_v2 CPMTower
Define the latest version of the CPMTower class.
Definition
Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMTower.h:16
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition
Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
Generated on
for ATLAS Offline Software by
1.17.0