#ifndef __JACOUSTICS__JTOA__ #define __JACOUSTICS__JTOA__ #include #include /** * \file * * Acoustic event. * \author mdejong */ namespace JACOUSTICS {} namespace JPP { using namespace JACOUSTICS; } namespace JACOUSTICS { /** * Time-of-arrival data from acoustic piezo sensor or hydrophone. */ struct JToA { JToA(); int32_t DETID{}; /// detector identifier int32_t RUN{}; /// DAQ run number uint32_t DOMID{}; /// DOM unique identifeir int32_t WAVEFORMID{}; /// Unique ID of the waveform that best described the signal around TOA_NS int64_t TOA_NS{}; /// Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC) uint32_t SECONDS{}; /// The seconds part of the DAQ frame timestamp uint32_t TICKS{}; /// The ticks (16ns) part of the DAQ frame timestamp uint32_t QUALITYFACTOR{}; /// A measure of how good the waveform match was to the signal uint32_t QUALITYNORMALISATION{}; /// Normalization for the quality factor /** Time stamp of the DAQ frame start in nanoseconds * since the Unix epoch (1 January 1970 00:00:00 +0ns UTC) */ int64_t daqFrameTimeStart_ns() const; /** Time of Arrival, expressed in nanoseconds * relative to the DAQ frame start. Accurate to the nanosecond. */ int64_t relativeToA_ns() const; /** Time stamp of the DAQ frame start, in seconds * since the Unix epoch (1 January 1970 00:00:00 UTC) */ double daqFrameTimeStart_s() const; /** Time of Arrival, expressed in seconds * relative to Unix epoch (1 January 1970 00:00:00 UTC) */ double TOA_S() const; /** Time of Arrival, expressed in seconds * relative to the DAQ frame start. Accurate to the (micro)second */ double relativeToA_s() const; ClassDefNV(JToA, 1); }; } // namespace JACOUSTICS #endif