DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
fdreadoutlibs
src
crt
CRTBernFrameProcessor.cpp
Go to the documentation of this file.
1
9
#include "
fdreadoutlibs/crt/CRTBernFrameProcessor.hpp
"
// NOLINT(build/include)
10
11
namespace
dunedaq
{
12
namespace
fdreadoutlibs {
13
14
void
CRTBernFrameProcessor::conf
(
const
appmodel::DataHandlerModule
*
/*conf*/
)
15
{
16
TLOG
() <<
"Registering processing tasks..."
;
17
datahandlinglibs::TaskRawDataProcessorModel<types::CRTBernTypeAdapter>::add_preprocess_task
(std::bind(&
CRTBernFrameProcessor::timestamp_check
,
this
, std::placeholders::_1));
18
}
19
20
void
CRTBernFrameProcessor::timestamp_check
(
types::CRTBernTypeAdapter
* fp)
21
{
22
static
const
uint64_t k_clock_frequency = 62500000;
// NOLINT(build/unsigned)
23
auto
current_ts = fp->
get_timestamp
();
24
TLOG_DEBUG
(TLVL_FRAME_RECEIVED) <<
"Received CRTBern frame timestamp value of "
<< current_ts <<
" ticks (..."
<< std::fixed << std::setprecision(8) << (static_cast<double>(current_ts % (k_clock_frequency*1000)) /
static_cast<
double
>
(k_clock_frequency)) <<
" sec)"
;
// NOLINT
25
26
if
(current_ts >
m_last_processed_daq_ts
)
m_last_processed_daq_ts
= current_ts;
27
}
28
29
30
}
// namespace fdreadoutlibs
31
}
// namespace dunedaq
CRTBernFrameProcessor.hpp
dunedaq::appmodel::DataHandlerModule
Definition
DataHandlerModule.hpp:35
dunedaq::datahandlinglibs::TaskRawDataProcessorModel::add_preprocess_task
void add_preprocess_task(Task &&task)
Definition
TaskRawDataProcessorModel.hxx:73
dunedaq::datahandlinglibs::TaskRawDataProcessorModel< types::CRTBernTypeAdapter >::m_last_processed_daq_ts
std::atomic< uint64_t > m_last_processed_daq_ts
Definition
TaskRawDataProcessorModel.hpp:123
dunedaq::fdreadoutlibs::CRTBernFrameProcessor::timestamp_check
void timestamp_check(types::CRTBernTypeAdapter *fp)
Definition
CRTBernFrameProcessor.cpp:20
dunedaq::fdreadoutlibs::CRTBernFrameProcessor::conf
void conf(const appmodel::DataHandlerModule *conf) override
Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.
Definition
CRTBernFrameProcessor.cpp:14
TLOG_DEBUG
#define TLOG_DEBUG(lvl,...)
Definition
Logging.hpp:112
TLOG
#define TLOG(...)
Definition
macro.hpp:22
dunedaq
Including Qt Headers.
Definition
TimingController.hxx:1
dunedaq::fdreadoutlibs::types::CRTBernTypeAdapter
Definition
CRTBernTypeAdapter.hpp:21
dunedaq::fdreadoutlibs::types::CRTBernTypeAdapter::get_timestamp
uint64_t get_timestamp() const
Definition
CRTBernTypeAdapter.hpp:33
Generated on Sat Jun 28 2025 for DUNE-DAQ by
1.12.0