17 #include "dbclient/KM3NeTDBClient.h"
34 int 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);
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);
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings.
Object iteration from database.
Recording of objects on file according a format that follows from the file name extension.
std::string DETID
constraint
int32_t WAVEFORMID
DOM unique identifeir.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
Time-of-arrival data from acoustic piezo sensor or hydrophone.
Auxiliary class for specifying selection of database data.
uint32_t getDAQFrameSeconds() const
get the number of seconds (since Unix epoch) of the DAQ Frame start time
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int32_t RUN
detector identifier
int64_t getAbsoluteToA_ns() const
return the absolute Time Of Arrival, in nanoseconds (since Unix epoch 1 January 1970 00:00:00 UTC) ...
uint32_t QUALITYFACTOR
The ticks (16ns) part of the DAQ frame timestamp.
ROOT TTree parameter settings.
General purpose messaging.
uint32_t QUALITYNORMALISATION
A measure of how good the waveform match was to the signal.
uint32_t getDAQFrameTicks() const
get the number of ticks (16 ns) of the DAQ Frame start time
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Utility class to parse command line options.
uint32_t TICKS
The seconds part of the DAQ frame timestamp.
std::vector< JServer > getServernames()
Get list of names of available database servers.
Wrapper class for server name.
const char * getName()
Get ROOT name of given data type.
uint32_t DOMID
DAQ run number.
int EMITTERID
waveform identifier
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)