DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::fddetdataformats::DAPHNEFrame Class Reference

#include <DAPHNEFrame.hpp>

Collaboration diagram for dunedaq::fddetdataformats::DAPHNEFrame:
[legend]

Classes

struct  Header
struct  PeakDescriptorData

Public Types

using word_t = uint32_t

Public Member Functions

uint16_t get_adc (int i) const
 Get the ith ADC value in the frame.
void set_adc (int i, uint16_t val)
 Set the ith ADC value in the frame to val.
uint8_t get_channel () const
void set_channel (uint8_t val)
uint64_t get_timestamp () const
 Get the 64-bit timestamp of the frame.

Public Attributes

detdataformats::DAQHeader daq_header
Header header
word_t adc_words [s_num_adc_words]
PeakDescriptorData peaks_data

Static Public Attributes

static constexpr uint8_t version = 2
static constexpr int s_bits_per_adc = 14
static constexpr int s_bits_per_word = 8 * sizeof(word_t)
static constexpr int s_num_adcs = 1024
static constexpr int s_num_adc_words = s_num_adcs * s_bits_per_adc / s_bits_per_word

Detailed Description

Definition at line 31 of file DAPHNEFrame.hpp.

Member Typedef Documentation

◆ word_t

Definition at line 35 of file DAPHNEFrame.hpp.

Member Function Documentation

◆ get_adc()

uint16_t dunedaq::fddetdataformats::DAPHNEFrame::get_adc ( int i) const
inline

Get the ith ADC value in the frame.

The ADC words are 14 bits long, stored packed in the data structure. The order is:

  • 1024 adc values from one daphne channel

Definition at line 5 of file DAPHNEFrame.hxx.

6{
7 // We can safely case from word_t to uint16_t as the ADC value can always be represented in 16 bits
8 return static_cast<uint16_t>(
10}
WordType get_adc_1d(const int i_adc, const WordType(&adc_array)[NWords])
Definition Utils.hpp:156

◆ get_channel()

uint8_t dunedaq::fddetdataformats::DAPHNEFrame::get_channel ( ) const
inline

Definition at line 258 of file DAPHNEFrame.hpp.

258{ return header.channel; }

◆ get_timestamp()

uint64_t dunedaq::fddetdataformats::DAPHNEFrame::get_timestamp ( ) const
inline

Get the 64-bit timestamp of the frame.

Definition at line 262 of file DAPHNEFrame.hpp.

262{ return daq_header.get_timestamp(); }
detdataformats::DAQHeader daq_header

◆ set_adc()

void dunedaq::fddetdataformats::DAPHNEFrame::set_adc ( int i,
uint16_t val )
inline

Set the ith ADC value in the frame to val.

Definition at line 13 of file DAPHNEFrame.hxx.

14{
16}
void set_adc_1d(const int i_adc, WordType adc_val, WordType(&adc_array)[NWords])
Definition Utils.hpp:195

◆ set_channel()

void dunedaq::fddetdataformats::DAPHNEFrame::set_channel ( uint8_t val)
inline

Definition at line 259 of file DAPHNEFrame.hpp.

259{ header.channel = val & 0x3Fu; }

Member Data Documentation

◆ adc_words

word_t dunedaq::fddetdataformats::DAPHNEFrame::adc_words[s_num_adc_words]

Definition at line 243 of file DAPHNEFrame.hpp.

◆ daq_header

detdataformats::DAQHeader dunedaq::fddetdataformats::DAPHNEFrame::daq_header

Definition at line 241 of file DAPHNEFrame.hpp.

◆ header

Header dunedaq::fddetdataformats::DAPHNEFrame::header

Definition at line 242 of file DAPHNEFrame.hpp.

◆ peaks_data

PeakDescriptorData dunedaq::fddetdataformats::DAPHNEFrame::peaks_data

Definition at line 244 of file DAPHNEFrame.hpp.

◆ s_bits_per_adc

int dunedaq::fddetdataformats::DAPHNEFrame::s_bits_per_adc = 14
staticconstexpr

Definition at line 40 of file DAPHNEFrame.hpp.

◆ s_bits_per_word

int dunedaq::fddetdataformats::DAPHNEFrame::s_bits_per_word = 8 * sizeof(word_t)
staticconstexpr

Definition at line 41 of file DAPHNEFrame.hpp.

◆ s_num_adc_words

int dunedaq::fddetdataformats::DAPHNEFrame::s_num_adc_words = s_num_adcs * s_bits_per_adc / s_bits_per_word
staticconstexpr

Definition at line 43 of file DAPHNEFrame.hpp.

◆ s_num_adcs

int dunedaq::fddetdataformats::DAPHNEFrame::s_num_adcs = 1024
staticconstexpr

Definition at line 42 of file DAPHNEFrame.hpp.

◆ version

uint8_t dunedaq::fddetdataformats::DAPHNEFrame::version = 2
staticconstexpr

Definition at line 38 of file DAPHNEFrame.hpp.


The documentation for this class was generated from the following files: