Class for accessing raw DAPHNE eth stream frames, as used in ProtoDUNE-II.
More...
#include <DAPHNEEthStreamFrame.hpp>
|
| uint16_t | get_adc (uint i, uint chn) const |
| | Get the i ADC value of chn in the frame.
|
| |
| void | set_adc (uint chn, uint i, uint16_t val) |
| | Set the i ADC value of chn 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 (uint ch) const |
| | Get the channel identifier of the frame.
|
| |
| void | set_channel (uint channel_index, const uint8_t new_channel_val) |
| | Set the channel identifier of the frame.
|
| |
| uint8_t | get_channel0 () const |
| | Get the channel 0 from the DAPHNE Stream frame header
|
| |
| uint8_t | get_channel1 () const |
| | Get the channel 1 from the DAPHNE Stream frame header
|
| |
| uint8_t | get_channel2 () const |
| | Get the channel 2 from the DAPHNE Stream frame header
|
| |
| uint8_t | get_channel3 () const |
| | Get the channel 3 from the DAPHNE Stream frame header
|
| |
Class for accessing raw DAPHNE eth stream frames, as used in ProtoDUNE-II.
The canonical definition of the DAPHNE format is given in EDMS document 2088713: https://edms.cern.ch/document/2088726
Definition at line 34 of file DAPHNEEthStreamFrame.hpp.
◆ word_t
◆ get_adc()
| uint16_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_adc |
( |
uint | i, |
|
|
uint | chn ) const |
|
inline |
Get the i ADC value of chn in the frame.
Definition at line 79 of file DAPHNEEthStreamFrame.hpp.
80{
81
83 throw std::out_of_range("ADC index out of range");
84
86 throw std::out_of_range("Channel index out of range");
87
88
90
93
95
97 uint16_t adc =
adc_words[word_index] >> first_bit_position;
98
101 adc |=
adc_words[word_index + 1] << bits_from_first_word;
102 }
103
104 return adc & 0x3FFFu;
105}
◆ get_channel()
| uint8_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_channel |
( |
uint | ch | ) |
const |
|
inline |
Get the channel identifier of the frame.
Definition at line 157 of file DAPHNEEthStreamFrame.hpp.
158 {
160 throw std::out_of_range("Channel index out of range");
161
163 }
◆ get_channel0()
| uint8_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_channel0 |
( |
| ) |
const |
|
inline |
◆ get_channel1()
| uint8_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_channel1 |
( |
| ) |
const |
|
inline |
◆ get_channel2()
| uint8_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_channel2 |
( |
| ) |
const |
|
inline |
◆ get_channel3()
| uint8_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_channel3 |
( |
| ) |
const |
|
inline |
◆ get_timestamp()
| uint64_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_timestamp |
( |
| ) |
const |
|
inline |
◆ set_adc()
| void dunedaq::fddetdataformats::DAPHNEEthStreamFrame::set_adc |
( |
uint | chn, |
|
|
uint | i, |
|
|
uint16_t | val ) |
|
inline |
Set the i ADC value of chn in the frame to val.
Definition at line 110 of file DAPHNEEthStreamFrame.hpp.
111{
113 throw std::out_of_range("Channel index out of range");
114
116 throw std::out_of_range("ADC index out of range");
117
119 throw std::out_of_range("ADC value out of range");
120
121
122
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
140 }
◆ set_channel()
| void dunedaq::fddetdataformats::DAPHNEEthStreamFrame::set_channel |
( |
uint | channel_index, |
|
|
const uint8_t | new_channel_val ) |
|
inline |
Set the channel identifier of the frame.
Definition at line 167 of file DAPHNEEthStreamFrame.hpp.
168 {
170 throw std::out_of_range("Channel index out of range");
171
173 }
◆ set_timestamp()
| void dunedaq::fddetdataformats::DAPHNEEthStreamFrame::set_timestamp |
( |
const uint64_t | new_timestamp | ) |
|
|
inline |
◆ adc_words
◆ daq_header
◆ header
| Header dunedaq::fddetdataformats::DAPHNEEthStreamFrame::header |
◆ s_adcs_per_channel
| int dunedaq::fddetdataformats::DAPHNEEthStreamFrame::s_adcs_per_channel = 280 |
|
staticconstexpr |
◆ s_bits_per_adc
| int dunedaq::fddetdataformats::DAPHNEEthStreamFrame::s_bits_per_adc = 14 |
|
staticconstexpr |
◆ s_bits_per_word
| int dunedaq::fddetdataformats::DAPHNEEthStreamFrame::s_bits_per_word = 8 * sizeof(word_t) |
|
staticconstexpr |
◆ s_num_adc_words
◆ s_num_channels
| int dunedaq::fddetdataformats::DAPHNEEthStreamFrame::s_num_channels = 4 |
|
staticconstexpr |
◆ version
| uint8_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::version = 1 |
|
staticconstexpr |
The documentation for this class was generated from the following file: