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  STChannel
 
struct  STEvent
 
struct  TGpsDateStruct
 

Public Types

typedef uint64_t word_t
 

Public Member Functions

int get_adc (int i_ch) const
 Get the adc value for channel i_ch.
 
void set_adc (int i_ch, 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 int s_bits_per_adc = 16
 
static constexpr int s_bits_per_word = 8 * sizeof(word_t)
 
static constexpr int s_num_adcs = 64
 

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

Member Function Documentation

◆ get_adc()

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

Get the adc value for channel i_ch.

Definition at line 89 of file CRTGrenobleFrame.hpp.

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

◆ get_timestamp()

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

Get the starting 64-bit timestamp of the frame.

Definition at line 110 of file CRTGrenobleFrame.hpp.

111 {
112 return daq_header.get_timestamp() ; // NOLINT(build/unsigned)
113 }

◆ set_adc()

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

Set the adc value for channel i_ch to val.

Definition at line 100 of file CRTGrenobleFrame.hpp.

101 {
102 if (i_ch < 0 || i_ch >= s_num_channels)
103 throw std::out_of_range("ADC channel index out of range");
104
105 event.channels[i_ch].qTot=val;
106 }

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

118 {
119 daq_header.timestamp = new_timestamp;
120 }

Member Data Documentation

◆ daq_header

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

Definition at line 79 of file CRTGrenobleFrame.hpp.

◆ event

STEvent dunedaq::fddetdataformats::CRTGrenobleFrame::event

Definition at line 80 of file CRTGrenobleFrame.hpp.

◆ s_bits_per_adc

int dunedaq::fddetdataformats::CRTGrenobleFrame::s_bits_per_adc = 16
staticconstexpr

Definition at line 42 of file CRTGrenobleFrame.hpp.

◆ s_bits_per_word

int dunedaq::fddetdataformats::CRTGrenobleFrame::s_bits_per_word = 8 * sizeof(word_t)
staticconstexpr

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

◆ s_ns_per_DTS_tick

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

Definition at line 40 of file CRTGrenobleFrame.hpp.

◆ s_num_adcs

int dunedaq::fddetdataformats::CRTGrenobleFrame::s_num_adcs = 64
staticconstexpr

Definition at line 44 of file CRTGrenobleFrame.hpp.

◆ s_num_channels

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

Definition at line 38 of file CRTGrenobleFrame.hpp.


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