Jpp  debug
the software that should make you happy
Public Member Functions | Public Attributes | List of all members
JACOUSTICS::JToA Struct Reference

Time-of-arrival data from acoustic piezo sensor or hydrophone. More...

#include <JToA.hh>

Public Member Functions

 JToA ()
 
int64_t daqFrameTimeStart_ns () const
 Normalization for the quality factor. More...
 
int64_t relativeToA_ns () const
 Time of Arrival, expressed in nanoseconds relative to the DAQ frame start. More...
 
double daqFrameTimeStart_s () const
 Time stamp of the DAQ frame start, in seconds since the Unix epoch (1 January 1970 00:00:00 UTC) More...
 
double TOA_S () const
 Time of Arrival, expressed in seconds relative to Unix epoch (1 January 1970 00:00:00 UTC) More...
 
double relativeToA_s () const
 Time of Arrival, expressed in seconds relative to the DAQ frame start. More...
 
 ClassDefNV (JToA, 1)
 

Public Attributes

int32_t DETID {}
 
int32_t RUN {}
 detector identifier More...
 
uint32_t DOMID {}
 DAQ run number. More...
 
int32_t WAVEFORMID {}
 DOM unique identifeir. More...
 
int64_t TOA_NS {}
 Unique ID of the waveform that best described the signal around TOA_NS. More...
 
uint32_t SECONDS {}
 Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC) More...
 
uint32_t TICKS {}
 The seconds part of the DAQ frame timestamp. More...
 
uint32_t QUALITYFACTOR {}
 The ticks (16ns) part of the DAQ frame timestamp. More...
 
uint32_t QUALITYNORMALISATION {}
 A measure of how good the waveform match was to the signal. More...
 

Detailed Description

Time-of-arrival data from acoustic piezo sensor or hydrophone.

Definition at line 25 of file JToA.hh.

Constructor & Destructor Documentation

◆ JToA()

JACOUSTICS::JToA::JToA ( )
default

Member Function Documentation

◆ daqFrameTimeStart_ns()

int64_t JACOUSTICS::JToA::daqFrameTimeStart_ns ( ) const

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)

Definition at line 58 of file JToAImp.cc.

59  {
61  }
constexpr int64_t NANOSECONDS_IN_ONE_SECOND
Definition: JToAImp.cc:30
constexpr int64_t NANOSECONDS_IN_ONE_TICK
Definition: JToAImp.cc:31
uint32_t SECONDS
Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC)
Definition: JToA.hh:35
uint32_t TICKS
The seconds part of the DAQ frame timestamp.
Definition: JToA.hh:36

◆ relativeToA_ns()

int64_t JACOUSTICS::JToA::relativeToA_ns ( ) const

Time of Arrival, expressed in nanoseconds relative to the DAQ frame start.

Accurate to the nanosecond.

Definition at line 45 of file JToAImp.cc.

46  {
47  return TOA_NS - daqFrameTimeStart_ns();
48  }
int64_t daqFrameTimeStart_ns() const
Normalization for the quality factor.
Definition: JToAImp.cc:58
int64_t TOA_NS
Unique ID of the waveform that best described the signal around TOA_NS.
Definition: JToA.hh:34

◆ daqFrameTimeStart_s()

double JACOUSTICS::JToA::daqFrameTimeStart_s ( ) const

Time stamp of the DAQ frame start, in seconds since the Unix epoch (1 January 1970 00:00:00 UTC)

Definition at line 35 of file JToAImp.cc.

36  {
37  return (static_cast<double>(SECONDS) + static_cast<double>(TICKS) * ONE_TICK_IN_NS);
38  }
constexpr double ONE_TICK_IN_NS
Definition: JToAImp.cc:27

◆ TOA_S()

double JACOUSTICS::JToA::TOA_S ( ) const

Time of Arrival, expressed in seconds relative to Unix epoch (1 January 1970 00:00:00 UTC)

Definition at line 40 of file JToAImp.cc.

41  {
43  }
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
double relativeToA_s() const
Time of Arrival, expressed in seconds relative to the DAQ frame start.
Definition: JToAImp.cc:50

◆ relativeToA_s()

double JACOUSTICS::JToA::relativeToA_s ( ) const

Time of Arrival, expressed in seconds relative to the DAQ frame start.

Accurate to the (micro)second

Definition at line 50 of file JToAImp.cc.

51  {
52  // to mimic what's done in the streamds retrieval, we truncate
53  // to microseconds first, then go to seconds.
54  std::chrono::microseconds mus = round<std::chrono::microseconds>(std::chrono::nanoseconds{relativeToA_ns()});
55  return static_cast<double>(mus.count()) * SECOND_IN_MICROSECOND;
56  }
constexpr double SECOND_IN_MICROSECOND
Definition: JToAImp.cc:29
int64_t relativeToA_ns() const
Time of Arrival, expressed in nanoseconds relative to the DAQ frame start.
Definition: JToAImp.cc:45

◆ ClassDefNV()

JACOUSTICS::JToA::ClassDefNV ( JToA  ,
 
)

Member Data Documentation

◆ DETID

int32_t JACOUSTICS::JToA::DETID {}

Definition at line 30 of file JToA.hh.

◆ RUN

int32_t JACOUSTICS::JToA::RUN {}

detector identifier

Definition at line 31 of file JToA.hh.

◆ DOMID

uint32_t JACOUSTICS::JToA::DOMID {}

DAQ run number.

Definition at line 32 of file JToA.hh.

◆ WAVEFORMID

int32_t JACOUSTICS::JToA::WAVEFORMID {}

DOM unique identifeir.

Definition at line 33 of file JToA.hh.

◆ TOA_NS

int64_t JACOUSTICS::JToA::TOA_NS {}

Unique ID of the waveform that best described the signal around TOA_NS.

Definition at line 34 of file JToA.hh.

◆ SECONDS

uint32_t JACOUSTICS::JToA::SECONDS {}

Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC)

Definition at line 35 of file JToA.hh.

◆ TICKS

uint32_t JACOUSTICS::JToA::TICKS {}

The seconds part of the DAQ frame timestamp.

Definition at line 36 of file JToA.hh.

◆ QUALITYFACTOR

uint32_t JACOUSTICS::JToA::QUALITYFACTOR {}

The ticks (16ns) part of the DAQ frame timestamp.

Definition at line 37 of file JToA.hh.

◆ QUALITYNORMALISATION

uint32_t JACOUSTICS::JToA::QUALITYNORMALISATION {}

A measure of how good the waveform match was to the signal.

Definition at line 38 of file JToA.hh.


The documentation for this struct was generated from the following files: