DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::fddetdataformats::CRTBernFrame Class Reference

Class for accessing/holding raw CRT data from the 'Bern' panels ProtoDUNE-II VD. More...

#include <CRTBernFrame.hpp>

Collaboration diagram for dunedaq::fddetdataformats::CRTBernFrame:
[legend]

Classes

struct  CRTBernData
 

Public Types

typedef uint64_t word_t
 

Public Member Functions

uint16_t get_adc (int i_ch) const
 Get the adc value for channel i_ch.
 
void set_adc (int i_ch, uint16_t val)
 Set the adc value for channel i_ch 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 also set the underlying ts0 to be consistent.
 
uint16_t get_mac5 () const
 Get the MAC5 identifier of the frame.
 
void set_mac5 (const uint16_t new_mac5)
 Set the MAC5 identifier of the frame.
 
uint16_t get_flags () const
 Get the flags field of the CRTBernData.
 
void set_flags (const uint16_t new_flags)
 Set the flags field of the CRTBernData.
 
uint16_t get_lostcpu () const
 Get the lostcpu counter of the CRTBernData.
 
void set_lostcpu (const uint16_t new_lostcpu)
 Set the lostcpu counter of the CRTBernData.
 
uint16_t get_lostfpga () const
 Get the lostfpga counter of the CRTBernData.
 
void set_lostfpga (const uint16_t new_lostfpga)
 Set the lostfpga counter of the CRTBernData.
 
uint32_t get_ts0 () const
 Get the ts0 timestamp of the CRTBernData.
 
void set_ts0 (const uint32_t new_ts0)
 Set the ts0 timestamp of the CRTBernData.
 
uint32_t get_ts1 () const
 Get the ts1 timestamp of the CRTBernData.
 
void set_ts1 (const uint32_t new_ts1)
 Set the ts1 timestamp of the CRTBernData.
 
uint32_t get_coinc () const
 Get the coinc counter of the CRTBernData.
 
void set_coinc (const uint32_t new_coinc)
 Set the coinc counter of the CRTBernData.
 

Public Attributes

detdataformats::DAQEthHeader daq_header
 
uint16_t mac5
 
CRTBernData data
 

Static Public Attributes

static constexpr int s_num_channels = 32
 
static constexpr uint64_t s_DTS_ticks_per_second = 62'500'000
 
static constexpr uint64_t s_ns_per_DTS_tick = 16
 

Detailed Description

Class for accessing/holding raw CRT data from the 'Bern' panels ProtoDUNE-II VD.

Definition at line 28 of file CRTBernFrame.hpp.

Member Typedef Documentation

◆ word_t

Member Function Documentation

◆ get_adc()

uint16_t dunedaq::fddetdataformats::CRTBernFrame::get_adc ( int i_ch) const
inline

Get the adc value for channel i_ch.

Definition at line 67 of file CRTBernFrame.hpp.

68 {
69 if (i_ch < 0 || i_ch >= s_num_channels)
70 throw std::out_of_range("ADC channel index out of range");
71
72 return data.adc[i_ch];
73 }

◆ get_coinc()

uint32_t dunedaq::fddetdataformats::CRTBernFrame::get_coinc ( ) const
inline

Get the coinc counter of the CRTBernData.

Definition at line 189 of file CRTBernFrame.hpp.

◆ get_flags()

uint16_t dunedaq::fddetdataformats::CRTBernFrame::get_flags ( ) const
inline

Get the flags field of the CRTBernData.

Definition at line 118 of file CRTBernFrame.hpp.

119 {
120 return data.flags; // NOLINT(build/unsigned)
121 }

◆ get_lostcpu()

uint16_t dunedaq::fddetdataformats::CRTBernFrame::get_lostcpu ( ) const
inline

Get the lostcpu counter of the CRTBernData.

Definition at line 132 of file CRTBernFrame.hpp.

133 {
134 return data.lostcpu; // NOLINT(build/unsigned)
135 }

◆ get_lostfpga()

uint16_t dunedaq::fddetdataformats::CRTBernFrame::get_lostfpga ( ) const
inline

Get the lostfpga counter of the CRTBernData.

Definition at line 146 of file CRTBernFrame.hpp.

147 {
148 return data.lostfpga; // NOLINT(build/unsigned)
149 }

◆ get_mac5()

uint16_t dunedaq::fddetdataformats::CRTBernFrame::get_mac5 ( ) const
inline

Get the MAC5 identifier of the frame.

Definition at line 104 of file CRTBernFrame.hpp.

105 {
106 return mac5 ; // NOLINT(build/unsigned)
107 }

◆ get_timestamp()

uint64_t dunedaq::fddetdataformats::CRTBernFrame::get_timestamp ( ) const
inline

Get the starting 64-bit timestamp of the frame.

Definition at line 88 of file CRTBernFrame.hpp.

89 {
90 return daq_header.get_timestamp() ; // NOLINT(build/unsigned)
91 }
detdataformats::DAQEthHeader daq_header

◆ get_ts0()

uint32_t dunedaq::fddetdataformats::CRTBernFrame::get_ts0 ( ) const
inline

Get the ts0 timestamp of the CRTBernData.

Definition at line 160 of file CRTBernFrame.hpp.

◆ get_ts1()

uint32_t dunedaq::fddetdataformats::CRTBernFrame::get_ts1 ( ) const
inline

Get the ts1 timestamp of the CRTBernData.

Definition at line 174 of file CRTBernFrame.hpp.

◆ set_adc()

void dunedaq::fddetdataformats::CRTBernFrame::set_adc ( int i_ch,
uint16_t val )
inline

Set the adc value for channel i_ch to val.

Definition at line 78 of file CRTBernFrame.hpp.

79 {
80 if (i_ch < 0 || i_ch >= s_num_channels)
81 throw std::out_of_range("ADC channel index out of range");
82
83 data.adc[i_ch]=val;
84 }

◆ set_coinc()

void dunedaq::fddetdataformats::CRTBernFrame::set_coinc ( const uint32_t new_coinc)
inline

Set the coinc counter of the CRTBernData.

Definition at line 196 of file CRTBernFrame.hpp.

197 {
198 data.coinc = new_coinc;
199 }

◆ set_flags()

void dunedaq::fddetdataformats::CRTBernFrame::set_flags ( const uint16_t new_flags)
inline

Set the flags field of the CRTBernData.

Definition at line 125 of file CRTBernFrame.hpp.

126 {
127 data.flags = new_flags;
128 }

◆ set_lostcpu()

void dunedaq::fddetdataformats::CRTBernFrame::set_lostcpu ( const uint16_t new_lostcpu)
inline

Set the lostcpu counter of the CRTBernData.

Definition at line 139 of file CRTBernFrame.hpp.

140 {
141 data.lostcpu = new_lostcpu;
142 }

◆ set_lostfpga()

void dunedaq::fddetdataformats::CRTBernFrame::set_lostfpga ( const uint16_t new_lostfpga)
inline

Set the lostfpga counter of the CRTBernData.

Definition at line 153 of file CRTBernFrame.hpp.

154 {
155 data.lostfpga = new_lostfpga;
156 }

◆ set_mac5()

void dunedaq::fddetdataformats::CRTBernFrame::set_mac5 ( const uint16_t new_mac5)
inline

Set the MAC5 identifier of the frame.

Definition at line 111 of file CRTBernFrame.hpp.

112 {
113 mac5 = new_mac5;
114 }

◆ set_timestamp()

void dunedaq::fddetdataformats::CRTBernFrame::set_timestamp ( const uint64_t new_timestamp)
inline

Set the starting 64-bit timestamp of the frame also set the underlying ts0 to be consistent.

Definition at line 96 of file CRTBernFrame.hpp.

97 {
98 daq_header.timestamp = new_timestamp;
100 }
static constexpr uint64_t s_ns_per_DTS_tick
static constexpr uint64_t s_DTS_ticks_per_second

◆ set_ts0()

void dunedaq::fddetdataformats::CRTBernFrame::set_ts0 ( const uint32_t new_ts0)
inline

Set the ts0 timestamp of the CRTBernData.

Definition at line 167 of file CRTBernFrame.hpp.

168 {
169 data.ts0 = new_ts0;
170 }

◆ set_ts1()

void dunedaq::fddetdataformats::CRTBernFrame::set_ts1 ( const uint32_t new_ts1)
inline

Set the ts1 timestamp of the CRTBernData.

Definition at line 181 of file CRTBernFrame.hpp.

182 {
183 data.ts1 = new_ts1;
184 }

Member Data Documentation

◆ daq_header

detdataformats::DAQEthHeader dunedaq::fddetdataformats::CRTBernFrame::daq_header

Definition at line 56 of file CRTBernFrame.hpp.

◆ data

CRTBernData dunedaq::fddetdataformats::CRTBernFrame::data

Definition at line 58 of file CRTBernFrame.hpp.

◆ mac5

uint16_t dunedaq::fddetdataformats::CRTBernFrame::mac5

Definition at line 57 of file CRTBernFrame.hpp.

◆ s_DTS_ticks_per_second

uint64_t dunedaq::fddetdataformats::CRTBernFrame::s_DTS_ticks_per_second = 62'500'000
staticconstexpr

Definition at line 39 of file CRTBernFrame.hpp.

◆ s_ns_per_DTS_tick

uint64_t dunedaq::fddetdataformats::CRTBernFrame::s_ns_per_DTS_tick = 16
staticconstexpr

Definition at line 40 of file CRTBernFrame.hpp.

◆ s_num_channels

int dunedaq::fddetdataformats::CRTBernFrame::s_num_channels = 32
staticconstexpr

Definition at line 38 of file CRTBernFrame.hpp.


The documentation for this class was generated from the following file: