DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DAPHNEStreamFrameProcessor.hpp
Go to the documentation of this file.
1
9#ifndef FDREADOUTLIBS_INCLUDE_FDREADOUTLIBS_DAPHNE_DAPHNESTREAMFRAMEPROCESSOR_HPP_
10#define FDREADOUTLIBS_INCLUDE_FDREADOUTLIBS_DAPHNE_DAPHNESTREAMFRAMEPROCESSOR_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::DAPHNEStreamSuperChunkTypeAdapter>
34{
35
36public:
40 using timestamp_t = std::uint64_t; // NOLINT(build/unsigned)
41
42 explicit DAPHNEStreamFrameProcessor(std::unique_ptr<datahandlinglibs::FrameErrorRegistry>& error_registry,
43 bool post_processing_enabled)
44 : datahandlinglibs::TaskRawDataProcessorModel<types::DAPHNEStreamSuperChunkTypeAdapter>(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_DAPHNE_DAPHNESTREAMFRAMEPROCESSOR_HPP_
TaskRawDataProcessorModel(std::unique_ptr< FrameErrorRegistry > &error_registry, bool post_processing_enabled)
DAPHNEStreamFrameProcessor(std::unique_ptr< datahandlinglibs::FrameErrorRegistry > &error_registry, bool post_processing_enabled)
dunedaq::fddetdataformats::DAPHNEStreamFrame * daphneframeptr
types::DAPHNEStreamSuperChunkTypeAdapter * frameptr
void conf(const appmodel::DataHandlerModule *conf) override
Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.
datahandlinglibs::TaskRawDataProcessorModel< types::DAPHNEStreamSuperChunkTypeAdapter > inherited
The DUNE-DAQ namespace.