ATLAS Offline Software
Functions
ZdcModuleToString.h File Reference
#include "xAODForward/ZdcModule.h"
#include "xAODForward/ZdcModuleContainer.h"
Include dependency graph for ZdcModuleToString.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string ZdcModuleToString (const xAOD::ZdcModule &zm)
 
std::string ZdcModuleToString (const xAOD::ZdcModuleContainer &zc)
 

Function Documentation

◆ ZdcModuleToString() [1/2]

std::string ZdcModuleToString ( const xAOD::ZdcModule zm)

Definition at line 9 of file ZdcModuleToString.cxx.

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

◆ ZdcModuleToString() [2/2]

std::string ZdcModuleToString ( const xAOD::ZdcModuleContainer zc)

Definition at line 46 of file ZdcModuleToString.cxx.

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
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:93
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
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
xAOD::ZdcModule_v1::zdcType
int zdcType() const
ZdcModuleToString
std::string ZdcModuleToString(const xAOD::ZdcModule &zm)
Definition: ZdcModuleToString.cxx:9