Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JToAshort.hh
Go to the documentation of this file.
1#ifndef __JDB_JTOASHORT__
2#define __JDB_JTOASHORT__
3
4#include <TROOT.h>
5#include <TObject.h>
6#include <cstdint>
7#include <string>
8
9/**
10 * \author mdejong
11 */
12namespace JDATABASE {}
13namespace JPP {
14 using namespace JDATABASE;
15}
16
17namespace JDATABASE {
18
19 struct JToAshort :
20 public TObject
21 {
22 static const char* const getName() { return "toashort"; } //!< Table name
23
24 std::string DETID; ///< constraint
25 int RUN; ///
26 int RUNNUMBER; ///
27 double UNIXTIMEBASE; ///< [s]
28 int DOMID; ///
29 int EMITTERID; ///< waveform identifier
30 double TOA_S; ///< [s]
33
34 static constexpr int64_t NANOSECONDS_IN_ONE_SECOND = 1000000000;
35 static constexpr int64_t ONE_TICK_NS = 16;
36
37 /** return the absolute Time Of Arrival, in nanoseconds
38 * (since Unix epoch 1 January 1970 00:00:00 UTC)
39 */
40 int64_t getAbsoluteToA_ns() const
41 {
42 return llrint((TOA_S + UNIXTIMEBASE) * NANOSECONDS_IN_ONE_SECOND);
43 }
44
45 /** get the number of nanoseconds (since Unix epoch) of the DAQ Frame start time */
46 int64_t getDAQFrameNanoseconds() const
47 {
49 }
50
51 /** get the number of seconds (since Unix epoch) of the DAQ Frame start time */
52 uint32_t getDAQFrameSeconds() const
53 {
55 }
56
57 /** get the number of ticks (16 ns) of the DAQ Frame start time */
62
64 };
65
66
67} // namespace JDATABASE
68
69#endif
Auxiliary classes and methods for database I/O.
Definition JAHRS.hh:14
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
uint32_t getDAQFrameSeconds() const
get the number of seconds (since Unix epoch) of the DAQ Frame start time
Definition JToAshort.hh:52
int EMITTERID
waveform identifier
Definition JToAshort.hh:29
static constexpr int64_t ONE_TICK_NS
Definition JToAshort.hh:35
uint32_t getDAQFrameTicks() const
get the number of ticks (16 ns) of the DAQ Frame start time
Definition JToAshort.hh:58
static const char *const getName()
Table name.
Definition JToAshort.hh:22
int64_t getDAQFrameNanoseconds() const
get the number of nanoseconds (since Unix epoch) of the DAQ Frame start time
Definition JToAshort.hh:46
static constexpr int64_t NANOSECONDS_IN_ONE_SECOND
Definition JToAshort.hh:34
std::string DETID
constraint
Definition JToAshort.hh:24
ClassDef(JToAshort, 1)
int64_t getAbsoluteToA_ns() const
return the absolute Time Of Arrival, in nanoseconds (since Unix epoch 1 January 1970 00:00:00 UTC)
Definition JToAshort.hh:40
double UNIXTIMEBASE
[s]
Definition JToAshort.hh:27