27{
31
33
34 try {
35
36 JParser<> zap(
"Example program to test DAQ hit selection using JTRIGGER::JBuildL0.");
37
39
40 zap(argc, argv);
41 }
42 catch(const exception &error) {
43 FATAL(error.what() << endl);
44 }
45
46
47 const JModule module = getModule<JKM3NeT_t>(1001);
48
52
54
55 {
57
58 for (int i = 0; i != 100; ++i) {
59 buffer.push_back(
JDAQHit(0, 0, tot));
60 }
61
62 frame.add(buffer.size(), buffer.data());
63 }
64
66
67
69 vector <double> buffer;
70
71
72 buildL0(frame, module, back_inserter(buffer));
73
74 ASSERT(buffer.size() == (
size_t) frame.size(),
"Test of L0 hit building w/o DAQ hit selection " << buffer.size() <<
" ?= " << frame.size());
75
76
78
79 buffer.clear();
80
81 buildL0(frame, module, back_inserter(buffer));
82
83 ASSERT(buffer.size() == 0u,
"Test of L0 hit building with DAQ hit selection " << buffer.size() <<
" ?= " << 0u);
84
85
87
88 buffer.clear();
89
90 buildL0(frame, module, back_inserter(buffer));
91
92 ASSERT(buffer.size() == (
size_t) frame.size(),
"Test of L0 hit building w/o DAQ hit selection " << buffer.size() <<
" ?= " << frame.size());
93
94 return 0;
95}
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for a composite optical module.
int getID() const
Get identifier.
Utility class to parse command line options.
unsigned char JTOT_t
time over threshold [ns]
Data frame of one optical module.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
void setDAQHitSelector(const JDAQHitSelector &selector)
Set DAQ hit selector.
void resetDAQHitSelector()
Reset DAQ hit selector.
Auxiliary class to select DAQ hits based on time-over-treshold value.