Class for accessing raw WIB v2 frames, as used in ProtoDUNE-SP-II.
More...
#include <WIB2Frame.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 64-bit timestamp of the frame.
|
|
void | set_timestamp (const uint64_t new_timestamp) |
| Set the 64-bit timestamp of the frame.
|
|
Class for accessing raw WIB v2 frames, as used in ProtoDUNE-SP-II.
The canonical definition of the WIB format is given in EDMS document 2088713: https://edms.cern.ch/document/2088713/4
Definition at line 30 of file WIB2Frame.hpp.
◆ word_t
◆ get_adc()
uint16_t dunedaq::fddetdataformats::WIB2Frame::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:
- 40 values from FEMB0 U channels
- 40 values from FEMB0 V channels
- 48 values from FEMB0 X channels (collection)
- 40 values from FEMB1 U channels
- 40 values from FEMB1 V channels
- 48 values from FEMB1 X channels (collection)
Definition at line 89 of file WIB2Frame.hpp.
90 {
92 throw std::out_of_range("ADC index out of range");
93
94
97
99
101 uint16_t adc =
adc_words[word_index] >> first_bit_position;
102
105 adc |=
adc_words[word_index + 1] << bits_from_first_word;
106 }
107
108 return adc & 0x3FFFu;
109 }
◆ get_timestamp()
uint64_t dunedaq::fddetdataformats::WIB2Frame::get_timestamp |
( |
| ) |
const |
|
inline |
Get the 64-bit timestamp of the frame.
Definition at line 140 of file WIB2Frame.hpp.
◆ set_adc()
void dunedaq::fddetdataformats::WIB2Frame::set_adc |
( |
int | i, |
|
|
uint16_t | val ) |
|
inline |
Set the ith ADC value in the frame to val
.
Definition at line 114 of file WIB2Frame.hpp.
115 {
117 throw std::out_of_range("ADC index out of range");
119 throw std::out_of_range("ADC value out of range");
120
121
124
126
128 uint32_t
mask = (1 << (first_bit_position)) - 1;
129 adc_words[word_index] = ((val << first_bit_position) & ~mask) | (
adc_words[word_index] & mask);
130
135 }
136 }
◆ set_timestamp()
void dunedaq::fddetdataformats::WIB2Frame::set_timestamp |
( |
const uint64_t | new_timestamp | ) |
|
|
inline |
Set the 64-bit timestamp of the frame.
Definition at line 147 of file WIB2Frame.hpp.
◆ adc_words
◆ header
Header dunedaq::fddetdataformats::WIB2Frame::header |
◆ s_bits_per_adc
int dunedaq::fddetdataformats::WIB2Frame::s_bits_per_adc = 14 |
|
staticconstexpr |
◆ s_bits_per_word
int dunedaq::fddetdataformats::WIB2Frame::s_bits_per_word = 8 * sizeof(word_t) |
|
staticconstexpr |
◆ s_channels_per_femb
◆ s_fembs_per_frame
int dunedaq::fddetdataformats::WIB2Frame::s_fembs_per_frame = 2 |
|
staticconstexpr |
◆ s_num_adc_words
◆ s_num_ch_per_frame
◆ s_num_channels
◆ s_u_channels_per_femb
int dunedaq::fddetdataformats::WIB2Frame::s_u_channels_per_femb = 40 |
|
staticconstexpr |
◆ s_v_channels_per_femb
int dunedaq::fddetdataformats::WIB2Frame::s_v_channels_per_femb = 40 |
|
staticconstexpr |
◆ s_x_channels_per_femb
int dunedaq::fddetdataformats::WIB2Frame::s_x_channels_per_femb = 48 |
|
staticconstexpr |
◆ trailer
Trailer dunedaq::fddetdataformats::WIB2Frame::trailer |
The documentation for this class was generated from the following file:
- /github/workspace/dunedaq/sourcecode/fddetdataformats/include/fddetdataformats/WIB2Frame.hpp