#include #include #include #include "JDB/JDB.hh" #include "JDB/JDBToolkit.hh" #include "JDB/JSelector.hh" #include "JDB/JSelectorSupportkit.hh" #include "JDB/JAllParams.hh" #include "JDB/JRunsetupParams.hh" #include "Jeep/JParser.hh" #include "Jeep/JMessage.hh" /** * \file * Auxiliary program to print run setup data. * \author lnauta */ int main(const int argc, const char * const argv[]) { using namespace std; using namespace JPP; JServer server; string usr; string pwd; string cookie; string detid; string rs_oid; int debug; try { JParser<> zap("Auxiliary program to print run setup data."); zap['s'] = make_field(server) = getServernames(); zap['u'] = make_field(usr) = ""; zap['!'] = make_field(pwd) = ""; zap['C'] = make_field(cookie) = ""; zap['D'] = make_field(detid); zap['R'] = make_field(rs_oid); zap['d'] = make_field(debug) = 1; zap(argc, argv); } catch(const exception& error) { FATAL(error.what() << endl); } try { JDB::reset(usr, pwd, cookie); detid = getDetector(detid); map umap; { ResultSet& rs = getResultSet(getTable()); //, getSelector("DATAACQUISITION")); for (JAllParams buffer; rs >> buffer; ) { umap[buffer.OID] = buffer.NAME; } rs.Close(); } ResultSet& rs = getResultSet(getTable(), getSelector(detid, rs_oid)); for (JRunsetupParams buffer; rs >> buffer; ) { cout << setw(24) << left << buffer.UPIFILTER << right << " " << buffer.PAR_OID << " -> " << umap[buffer.PAR_OID] << " = " << buffer.VALUE << endl; } } catch(const exception& error) { FATAL(error.what() << endl); } }