// ============================================================================= // ============================================================================= int getinfo() { // // Get Info from TPC Table // if ( !tableExists("TPC") ) return 0; sw->start(); try { if ( arguments.pInfoID == true ) { db->calcRowCount(dbq->getSqlSelectTpcRow(arguments.pInfoSelectedID)); db->executeQuery(dbq->getSqlSelectTpcRow(arguments.pInfoSelectedID)); } else { db->calcRowCount(dbq->getSqlSelectTpcData()); db->executeQuery(dbq->getSqlSelectTpcData()); } cout << "*Found " << db->getRowCount() << " Configurations!" << endl; if ( db->getRowCount() <= 0 ) { if ( arguments.pInfoID == true ) { cout << "*No configuration with ID=" << arguments.pInfoSelectedID << " found!" << endl; } else { cout << "*No configurations found!" << endl; } } else { for ( int rowCounter = 0; rowCounter < db->getRowCount(); rowCounter++ ) { db->getRow(); cout << setw(3) << rowCounter << ") Found Configuration ID = " << db->getRowValueAsInt(0) << endl; cout << " Configuration created at: " << db->getRowValueDateAsString(1) << endl; cout << " Configuration used from: " << db->getRowValueDateAsString(2) << endl; cout << " Configuration updated at: " << db->getRowValueDateAsString(3) << endl; cout << " Configuration Table Revision: " << db->getRowValueAsInt(4) << endl; cout << " Configuration Comment: " << db->getRowValueAsString(5) << endl << endl; } } db->freeResult(); } catch(SQLException& ea) { cout << ea.what() << endl; return 0; } return 1; } // ============================================================================= // ============================================================================= int gettags() { // // Get list of tags that can be put in db (if not already in) // TpcConfig tpc; cout << "----------------------------------------------------------------------------" << endl; for ( int i=1; i<=tpc.getNumConfigs(); i++ ) cout << "*Tag " << i << ": " << tpc.ConfigName(i) << endl; cout << "----------------------------------------------------------------------------" << endl; return 1; }