388 |
TString psw = glt->CGetPsw(); |
TString psw = glt->CGetPsw(); |
389 |
TSQLServer *dbc = TSQLServer::Connect(host.Data(),user.Data(),psw.Data()); |
TSQLServer *dbc = TSQLServer::Connect(host.Data(),user.Data(),psw.Data()); |
390 |
if ( !dbc->IsConnected() ) throw -705; |
if ( !dbc->IsConnected() ) throw -705; |
391 |
|
stringstream myquery; |
392 |
|
myquery.str(""); |
393 |
|
myquery << "SET time_zone='+0:00'"; |
394 |
|
dbc->Query(myquery.str().c_str()); |
395 |
|
|
396 |
dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc); |
dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc); |
397 |
// |
// |
398 |
// Search in the DB the path and name of the LEVEL0 file to be processed. |
// Search in the DB the path and name of the LEVEL0 file to be processed. |
487 |
// paranoid check |
// paranoid check |
488 |
// |
// |
489 |
if ( atime > runinfo->RUNTRAILER_TIME || atime < runinfo->RUNHEADER_TIME ) { |
if ( atime > runinfo->RUNTRAILER_TIME || atime < runinfo->RUNHEADER_TIME ) { |
490 |
if ( verbose ) printf(" ANTICOUNTER - WARNING: event at time outside the run time window, skipping it\n"); |
if ( verbose ) printf(" ANTICOUNTER - WARNING: event at time outside the run time window, skipping it atime %u HE %u TR %u \n",atime,runinfo->RUNTRAILER_TIME,runinfo->RUNHEADER_TIME); |
491 |
|
if ( verbose ) printf(" %u %u %u %u \n",dbtime->GetTimesync(),dbtime->GetObt0(),dbtime->GetT0(),dbtime->GetType()); |
492 |
goto jumpev; |
goto jumpev; |
493 |
}; |
}; |
494 |
// |
// |