Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
int64_t relativeToA_ns () const
 Time of Arrival, expressed in nanoseconds relative to the DAQ frame start.
 
double daqFrameTimeStart_s () const
 Time stamp of the DAQ frame start, in seconds since the Unix epoch (1 January 1970 00:00:00 UTC)
 
double TOA_S () const
 Time of Arrival, expressed in seconds relative to Unix epoch (1 January 1970 00:00:00 UTC)
 
double relativeToA_s () const
 Time of Arrival, expressed in seconds relative to the DAQ frame start.
 
 ClassDefNV (JToA, 1)
 

Public Attributes

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

Friends

std::ostream & operator<< (std::ostream &out, const JToA &object)
 Write time-of-arrival data to output stream.
 

Detailed Description

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

Definition at line 27 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:37
uint32_t TICKS
The seconds part of the DAQ frame timestamp.
Definition JToA.hh:38

◆ 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 {
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:36

◆ 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 ,
1  )

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JToA & object )
friend

Write time-of-arrival data to output stream.

Parameters
outoutput stream
objecttime-of-arrival data
Returns
output stream

Definition at line 76 of file JToA.hh.

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 }

Member Data Documentation

◆ DETID

int32_t JACOUSTICS::JToA::DETID {}

Definition at line 32 of file JToA.hh.

32{}; /// detector identifier

◆ RUN

int32_t JACOUSTICS::JToA::RUN {}

detector identifier

Definition at line 33 of file JToA.hh.

33{}; /// DAQ run number

◆ DOMID

uint32_t JACOUSTICS::JToA::DOMID {}

DAQ run number.

Definition at line 34 of file JToA.hh.

34{}; /// DOM unique identifeir

◆ WAVEFORMID

int32_t JACOUSTICS::JToA::WAVEFORMID {}

DOM unique identifeir.

Definition at line 35 of file JToA.hh.

35{}; /// Unique ID of the waveform that best described the signal around TOA_NS

◆ TOA_NS

int64_t JACOUSTICS::JToA::TOA_NS {}

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

Definition at line 36 of file JToA.hh.

36{}; /// Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC)

◆ 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 37 of file JToA.hh.

37{}; /// The seconds part of the DAQ frame timestamp

◆ TICKS

uint32_t JACOUSTICS::JToA::TICKS {}

The seconds part of the DAQ frame timestamp.

Definition at line 38 of file JToA.hh.

38{}; /// The ticks (16ns) part of the DAQ frame timestamp

◆ QUALITYFACTOR

uint32_t JACOUSTICS::JToA::QUALITYFACTOR {}

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

Definition at line 39 of file JToA.hh.

39{}; /// A measure of how good the waveform match was to the signal

◆ QUALITYNORMALISATION

uint32_t JACOUSTICS::JToA::QUALITYNORMALISATION {}

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

Definition at line 40 of file JToA.hh.

40{}; /// Normalization for the quality factor

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