Class for accessing raw WIB eth frames, as used in ProtoDUNE-II.
More...
#include <DAPHNEEthFrame.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.
|
| |
| uint64_t | get_timestamp () const |
| | Get the starting 64-bit timestamp of the frame.
|
| |
| void | set_timestamp (const uint64_t new_timestamp) |
| | Set the starting 64-bit timestamp of the frame.
|
| |
| uint8_t | get_channel () const |
| | Get the channel identifier of the frame.
|
| |
| void | set_channel (const uint8_t new_channel) |
| | Set the channel identifier of the frame.
|
| |
Class for accessing raw WIB eth frames, as used in ProtoDUNE-II.
The canonical definition of the WIB format is given in EDMS document 2088713: https://edms.cern.ch/document/2088726
Definition at line 34 of file DAPHNEEthFrame.hpp.
◆ word_t
◆ get_adc()
| uint16_t dunedaq::fddetdataformats::DAPHNEEthFrame::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 91 of file DAPHNEEthFrame.hpp.
92{
94 throw std::out_of_range("ADC index out of range");
95
96
99
101
103 uint16_t adc =
adc_words[word_index] >> first_bit_position;
104
107 adc |=
adc_words[word_index + 1] << bits_from_first_word;
108 }
109
110 return adc & 0x3FFFu;
111}
◆ get_channel()
| uint8_t dunedaq::fddetdataformats::DAPHNEEthFrame::get_channel |
( |
| ) |
const |
|
inline |
◆ get_timestamp()
| uint64_t dunedaq::fddetdataformats::DAPHNEEthFrame::get_timestamp |
( |
| ) |
const |
|
inline |
◆ set_adc()
| void dunedaq::fddetdataformats::DAPHNEEthFrame::set_adc |
( |
int | i, |
|
|
uint16_t | val ) |
|
inline |
Set the ith ADC value in the frame to val.
Definition at line 117 of file DAPHNEEthFrame.hpp.
118{
120 throw std::out_of_range("ADC index out of range");
122 throw std::out_of_range("ADC value out of range");
123
124
127
129
131 uint32_t
mask = (1 << (first_bit_position)) - 1;
132 adc_words[word_index] = ((val << first_bit_position) & ~mask) | (
adc_words[word_index] & mask);
133
138 }
139}
◆ set_channel()
| void dunedaq::fddetdataformats::DAPHNEEthFrame::set_channel |
( |
const uint8_t | new_channel | ) |
|
|
inline |
◆ set_timestamp()
| void dunedaq::fddetdataformats::DAPHNEEthFrame::set_timestamp |
( |
const uint64_t | new_timestamp | ) |
|
|
inline |
◆ adc_words
◆ daq_header
◆ header
| Header dunedaq::fddetdataformats::DAPHNEEthFrame::header |
◆ s_bits_per_adc
| int dunedaq::fddetdataformats::DAPHNEEthFrame::s_bits_per_adc = 14 |
|
staticconstexpr |
◆ s_bits_per_word
| int dunedaq::fddetdataformats::DAPHNEEthFrame::s_bits_per_word = 8 * sizeof(word_t) |
|
staticconstexpr |
◆ s_num_adc_words
◆ s_num_adcs
| int dunedaq::fddetdataformats::DAPHNEEthFrame::s_num_adcs = 1024 |
|
staticconstexpr |
◆ version
| uint8_t dunedaq::fddetdataformats::DAPHNEEthFrame::version = 1 |
|
staticconstexpr |
The documentation for this class was generated from the following file:
- /github/workspace/dunedaq/sourcecode/fddetdataformats/include/fddetdataformats/DAPHNEEthFrame.hpp