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 { sizeof(detdataformats::DAQEthHeader) + CRTGrenobleFrame::STEvent::s_expected_size }

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 93 of file CRTGrenobleFrame.hpp.

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

◆ get_timestamp()

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

Get the starting 64-bit timestamp of the frame.

Definition at line 111 of file CRTGrenobleFrame.hpp.

111{ return daq_header.get_timestamp(); }

◆ 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 102 of file CRTGrenobleFrame.hpp.

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

◆ 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 114 of file CRTGrenobleFrame.hpp.

114{ daq_header.timestamp = new_timestamp; }

Member Data Documentation

◆ daq_header

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

Definition at line 116 of file CRTGrenobleFrame.hpp.

◆ event

STEvent dunedaq::fddetdataformats::CRTGrenobleFrame::event

Definition at line 117 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 { sizeof(detdataformats::DAQEthHeader) + CRTGrenobleFrame::STEvent::s_expected_size }
staticconstexpr

Definition at line 90 of file CRTGrenobleFrame.hpp.

90{ sizeof(detdataformats::DAQEthHeader) + CRTGrenobleFrame::STEvent::s_expected_size };

◆ 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: