ATLAS Offline Software
Loading...
Searching...
No Matches
ZdcModuleToString.cxx File Reference
#include "xAODForward/ZdcModuleToString.h"
#include "AthContainers/ConstAccessor.h"
#include <sstream>
Include dependency graph for ZdcModuleToString.cxx:

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}
Helper class to provide constant type-safe access to aux data.
int zdcSide() const
uint32_t zdcId() const
int zdcType() const
int zdcModule() const
int zdcChannel() const
const std::vector< uint16_t > & getWaveform(const std::string &) const

◆ 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}
#define z
std::string ZdcModuleToString(const xAOD::ZdcModule &zm)