38 JToA_t(
const JToA&
data,
const int counter) :
51 friend inline std::ostream&
operator<<(std::ostream& out,
const JToA_t&
object)
56 out << setw(6) <<
object.RUN <<
' '
57 << setw(8) <<
object.counter <<
' '
58 <<
FIXED(20,5) << (
static_cast<double>(
object.SECONDS) + static_cast<double>(
object.TICKS)*16
E-9) <<
' '
59 << setw(10) <<
object.DOMID <<
' '
60 <<
FIXED(9,6) <<
object.TOA_NS <<
' '
61 <<
FIXED(5,0) <<
object.QUALITYFACTOR;
76 friend inline bool operator<(
const JToA_t&
first,
const JToA_t& second)
78 return (first.TOA_NS < second.TOA_NS);
90 int main(
int argc,
char **argv)
103 JParser<> zap(
"Example program to test acoustic data.");
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);
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";
Utility class to parse command line options.
int main(int argc, char *argv[])
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
bool operator<(const Head &first, const Head &second)
Less than operator.
ROOT TTree parameter settings.
int32_t WAVEFORMID
DOM unique identifeir.
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
static counter_type max()
Get maximum counter value.
Time-of-arrival data from acoustic piezo sensor or hydrophone.
Auxiliary data structure for floating point format specification.
std::vector< JHitW0 > buffer_type
hits
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Auxiliary class for defining the range of iterations of objects.
static const double TOAMAX_S
Maximal allowed time-of-arrival [s].
I/O formatting auxiliaries.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
const JLimit & getLimit() const
Get limit.
uint32_t DOMID
DAQ run number.
Auxiliary data structure for floating point format specification.
#define DEBUG(A)
Message macros.