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

Class 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

Detailed Description

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

Definition at line 28 of file CRTGrenobleFrame.hpp.

Member Typedef Documentation

◆ word_t

Definition at line 32 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 85 of file CRTGrenobleFrame.hpp.

86 {
87 if (i_ch < 0 || i_ch >= s_num_channels)
88 throw std::out_of_range("ADC channel index out of range");
89
90 return event.channels[i_ch].qTot;
91 }

◆ get_timestamp()

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

Get the starting 64-bit timestamp of the frame.

Definition at line 103 of file CRTGrenobleFrame.hpp.

103{ 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 94 of file CRTGrenobleFrame.hpp.

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

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

106{ daq_header.timestamp = new_timestamp; }

Member Data Documentation

◆ daq_header

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

Definition at line 81 of file CRTGrenobleFrame.hpp.

◆ event

STEvent dunedaq::fddetdataformats::CRTGrenobleFrame::event

Definition at line 82 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 35 of file CRTGrenobleFrame.hpp.

◆ s_ns_per_DTS_tick

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

Definition at line 36 of file CRTGrenobleFrame.hpp.

◆ s_num_channels

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

Definition at line 34 of file CRTGrenobleFrame.hpp.


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