12#ifndef _ZDC_RECEVENT_H_
13#define _ZDC_RECEVENT_H_
38 std::vector<o2::zdc::BCRecData>
mRecBC;
61 mEnergy.emplace_back(ch, energy);
66 inline void addTDC(uint8_t ch, int16_t
val, int16_t amp,
bool isbeg =
false,
bool isend =
false)
76 inline void addTDC(uint8_t ch,
float val,
float amp,
bool isbeg =
false,
bool isend =
false)
79 printf(
"ch:%-2u [%s] TDC %6.0f Amp. %6.0f%s%s\n", ch,
ChannelNames[
TDCSignal[ch]].
data(),
val, amp, isbeg ?
" B" :
"", isend ?
" E" :
"");
89 printf(
"addInfo info=%u 0x%04x\n", info, info);
91 mInfo.emplace_back(info);
95 inline void addInfo(uint8_t ch, uint16_t code)
98 LOGF(error,
"Adding info (0x%x) for not existent channel %u", code, ch);
101 uint16_t info = (code & 0x03ff) | ((ch & 0x1f) << 10);
103 printf(
"addInfo ch=%u code=%u \"%s\" info=%u 0x%04x\n", ch, code,
MsgText[code].
data(), info, info);
105 mInfo.emplace_back(info);
109 uint32_t
addInfo(
const RecEventAux& reca,
const std::array<bool, NChannels>&
vec,
const uint16_t code);
118 if (wave.size() ==
NIS) {
120 mRecBC.back().addWaveform();
122 LOG(error) << __func__ <<
": ch " <<
int(ch) <<
" inconsistent waveform size " << wave.size();
Class to refer to the reconstructed information.
Container class to store energy released in the ZDC.
Container class to store a TDC hit in a ZDC channel.
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
const int TDCSignal[NTDCChannels]
constexpr std::string_view MsgText[]
constexpr std::string_view ChannelNames[]
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
uint16_t bc
bunch crossing ID of interaction
uint32_t triggers
pattern of decoded energies
uint32_t addInfos(const RecEventAux &reca)
void addTDC(uint8_t ch, int16_t val, int16_t amp, bool isbeg=false, bool isend=false)
void addInfo(uint16_t info)
void addInfo(uint8_t ch, uint16_t code)
std::vector< o2::zdc::ZDCWaveform > mWaveform
Event quality information.
void addEnergy(uint8_t ch, float energy)
void addWaveform(uint8_t ch, std::vector< float > &wave)
std::vector< o2::zdc::ZDCEnergy > mEnergy
Interaction record and references to data.
std::vector< uint16_t > mInfo
ZDC TDC.
void addBC(const RecEventAux &reca)
ZDC waveform.
void addTDC(uint8_t ch, float val, float amp, bool isbeg=false, bool isend=false)
std::vector< o2::zdc::BCRecData > mRecBC
std::vector< o2::zdc::ZDCTDCData > mTDCData
ZDC energy.
std::vector< o2::ctf::BufferType > vec
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"