#include #include #include "dbclient/KM3NeTDBClient.h" #include "JDB/JDB.hh" #include "JDB/JDBToolkit.hh" #include "JDB/JSelector.hh" #include "JDB/JSupport.hh" #include "JDB/JDBincludes.hh" #include "JDB/JDatabaseObjectIterator.hh" #include "JSupport/JFileRecorder.hh" #include "JSupport/JMeta.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Auxiliary program to convert data from data base into ROOT format. * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; typedef JDBTypes_t typelist; JFileRecorder::typelist> outputFile; JServer server; string usr; string pwd; string cookie; string query; JSelector selection; int debug; try { JParser<> zap("Auxiliary program to convert data from data base into ROOT format."); zap['o'] = make_field(outputFile); zap['s'] = make_field(server) = getServernames(); zap['u'] = make_field(usr) = ""; zap['!'] = make_field(pwd) = ""; zap['C'] = make_field(cookie) = ""; zap['q'] = make_field(query) = getQueries(); zap['@'] = make_field(selection) = JPARSER::initialised(); zap['d'] = make_field(debug) = 1; zap['q'] = JPARSER::not_initialised(); zap(argc, argv); } catch(const exception &error) { FATAL(error.what() << endl); } try { JDB::reset(usr, pwd, cookie); JDBToolkit::initialise(getDetector); JDatabaseObjectIterator in(query, selection); outputFile.open(); outputFile.put(JMeta(argc, argv)); in >> outputFile; outputFile.close(); } catch(const exception& error) { FATAL(error.what() << endl); } }