// // Program to read a file containing an set of silicon alignment numbers // and insert them in a database. // The access is by specific run and version (simple keyed access). // // To run the program: // checkout the Alignment package // gmake Alignment.tbin // // bin/$BFARCH/AlFillDB DATABASE_IDENTIFIER RUN VERSION align_filename // // The alignment file is in the format define by AlHolder.cc // // 10/00 Ray Culbertson, from an example by Mark Lancaster // // ----------------------------------------------------------------------- // #include #include #include #include #include "Alignment/AlHolderDB.hh" using namespace std; int main(int argc, char* argv[]) { if (argc < 6) { std::cerr << " Wrong # I/P arguments : format: " << std::endl << " [database_id] [run] [version] [status] [alignment file] " << std::endl << " (version < 0 implies next version) " << std::endl; return -1; } string dbid(argv[1]); int run = atoi(argv[2]); int version = atoi(argv[3]); string status(argv[4]); AlHolderDB al; int stat = al.readFromFile(argv[5]); if(stat) { std::cerr << "Error reading alignment file: db not loaded ..." << std::endl; return 1; } al.putDatabase(dbid,run,version,status); return 0; }