DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DAPHNEEthStreamFrameProcessor.hpp
Go to the documentation of this file.
1
9#ifndef FDREADOUTLIBS_INCLUDE_FDREADOUTLIBS_DAPHNEETH_DAPHNEETHSTREAMFRAMEPROCESSOR_HPP_
10#define FDREADOUTLIBS_INCLUDE_FDREADOUTLIBS_DAPHNEETH_DAPHNEETHSTREAMFRAMEPROCESSOR_HPP_
11
12#include "logging/Logging.hpp"
13
18
21
22#include <atomic>
23#include <functional>
24#include <memory>
25#include <string>
26
28
29namespace dunedaq {
30namespace fdreadoutlibs {
31
33 : public datahandlinglibs::TaskRawDataProcessorModel<types::DAPHNEEthStreamTypeAdapter>
34{
35
36public:
40 using timestamp_t = std::uint64_t; // NOLINT(build/unsigned)
41
42 explicit DAPHNEEthStreamFrameProcessor(std::unique_ptr<datahandlinglibs::FrameErrorRegistry>& error_registry,
43 bool post_processing_enabled)
44 : datahandlinglibs::TaskRawDataProcessorModel<types::DAPHNEEthStreamTypeAdapter>(error_registry,
45 post_processing_enabled)
46 {
47 }
48
49 // Override config for pipeline setup
50 void conf(const appmodel::DataHandlerModule* conf) override;
51
52protected:
56 void timestamp_check(frameptr /*fp*/);
57
61 void frame_error_check(frameptr /*fp*/);
62
63 // Internals
66 bool m_first_ts_fake = true;
68 bool m_problem_reported = false;
69 std::atomic<int> m_ts_error_ctr{ 0 };
70};
71
72} // namespace fdreadoutlibs
73} // namespace dunedaq
74
75#endif // FDREADOUTLIBS_INCLUDE_FDREADOUTLIBS_DAPHNEETH_DAPHNEETHSTREAMFRAMEPROCESSOR_HPP_
TaskRawDataProcessorModel(std::unique_ptr< FrameErrorRegistry > &error_registry, bool post_processing_enabled)
void conf(const appmodel::DataHandlerModule *conf) override
Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.
dunedaq::fddetdataformats::DAPHNEEthStreamFrame * daphneframeptr
datahandlinglibs::TaskRawDataProcessorModel< types::DAPHNEEthStreamTypeAdapter > inherited
DAPHNEEthStreamFrameProcessor(std::unique_ptr< datahandlinglibs::FrameErrorRegistry > &error_registry, bool post_processing_enabled)
The DUNE-DAQ namespace.
Struct for accessing raw DAPHNE eth stream frames.