72 |
// |
// |
73 |
GL_S4_CALIB *glS4calib = new GL_S4_CALIB(); |
GL_S4_CALIB *glS4calib = new GL_S4_CALIB(); |
74 |
// |
// |
75 |
|
if ( !dbc->IsConnected() ) throw -504; |
76 |
glS4calib->Query_GL_S4_CALIB(atime, dbc); |
glS4calib->Query_GL_S4_CALIB(atime, dbc); |
77 |
// |
// |
78 |
GL_ROOT *glroot = new GL_ROOT(); |
GL_ROOT *glroot = new GL_ROOT(); |
79 |
|
if ( !dbc->IsConnected() ) throw -504; |
80 |
glroot->Query_GL_ROOT(glS4calib->ID_ROOT_L0,dbc); |
glroot->Query_GL_ROOT(glS4calib->ID_ROOT_L0,dbc); |
81 |
// |
// |
82 |
stringstream ftmpname; |
stringstream ftmpname; |
463 |
// |
// |
464 |
// prepare the timesync for the db |
// prepare the timesync for the db |
465 |
// |
// |
466 |
|
if ( !dbc->IsConnected() ) throw -504; |
467 |
dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc); |
dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc); |
468 |
// |
// |
469 |
// 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. |
470 |
// |
// |
471 |
|
if ( !dbc->IsConnected() ) throw -504; |
472 |
glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc); |
glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc); |
473 |
// |
// |
474 |
ftmpname.str(""); |
ftmpname.str(""); |
577 |
// |
// |
578 |
s4->Clear(); |
s4->Clear(); |
579 |
l0S4->GetEntry(re); |
l0S4->GetEntry(re); |
580 |
if (l0s4e->unpackError == 1) continue; |
if (l0s4e->unpackError == 0){ |
581 |
s4->S4adc = l0s4e->S4_DATA; |
s4->S4adc = l0s4e->S4_DATA; |
582 |
|
// |
583 |
|
if ((l0s4e->S4_DATA) > 31 ){ |
584 |
|
s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1; |
585 |
|
}else{ |
586 |
|
s4->S4calibrated = 0; |
587 |
|
} |
588 |
|
}; |
589 |
// |
// |
590 |
if ((l0s4e->S4_DATA) > 31 ){ |
s4->unpackError = l0s4e->unpackError; |
|
s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1; |
|
|
}else{ |
|
|
s4->S4calibrated = 0; |
|
|
} |
|
591 |
// |
// |
592 |
S4tr->Fill(); |
S4tr->Fill(); |
593 |
// |
// |