39 JToAshort_t(
const JToAshort& data,
const int counter) :
52 friend inline std::ostream&
operator<<(std::ostream& out,
const JToAshort_t&
object)
57 out << setw(6) <<
object.RUN <<
' '
58 << setw(8) <<
object.counter <<
' '
59 <<
FIXED(20,5) <<
object.UNIXTIMEBASE <<
' '
60 << setw(10) <<
object.DOMID <<
' '
61 <<
FIXED(9,6) <<
object.TOA_S <<
' '
62 <<
FIXED(5,0) <<
object.QUALITYFACTOR;
77 friend inline bool operator<(
const JToAshort_t&
first,
const JToAshort_t& second)
79 return (first.UNIXTIMEBASE + first.TOA_S < second.UNIXTIMEBASE + second.TOA_S);
91 int main(
int argc,
char **argv)
104 JParser<> zap(
"Example program to test acoustic data.");
114 catch(
const exception &error) {
115 FATAL(error.what() << endl);
123 for (
int counter = 0; inputFile.hasNext(); ++counter) {
125 STATUS(
"counter: " << setw(8) << counter <<
'\r' << flush);
DEBUG(endl);
129 data[parameters->
EMITTERID][parameters->
DOMID].push_back(JToAshort_t(*parameters, counter));
138 buffer_type& buffer = module->second;
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 (labs(p->DOMID - q->DOMID) == 0 &&
146 fabs(p->QUALITYFACTOR - q->QUALITYFACTOR) <= precision &&
147 fabs((p->UNIXTIMEBASE + p->TOA_S) -
148 (q->UNIXTIMEBASE + q->TOA_S)) <= precision) {
150 if (!allowed || (p->TOA_S <
TOAMAX_S &&
156 cout <<
"Difference between absolute times "
157 <<
SCIENTIFIC(12,3) << ((p->UNIXTIMEBASE + p->TOA_S) -
158 (q->UNIXTIMEBASE + q->TOA_S)) << endl;
Utility class to parse command line options.
int main(int argc, char *argv[])
bool operator<(const Head &first, const Head &second)
Less than operator.
*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.
Auxiliary data structure for floating point format specification.
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
ROOT TTree parameter settings.
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.
Auxiliary data structure for floating point format specification.
int EMITTERID
waveform identifier
#define DEBUG(A)
Message macros.