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
32class DAPHNEStreamFrameProcessor : public datahandlinglibs::TaskRawDataProcessorModel<types::DAPHNEStreamSuperChunkTypeAdapter>
33{
34
35public:
39 using timestamp_t = std::uint64_t; // NOLINT(build/unsigned)
40
41 explicit DAPHNEStreamFrameProcessor(std::unique_ptr<datahandlinglibs::FrameErrorRegistry>& error_registry, bool post_processing_enabled)
42 : datahandlinglibs::TaskRawDataProcessorModel<types::DAPHNEStreamSuperChunkTypeAdapter>(error_registry, post_processing_enabled)
43 {}
44
45 // Override config for pipeline setup
46 void conf(const appmodel::DataHandlerModule* conf) override;
47
48protected:
52 void timestamp_check(frameptr /*fp*/);
53
57 void frame_error_check(frameptr /*fp*/);
58
59 // Internals
62 bool m_first_ts_fake = true;
64 bool m_problem_reported = false;
65 std::atomic<int> m_ts_error_ctr{ 0 };
66
67};
68
69} // namespace fdreadoutlibs
70} // namespace dunedaq
71
72#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)
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.
Including Qt Headers.