8 int main(
int argc,
char **argv)
12 Bool_t all = kFALSE, verbose = kFALSE;
15 for(
int i = 1; i<argc; i++){
20 printf(
"Access run configuration from database\n");
21 printf(
"-r <int>: run number\n");
22 printf(
"-f <str>: field\n");
23 printf(
"-a: show all available fields\n");
27 run = strtol(argv[i],NULL,0);
31 sprintf(field,
"%s",argv[i]);
40 printf(
"unknown option: %s\n", argv[i]);
45 printf(
"invalid parameter: %s\n", argv[i]);
56 cout <<
"Available fields:" << endl;
57 cout <<
"------------------------------" << endl;
65 if (verbose ) cout <<
"Lookup for " << field << endl;
67 if(info->
GetVal(field,val))
68 cout << val.Data() << endl;
70 cout <<
"Field " << field <<
" not available" << endl;
void list()
list all filds found which his types
Bool_t GetRunConfig(Long_t nrun, const TString *dbUrl=NULL)
Query Db for given run Only this function in class interact wich DataBase. Must be called in HarpoRaw...
Get Run Configuration info by run number. The class query MySQL databe use GetRunConfig Method Only t...
int main(int argc, char **argv)
Bool_t GetVal(const TString field, TString &val)
Return value of existing field in Tstring.