// // Program to create a file containing an set of silicon alignment numbers // after reading them from 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/AlReadDB 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 // --> Classes defining a row & managers of TIMESTAMP & the Key #include "DBObjects/TimeStampDefs.hh" // --> Classes defining a row & managers of CALIBRUNLISTS + the Key #include "CalibDB/RunListDefs.hh" // --> The actual calibration table definition -- code generated from java // --> The actual alignment table definition -- code generated from java #include "AlignmentDB/SiAlignWafer.Defs.hh" #include "Alignment/AlHolderDB.hh" using namespace std; int main(int argc, char* argv[]) { if (argc < 6) { std::cerr << " Wrong # I/P arguments : format = " << " [database_id] [run] [version] [status] [align file]" << std::endl; return -1; } string dbid(argv[1]); int run = atoi(argv[2]); int version = atoi(argv[3]); string status(argv[4]); AlHolderDB al; al.getDatabase(dbid,run,version,status); al.writeToFile(argv[5]); return 0; }