Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JToA.hh
Go to the documentation of this file.
1#ifndef __JACOUSTICS__JTOA__
2#define __JACOUSTICS__JTOA__
3
4#include <cstdint>
5#include <ostream>
6#include <iomanip>
7
8#include <TObject.h>
9
10
11/**
12 * \file
13 *
14 * Acoustic event.
15 * \author mdejong
16 */
17namespace JACOUSTICS {}
18namespace JPP {
19 using namespace JACOUSTICS;
20}
21
22namespace JACOUSTICS {
23
24 /**
25 * Time-of-arrival data from acoustic piezo sensor or hydrophone.
26 */
27 struct JToA
28 {
29
31
32 int32_t DETID{}; /// detector identifier
33 int32_t RUN{}; /// DAQ run number
34 uint32_t DOMID{}; /// DOM unique identifeir
35 int32_t WAVEFORMID{}; /// Unique ID of the waveform that best described the signal around TOA_NS
36 int64_t TOA_NS{}; /// Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC)
37 uint32_t SECONDS{}; /// The seconds part of the DAQ frame timestamp
38 uint32_t TICKS{}; /// The ticks (16ns) part of the DAQ frame timestamp
39 uint32_t QUALITYFACTOR{}; /// A measure of how good the waveform match was to the signal
40 uint32_t QUALITYNORMALISATION{}; /// Normalization for the quality factor
41
42 /** Time stamp of the DAQ frame start in nanoseconds
43 * since the Unix epoch (1 January 1970 00:00:00 +0ns UTC)
44 */
45 int64_t daqFrameTimeStart_ns() const;
46
47 /** Time of Arrival, expressed in nanoseconds
48 * relative to the DAQ frame start. Accurate to the nanosecond.
49 */
50 int64_t relativeToA_ns() const;
51
52 /** Time stamp of the DAQ frame start, in seconds
53 * since the Unix epoch (1 January 1970 00:00:00 UTC)
54 */
55 double daqFrameTimeStart_s() const;
56
57 /** Time of Arrival, expressed in seconds
58 * relative to Unix epoch (1 January 1970 00:00:00 UTC)
59 */
60 double TOA_S() const;
61
62 /** Time of Arrival, expressed in seconds
63 * relative to the DAQ frame start. Accurate to the (micro)second
64 */
65 double relativeToA_s() const;
66
68
69 /**
70 * Write time-of-arrival data to output stream.
71 *
72 * \param out output stream
73 * \param object time-of-arrival data
74 * \return output stream
75 */
76 friend inline std::ostream& operator<<(std::ostream& out, const JToA& object)
77 {
78 using namespace std;
79
80 return out << setw(6) << object.DETID << ' '
81 << setw(8) << object.RUN << ' '
82 << setw(8) << object.DOMID << ' '
83 << setw(4) << object.WAVEFORMID << ' '
84 << setw(16) << object.TOA_NS << ' '
85 << setw(8) << object.SECONDS << ' '
86 << setw(8) << object.TICKS << ' '
87 << setw(8) << object.QUALITYFACTOR << ' '
88 << setw(8) << object.QUALITYNORMALISATION << endl;
89 }
90 };
91
92} // namespace JACOUSTICS
93
94
95#endif
Auxiliary classes and methods for acoustic position calibration.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Time-of-arrival data from acoustic piezo sensor or hydrophone.
Definition JToA.hh:28
double daqFrameTimeStart_s() const
Time stamp of the DAQ frame start, in seconds since the Unix epoch (1 January 1970 00:00:00 UTC)
Definition JToAImp.cc:35
int64_t daqFrameTimeStart_ns() const
Normalization for the quality factor.
Definition JToAImp.cc:58
uint32_t SECONDS
Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC)
Definition JToA.hh:37
uint32_t DOMID
DAQ run number.
Definition JToA.hh:34
int64_t TOA_NS
Unique ID of the waveform that best described the signal around TOA_NS.
Definition JToA.hh:36
uint32_t QUALITYFACTOR
The ticks (16ns) part of the DAQ frame timestamp.
Definition JToA.hh:39
friend std::ostream & operator<<(std::ostream &out, const JToA &object)
Write time-of-arrival data to output stream.
Definition JToA.hh:76
ClassDefNV(JToA, 1)
uint32_t QUALITYNORMALISATION
A measure of how good the waveform match was to the signal.
Definition JToA.hh:40
int32_t WAVEFORMID
DOM unique identifeir.
Definition JToA.hh:35
int64_t relativeToA_ns() const
Time of Arrival, expressed in nanoseconds relative to the DAQ frame start.
Definition JToAImp.cc:45
double relativeToA_s() const
Time of Arrival, expressed in seconds relative to the DAQ frame start.
Definition JToAImp.cc:50
int32_t DETID
Definition JToA.hh:32
int32_t RUN
detector identifier
Definition JToA.hh:33
double TOA_S() const
Time of Arrival, expressed in seconds relative to Unix epoch (1 January 1970 00:00:00 UTC)
Definition JToAImp.cc:40
uint32_t TICKS
The seconds part of the DAQ frame timestamp.
Definition JToA.hh:38