DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TDMakerSupernovaAlgorithm.cpp
Go to the documentation of this file.
1
10
11#include <algorithm>
12#include <chrono>
13#include <limits>
14#include <vector>
15
16using pd_clock = std::chrono::duration<double, std::ratio<1, 62500000>>;
17using namespace triggeralgs;
18
19void
20TDMakerSupernovaAlgorithm::operator()(const TriggerCandidate& cand, std::vector<TriggerDecision>& decisions)
21{
22
23 std::vector<TriggerCandidate> vCand;
24 vCand.push_back(cand);
25
26 auto now = std::chrono::steady_clock::now();
27 // Timestamp
28 uint32_t algorithm = (uint32_t)pd_clock(now.time_since_epoch()).count(); // NOLINT(build/unsigned)
29
30 TriggerDecision trigger{ cand.time_start,
31 cand.time_end,
32 cand.time_candidate,
33 0,
34 0,
35 0,
36 // cand.detid,
37 0,
39 cand.version,
40 vCand };
41
42 // Give the trigger word back
43 decisions.push_back(trigger);
44 return;
45}
std::chrono::duration< double, std::ratio< 1, 62500000 > > pd_clock
void operator()(const TriggerCandidate &, std::vector< TriggerDecision > &)
This decision maker just spits out the trigger candidates.
static int64_t now()