17#include "dbclient/KM3NeTDBClient.h"
34int main(
int argc,
char** argv)
50 JParser<> zap(
"Auxiliary program to convert acoustics data from data base into ROOT format.");
64 catch (
const exception& error) {
65 FATAL(error.what() << endl);
71 JDB::reset(usr, pwd, cookie);
81 auto ofile = std::unique_ptr<TFile>(TFile::Open(
outputFile.getFilename().c_str(),
"UPDATE"));
83 auto toa_tree = std::unique_ptr<TTree>(
new TTree(
"TOA",
"Time Of Arrival (Acoustic Data)"));
85 toa_tree->SetAutoSave(0);
89 toa_tree->Branch(
"RUN", &toa.
RUN);
90 toa_tree->Branch(
"DOMID", &toa.
DOMID);
91 toa_tree->Branch(
"WAVEFORMID", &toa.
WAVEFORMID);
92 toa_tree->Branch(
"DETID", &toa.
DETID);
93 toa_tree->Branch(
"TOA_NS", &toa.
TOA_NS);
94 toa_tree->Branch(
"SECONDS", &toa.
SECONDS);
95 toa_tree->Branch(
"TICKS", &toa.
TICKS);
118 catch (
const exception& error) {
119 FATAL(error.what() << endl);
ROOT TTree parameter settings.
ROOT TTree parameter settings.
Recording of objects on file according a format that follows from the file name extension.
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Object iteration from database.
Auxiliary class for specifying selection of database data.
virtual bool hasNext() override
Check availability of next element.
Utility class to parse command line options.
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
std::vector< JServer > getServernames()
Get list of names of available database servers.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
int main(int argc, char **argv)
Time-of-arrival data from acoustic piezo sensor or hydrophone.
uint32_t SECONDS
Time of Arrival, in ns (relative to Unix epoch, 1 January 1970 00:00:00 UTC)
uint32_t DOMID
DAQ run number.
int64_t TOA_NS
Unique ID of the waveform that best described the signal around TOA_NS.
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.
int32_t WAVEFORMID
DOM unique identifeir.
int32_t RUN
detector identifier
uint32_t TICKS
The seconds part of the DAQ frame timestamp.
Wrapper class for server name.
uint32_t getDAQFrameSeconds() const
get the number of seconds (since Unix epoch) of the DAQ Frame start time
int EMITTERID
waveform identifier
uint32_t getDAQFrameTicks() const
get the number of ticks (16 ns) of the DAQ Frame start time
static const char *const getName()
Table name.
std::string DETID
constraint
int64_t getAbsoluteToA_ns() const
return the absolute Time Of Arrival, in nanoseconds (since Unix epoch 1 January 1970 00:00:00 UTC)
Empty structure for specification of parser element that is initialised (i.e. does not require input)...