91{
94
96 JLimit_t& numberOfEvents = inputFile.getLimit();
97 double precision;
98 bool allowed;
100
101 try {
102
103 JParser<> zap(
"Example program to test acoustic data.");
104
110
111 zap(argc, argv);
112 }
113 catch(const exception &error) {
114 FATAL(error.what() << endl);
115 }
116
117
119
121
122 for (
int counter = 0; inputFile.
hasNext(); ++counter) {
123
124 STATUS(
"counter: " << setw(8) << counter <<
'\r' << flush);
DEBUG(endl);
125
126 const JToA* parameters = inputFile.
next();
127
129 }
131
132 constexpr double s2ns = 1E9;
133
135
137
139
140 sort(buffer.begin(), buffer.end());
141
142 for (buffer_type::const_iterator p = buffer.begin(); p != buffer.end(); ++p) {
143 for (buffer_type::const_iterator q = buffer.begin(); q != p; ++q) {
144
145 if (p->DOMID == q->DOMID &&
146 p->QUALITYFACTOR - q->QUALITYFACTOR <= lrint(s2ns*precision) &&
147 llabs(p->TOA_NS - q->TOA_NS) <= llrint(s2ns*precision)) {
148
149 if (!allowed || (p->TOA_NS < llrint(s2ns*
TOAMAX_S) &&
150 q->TOA_NS < llrint(s2ns*
TOAMAX_S))) {
151
152 cout << *p << endl;
153 cout << *q << endl;
154
155 cout << "Difference between absolute times "
156 <<
SCIENTIFIC(12,3) << (p->TOA_NS-q->TOA_NS) <<
" nanoseconds\n";
157 }
158 }
159 }
160 }
161 }
162 }
163}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.
General purpose class for object reading from a list of file names.
virtual bool hasNext() override
Check availability of next element.
virtual const pointer_type & next() override
Get next element.
static const double TOAMAX_S
Maximal allowed time-of-arrival [s].
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::vector< JHitW0 > buffer_type
hits
Time-of-arrival data from acoustic piezo sensor or hydrophone.
uint32_t DOMID
DAQ run number.
int32_t WAVEFORMID
DOM unique identifeir.
Auxiliary class for defining the range of iterations of objects.
static counter_type max()
Get maximum counter value.
Auxiliary data structure for floating point format specification.