Class for accessing raw DAPHNE eth stream frames, as used in ProtoDUNE-II.
More...
#include <DAPHNEEthStreamFrame.hpp>
|
| uint16_t | get_adc (uint i_adc, uint i_channel) const |
| | Get the i_adc-th ADC value of i_channel-th channel in the frame.
|
| void | set_adc (uint i_channel, uint i_adc, uint16_t val) |
| | Set the i_adc-th ADC value of i_channel-th channel 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 uint i_channel) const |
| | Get the channel identifier of the frame.
|
| void | set_channel (const uint i_channel, 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 2088726: https://edms.cern.ch/document/2088726/XXX (XXX a stand-in for the doc version, e.g. 5)
Definition at line 42 of file DAPHNEEthStreamFrame.hpp.
◆ word_t
◆ get_adc()
| uint16_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_adc |
( |
uint | i_adc, |
|
|
uint | i_channel ) const |
|
inline |
Get the i_adc-th ADC value of i_channel-th channel in the frame.
Definition at line 28 of file DAPHNEEthStreamFrame.hxx.
29{
30 return static_cast<uint16_t>(
33 static_cast<int>(i_adc),
static_cast<int>(i_channel),
adc_words));
34}
◆ get_channel()
| uint8_t dunedaq::fddetdataformats::DAPHNEEthStreamFrame::get_channel |
( |
const uint | i_channel | ) |
const |
|
inline |
Get the channel identifier of the frame.
Definition at line 5 of file DAPHNEEthStreamFrame.hxx.
6{
8 throw std::out_of_range(
9 std::format(
"Requested channel index of {} is outside of allowed range 0-{}", i_channel,
s_num_channels - 1));
10 }
11
12 return header.channel_words[i_channel].channel;
13}
◆ 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 | i_channel, |
|
|
uint | i_adc, |
|
|
uint16_t | val ) |
|
inline |
Set the i_adc-th ADC value of i_channel-th channel in the frame to val.
Definition at line 37 of file DAPHNEEthStreamFrame.hxx.
38{
41 static_cast<int>(i_adc),
static_cast<int>(i_channel), val,
adc_words);
42}
◆ set_channel()
| void dunedaq::fddetdataformats::DAPHNEEthStreamFrame::set_channel |
( |
const uint | i_channel, |
|
|
const uint8_t | new_channel_val ) |
|
inline |
Set the channel identifier of the frame.
Definition at line 16 of file DAPHNEEthStreamFrame.hxx.
17{
19 throw std::out_of_range(
20 std::format(
"Requested channel index of {} is outside of allowed range 0-{}", i_channel,
s_num_channels - 1));
21 }
22
23 header.channel_words[i_channel].channel =
24 new_channel_val;
25}
◆ 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 files: