#include <DAPHNEFrame.hpp>
|
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.
|
|
Definition at line 28 of file DAPHNEFrame.hpp.
◆ word_t
◆ 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 227 of file DAPHNEFrame.hpp.
228{
230 throw std::out_of_range("ADC index out of range");
231
232
235
237
239 uint16_t adc =
adc_words[word_index] >> first_bit_position;
240
243 adc |=
adc_words[word_index + 1] << bits_from_first_word;
244 }
245
246 return adc & 0x3FFFu;
247}
◆ get_channel()
uint8_t dunedaq::fddetdataformats::DAPHNEFrame::get_channel |
( |
| ) |
const |
|
inline |
◆ get_timestamp()
uint64_t dunedaq::fddetdataformats::DAPHNEFrame::get_timestamp |
( |
| ) |
const |
|
inline |
◆ 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 253 of file DAPHNEFrame.hpp.
254{
256 throw std::out_of_range("ADC index out of range");
258 throw std::out_of_range("ADC value out of range");
259
260
263
265
267 uint32_t
mask = (1 << (first_bit_position)) - 1;
268 adc_words[word_index] = ((val << first_bit_position) & ~mask) | (
adc_words[word_index] & mask);
269
274 }
275}
◆ set_channel()
void dunedaq::fddetdataformats::DAPHNEFrame::set_channel |
( |
uint8_t | val | ) |
|
|
inline |
◆ adc_words
◆ daq_header
◆ header
Header dunedaq::fddetdataformats::DAPHNEFrame::header |
◆ peaks_data
◆ s_bits_per_adc
int dunedaq::fddetdataformats::DAPHNEFrame::s_bits_per_adc = 14 |
|
staticconstexpr |
◆ s_bits_per_word
int dunedaq::fddetdataformats::DAPHNEFrame::s_bits_per_word = 8 * sizeof(word_t) |
|
staticconstexpr |
◆ s_num_adc_words
◆ s_num_adcs
int dunedaq::fddetdataformats::DAPHNEFrame::s_num_adcs = 1024 |
|
staticconstexpr |
◆ version
uint8_t dunedaq::fddetdataformats::DAPHNEFrame::version = 2 |
|
staticconstexpr |
The documentation for this class was generated from the following file:
- /github/workspace/dunedaq/sourcecode/fddetdataformats/include/fddetdataformats/DAPHNEFrame.hpp