ATLAS Offline Software
Functions
ZdcToString.cxx File Reference
#include "ZdcByteStream/ZdcToString.h"
#include <sstream>
Include dependency graph for ZdcToString.cxx:

Go to the source code of this file.

Functions

template<typename T >
std::string ZdcToString (const std::vector< T > &vv)
 
std::string ZdcToString (const xAOD::TriggerTower &tt)
 
std::string ZdcToString (const xAOD::TriggerTowerContainer &tt)
 
std::string ZdcToString (const xAOD::CPMTower &cpm)
 

Function Documentation

◆ ZdcToString() [1/4]

template<typename T >
std::string ZdcToString ( const std::vector< T > &  vv)

Definition at line 12 of file ZdcToString.cxx.

12  {
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 }

◆ ZdcToString() [2/4]

std::string ZdcToString ( const xAOD::CPMTower cpm)

Definition at line 76 of file ZdcToString.cxx.

76  {
77  std::stringstream o;
78 
79  o << "xAOD::CPMTower"
80  << ", eta=" << cpm.eta()
81  << ", phi=" << cpm.phi()
82  << ", em peak energy=" << cpm.emEnergy()
83  << ", had peak energy=" << cpm.hadEnergy()
84  ;
85 
86  return o.str();
87 }

◆ ZdcToString() [3/4]

std::string ZdcToString ( const xAOD::TriggerTower tt)

Definition at line 23 of file ZdcToString.cxx.

23  {
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 
34  /*
35  << ", lut_cp=" << ::ZdcToString(tt.lut_cp())
36  << ", lut_jep=" << ::ZdcToString(tt.lut_jep())
37  << ", correction=" << ::ZdcToString(tt.correction())
38  << ", correctionEnabled=" << ::ZdcToString(tt.correctionEnabled())
39  << ", bcidVec=" << ::ZdcToString(tt.bcidVec())
40  << ", adc=" << ::ZdcToString(tt.adc())
41  << ", bcidExt=" << ::ZdcToString(tt.bcidExt())
42  */
43 
44  << ", lut_cp=" << ZdcToString(tt.lut_cp())
45  << ", lut_jep=" << ZdcToString(tt.lut_jep())
46  << ", correction=" << ZdcToString(tt.correction())
47  << ", correctionEnabled=" << ZdcToString(tt.correctionEnabled())
48  << ", bcidVec=" << ZdcToString(tt.bcidVec())
49  << ", adc=" << ZdcToString(tt.adc())
50  << ", bcidExt=" << ZdcToString(tt.bcidExt())
51 
52  << ", errorWord=" << tt.errorWord()
53  << ", peak=" << int(tt.peak())
54  << ", adcPeak=" << int(tt.adcPeak());
55  if (!tt.lut_cp().empty()) {
56  o << ", cpET=" << int(tt.cpET());
57  }
58  if (!tt.lut_jep().empty()) {
59  o << ", jepET=" << int(tt.jepET());
60  }
61 
62  }
63 
64  return o.str();
65 }

◆ ZdcToString() [4/4]

std::string ZdcToString ( const xAOD::TriggerTowerContainer tt)

Definition at line 67 of file ZdcToString.cxx.

67  {
68  std::stringstream o;
70  iter != tt.end(); ++iter){
71  o << ZdcToString(**iter) << std::endl;
72  }
73  return o.str();
74 }
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::CPMTower_v2::phi
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
xAOD::CPMTower_v2::eta
float eta() const
get eta
ZdcToString
std::string ZdcToString(const std::vector< T > &vv)
Definition: ZdcToString.cxx:12
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
PlotCalibFromCool.vv
vv
Definition: PlotCalibFromCool.py:716
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
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::emEnergy
uint8_t emEnergy() const
get emEnergy for emEnergyVec[peak] - time slice that (hopefully) contains the collision
Definition: CPMTower_v2.cxx:56