96 JLimit_t& numberOfEvents = inputFile.getLimit();
103 JParser<> zap(
"Example program to test acoustic data.");
106 zap[
'n'] =
make_field(numberOfEvents) = JLimit::max();
113 catch(
const exception &error) {
114 FATAL(error.what() << endl);
122 for (
int counter = 0; inputFile.
hasNext(); ++counter) {
124 STATUS(
"counter: " << setw(8) << counter <<
'\r' << flush);
DEBUG(endl);
126 const JToA* parameters = inputFile.
next();
132 constexpr
double s2ns = 1E9;
140 sort(buffer.begin(), buffer.end());
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) {
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)) {
149 if (!allowed || (p->TOA_NS < llrint(s2ns*
TOAMAX_S) &&
150 q->TOA_NS < llrint(s2ns*
TOAMAX_S))) {
155 cout <<
"Difference between absolute times "
156 <<
SCIENTIFIC(12,3) << (p->TOA_NS-q->TOA_NS) <<
" nanoseconds\n";
#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.
Auxiliary data structure for floating point format specification.