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

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

#include <CRTGrenobleFrame.hpp>

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

Classes

struct  TGpsDateStruct
struct  STChannel
struct  STEvent

Public Types

using word_t = uint64_t

Public Member Functions

int get_adc (const int i_ch) const
 Get the adc value for channel i_ch.
void set_adc (const int i_ch, const int 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.

Public Attributes

detdataformats::DAQEthHeader daq_header
STEvent event

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
static constexpr std::size_t s_expected_bytes

Detailed Description

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

Definition at line 34 of file CRTGrenobleFrame.hpp.

Member Typedef Documentation

◆ word_t

Definition at line 37 of file CRTGrenobleFrame.hpp.

Member Function Documentation

◆ get_adc()

int dunedaq::fddetdataformats::CRTGrenobleFrame::get_adc ( const int i_ch) const
inline

Get the adc value for channel i_ch.

Definition at line 96 of file CRTGrenobleFrame.hpp.

97 {
98 if (i_ch < 0 || i_ch >= s_num_channels)
99 throw std::out_of_range("ADC channel index out of range");
100
101 return event.channels[i_ch].qTot;
102 }

◆ get_timestamp()

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

Get the starting 64-bit timestamp of the frame.

Definition at line 114 of file CRTGrenobleFrame.hpp.

◆ set_adc()

void dunedaq::fddetdataformats::CRTGrenobleFrame::set_adc ( const int i_ch,
const int val )
inline

Set the adc value for channel i_ch to val.

Definition at line 105 of file CRTGrenobleFrame.hpp.

106 {
107 if (i_ch < 0 || i_ch >= s_num_channels)
108 throw std::out_of_range("ADC channel index out of range");
109
110 event.channels[i_ch].qTot = val; // NOLINT(cppcoreguidelines-pro-bounds-constant-array-index)
111 }

◆ set_timestamp()

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

Set the starting 64-bit timestamp of the frame.

Definition at line 117 of file CRTGrenobleFrame.hpp.

Member Data Documentation

◆ daq_header

detdataformats::DAQEthHeader dunedaq::fddetdataformats::CRTGrenobleFrame::daq_header

Definition at line 119 of file CRTGrenobleFrame.hpp.

◆ event

STEvent dunedaq::fddetdataformats::CRTGrenobleFrame::event

Definition at line 120 of file CRTGrenobleFrame.hpp.

◆ s_DTS_ticks_per_second

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

Definition at line 40 of file CRTGrenobleFrame.hpp.

◆ s_expected_bytes

std::size_t dunedaq::fddetdataformats::CRTGrenobleFrame::s_expected_bytes
staticconstexpr
Initial value:
DAQEthHeader is a versioned and unified structure for every FE electronics.

Definition at line 92 of file CRTGrenobleFrame.hpp.

◆ s_ns_per_DTS_tick

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

Definition at line 41 of file CRTGrenobleFrame.hpp.

◆ s_num_channels

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

Definition at line 39 of file CRTGrenobleFrame.hpp.


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