/
TriggerActivityMaker.hpp
37 lines (29 loc) · 1.08 KB
/
TriggerActivityMaker.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* @file TriggerActivityMaker.hpp
*
* This is part of the DUNE DAQ Application Framework, copyright 2020.
* Licensing/copyright details are in the COPYING file that you should have
* received with this code.
*/
#ifndef TRIGGERALGS_INCLUDE_TRIGGERALGS_TRIGGERACTIVITYMAKER_HPP_
#define TRIGGERALGS_INCLUDE_TRIGGERALGS_TRIGGERACTIVITYMAKER_HPP_
#include "triggeralgs/TriggerActivity.hpp"
#include "triggeralgs/TriggerPrimitive.hpp"
#include "triggeralgs/Types.hpp"
#include <nlohmann/json.hpp>
#include <vector>
#include <atomic>
#include <chrono>
namespace triggeralgs {
class TriggerActivityMaker
{
public:
virtual ~TriggerActivityMaker() = default;
virtual void operator()(const TriggerPrimitive& input_tp, std::vector<TriggerActivity>& output_ta) = 0;
virtual void flush(timestamp_t /* until */, std::vector<TriggerActivity>&) {}
virtual void configure(const nlohmann::json&) {}
std::atomic<uint64_t> m_data_vs_system_time = 0;
std::atomic<uint64_t> m_initial_offset = 0;
};
} // namespace triggeralgs
#endif // TRIGGERALGS_INCLUDE_TRIGGERALGS_TRIGGERACTIVITYMAKER_HPP_