39int main(
int argc,
char** argv)
44 JFileRecorder<JTYPELIST<JToA, JMeta>::typelist> outputFile;
55 JParser<> zap(
"Auxiliary program to convert acoustics data from data base into ROOT format.");
58 zap[
'o'] = make_field(outputFile);
59 zap[
's'] = make_field(server) = getServernames();
60 zap[
'u'] = make_field(usr) =
"";
61 zap[
'!'] = make_field(pwd) =
"";
62 zap[
'C'] = make_field(cookie) =
"";
63 zap[
'@'] = make_field(selection) = JPARSER::initialised();
64 zap[
'd'] = make_field(debug) = 1;
69 catch (
const exception& error) {
70 FATAL(error.what() << endl);
76 JDB::reset(usr, pwd, cookie);
78 JDBToolkit::initialise(getDetector);
82 outputFile.put(JMeta(argc, argv));
86 for (JDatabaseObjectIterator<JToAshort> in(JToAshort::getName(), selection); in.hasNext();) {
88 const JToAshort* p = in.next();
90 toa.
DETID = getDetector(p->DETID);
94 toa.
TOA_NS = p->getAbsoluteToA_ns();
95 toa.
SECONDS = p->getDAQFrameSeconds();
96 toa.
TICKS = p->getDAQFrameTicks();
105 catch (
const exception& error) {
106 FATAL(error.what() << endl);