32 |
printf("\n -v | --verbose be verbose [default: print nothing on STDOUT]\n"); |
printf("\n -v | --verbose be verbose [default: print nothing on STDOUT]\n"); |
33 |
printf("\n -idRun ID_RUN: ID number of the run \n"); |
printf("\n -idRun ID_RUN: ID number of the run \n"); |
34 |
printf("\n -filename output yoda filename \n"); |
printf("\n -filename output yoda filename \n"); |
35 |
printf("\n -host name for the host [default = mysql://localhost/pamelaprod]\n"); |
printf("\n -host name for the host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n"); |
36 |
printf("\n -user username for the DB [default = anonymous] \n"); |
printf("\n -user username for the DB [default = $PAM_DBUSER or \"anonymous\"] \n"); |
37 |
printf("\n -psw password for the DB [default = \"\"]\n"); |
printf("\n -psw password for the DB [default = $PAM_DBPSW or \"\"]\n"); |
38 |
printf("\n -convert [ -tzone timezone -dbtime dbtime ] \n"); |
printf("\n -convert [ -tzone timezone -dbtime dbtime ] \n"); |
39 |
printf("\n convert the dbtime given in seconds (from the DB) to a string for\n"); |
printf("\n convert the dbtime given in seconds (from the DB) to a string for\n"); |
40 |
printf("\n the given time zone (UTC,GMT,MSK,MSD,CET,CEST are accepted) \n"); |
printf("\n the given time zone (UTC,GMT,MSK,MSD,CET,CEST are accepted) \n"); |
63 |
TString host = "mysql://localhost/pamelaprod"; |
TString host = "mysql://localhost/pamelaprod"; |
64 |
TString user = "anonymous"; |
TString user = "anonymous"; |
65 |
TString psw = ""; |
TString psw = ""; |
66 |
|
// |
67 |
|
const char *pamdbhost=gSystem->Getenv("PAM_DBHOST"); |
68 |
|
const char *pamdbuser=gSystem->Getenv("PAM_DBUSER"); |
69 |
|
const char *pamdbpsw=gSystem->Getenv("PAM_DBPSW"); |
70 |
|
if ( strcmp(pamdbhost,"") ) host = pamdbhost; |
71 |
|
if ( strcmp(pamdbuser,"") ) user = pamdbuser; |
72 |
|
if ( strcmp(pamdbpsw,"") ) psw = pamdbpsw; |
73 |
|
// |
74 |
|
// printf(" host %s user %s psw %s \n",host.Data(),user.Data(),psw.Data()); |
75 |
|
// |
76 |
TString tzone = "MSK"; |
TString tzone = "MSK"; |
77 |
TString tzone2 = "MSK"; |
TString tzone2 = "MSK"; |
78 |
TString runtime = "1970-01-01 00:00:00"; |
TString runtime = "1970-01-01 00:00:00"; |
268 |
error = glrun->Query_GL_RUN(run,dbc); |
error = glrun->Query_GL_RUN(run,dbc); |
269 |
glroot->Clear(); |
glroot->Clear(); |
270 |
error = glroot->Query_GL_ROOT(glrun->ID_ROOT_L0,dbc); |
error = glroot->Query_GL_ROOT(glrun->ID_ROOT_L0,dbc); |
271 |
if ( error ){ |
if ( !glrun->ID_ROOT_L0 ){ |
|
printf(" Error querying the DB! \n"); |
|
|
exit(-4); |
|
|
}; |
|
|
if ( !glrun->ID ){ |
|
272 |
printf("\n No run with ID=%u in the DB!\n",run); |
printf("\n No run with ID=%u in the DB!\n",run); |
273 |
} else { |
} else { |
274 |
|
if ( error ){ |
275 |
|
printf(" Error querying the DB! \n"); |
276 |
|
exit(-4); |
277 |
|
}; |
278 |
printf("\n Run %u belongs to file %s \n",run,(glroot->PATH+glroot->NAME).Data()); |
printf("\n Run %u belongs to file %s \n",run,(glroot->PATH+glroot->NAME).Data()); |
279 |
}; |
}; |
280 |
}; |
}; |