DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
fddetdataformats
include
fddetdataformats
detail
TDEEthFrame.hxx
Go to the documentation of this file.
1
2
namespace
dunedaq::fddetdataformats
{
3
4
inline
uint16_t
5
TDEEthFrame::get_adc
(
int
i_channel,
int
i_sample)
const
6
{
7
8
// Note the generic get_adc_2d function takes the channel and the sample (timeslice) in reverse order
9
// Also note that the value returned by get_adc_2d is stored in a uint64_t (TDEEthFrame::word_t) but is
10
// guaranteed to be storable in a uint16_t since TDEEthFrame::s_bits_per_adc < 16.
11
12
return
static_cast<
uint16_t
>
(
13
dunedaq::fddetdataformats::get_adc_2d
<
TDEEthFrame::word_t
,
14
TDEEthFrame::s_time_samples_per_frame
,
15
TDEEthFrame::s_num_adc_words_per_ts
,
16
TDEEthFrame::s_bits_per_adc
>(i_sample, i_channel,
adc_words
));
17
}
18
19
inline
void
20
TDEEthFrame::set_adc
(
int
i_channel,
int
i_sample, uint16_t adc_val)
21
{
22
dunedaq::fddetdataformats::set_adc_2d
<
TDEEthFrame::word_t
,
23
TDEEthFrame::s_time_samples_per_frame
,
24
TDEEthFrame::s_num_adc_words_per_ts
,
25
TDEEthFrame::s_bits_per_adc
>(i_sample, i_channel, adc_val,
adc_words
);
26
}
27
28
}
// namespace dunedaq::fddetdataformats
dunedaq::fddetdataformats::TDEEthFrame::s_bits_per_adc
static constexpr int s_bits_per_adc
Definition
TDEEthFrame.hpp:44
dunedaq::fddetdataformats::TDEEthFrame::get_adc
uint16_t get_adc(int i_channel, int i_sample=0) const
Get the i_channel-th ADC value in the i_sample-th time sample.
Definition
TDEEthFrame.hxx:5
dunedaq::fddetdataformats::TDEEthFrame::set_adc
void set_adc(int i_channel, int i_sample, uint16_t val)
Set the i_channel-th ADC value in the i_sample-th time sample to val.
Definition
TDEEthFrame.hxx:20
dunedaq::fddetdataformats::TDEEthFrame::s_time_samples_per_frame
static constexpr int s_time_samples_per_frame
Definition
TDEEthFrame.hpp:46
dunedaq::fddetdataformats::TDEEthFrame::s_num_adc_words_per_ts
static constexpr int s_num_adc_words_per_ts
Definition
TDEEthFrame.hpp:50
dunedaq::fddetdataformats::TDEEthFrame::word_t
uint64_t word_t
Definition
TDEEthFrame.hpp:42
dunedaq::fddetdataformats::TDEEthFrame::adc_words
word_t adc_words[s_time_samples_per_frame][s_num_adc_words_per_ts]
Definition
TDEEthFrame.hpp:65
dunedaq::fddetdataformats
Definition
CRTBernFrame.hpp:23
dunedaq::fddetdataformats::set_adc_2d
void set_adc_2d(const int i_sample, const int i_adc, WordType adc_val, WordType(&adc_matrix)[Rows][Columns])
Definition
Utils.hpp:216
dunedaq::fddetdataformats::get_adc_2d
WordType get_adc_2d(const int i_sample, const int i_adc, const WordType(&adc_matrix)[Rows][Columns])
Definition
Utils.hpp:179
Generated on
for DUNE-DAQ by
1.16.1