#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/JDBDictionary.hh" #include "JDB/JDatabaseObjectIterator.hh" #include "JROOT/JRootStreamObjectOutput.hh" #include "JROOT/JRootDictionary.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * * Auxiliary program to convert data from data base into ASCII format. * \author mdejong */ int main(int argc, char **argv) { using namespace std; using namespace JPP; typedef JDBTypes_t typelist; 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 ASCII format."); 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); } JRootWriter writer(cout, JEquationParameters(), JDBDictionary::getInstance()); JRootStreamObjectOutput out(writer, "\n"); try { JDB::reset(usr, pwd, cookie); JDBToolkit::initialise(getDetector); JDatabaseObjectIterator in(query, selection); in >> out; } catch(const exception& error) { FATAL(error.what() << endl); } }