--- DarthVader/CalorimeterLevel2/src/CaloProcessing.cpp 2006/09/06 11:03:31 1.4 +++ DarthVader/CalorimeterLevel2/src/CaloProcessing.cpp 2006/09/07 09:47:07 1.5 @@ -91,6 +91,7 @@ GL_CALO_CALIB *glcalo = new GL_CALO_CALIB(); // sgnl = 0; + UInt_t uptime = 0; // for (Int_t s = 0; s < 4; s++){ idcalib[s] = 0; @@ -99,7 +100,7 @@ calibno[s] = 0; ClearCalibVals(s); // - sgnl = glcalo->Query_GL_CALO_CALIB(hs,s,dbc); + sgnl = glcalo->Query_GL_CALO_CALIB(hs,uptime,s,dbc); if ( sgnl < 0 ){ if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n"); return; @@ -107,7 +108,11 @@ // idcalib[s] = glcalo->ID_ROOT_L0; fromtime[s] = glcalo->FROM_TIME; - totime[s] = glcalo->TO_TIME; + if ( glcalo->TO_TIME < hs ){ // calibration is corrupted and we are using the one that preceed the good one + totime[s] = uptime; + } else { + totime[s] = glcalo->TO_TIME; + }; calibno[s] = glcalo->EV_ROOT; // if ( totime[s] == 0 ){ @@ -791,7 +796,9 @@ calibno[s] = 0; ClearCalibVals(s); // - sgnl = glcalo->Query_GL_CALO_CALIB(atime,s,dbc); + UInt_t uptime = 0; + // + sgnl = glcalo->Query_GL_CALO_CALIB(atime,uptime,s,dbc); if ( sgnl < 0 ){ if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n"); return(sgnl); @@ -799,7 +806,12 @@ // idcalib[s] = glcalo->ID_ROOT_L0; fromtime[s] = glcalo->FROM_TIME; - totime[s] = glcalo->TO_TIME; + if ( glcalo->TO_TIME < atime ){ // calibration is corrupted and we are using the one that preceed the good one + totime[s] = uptime; + } else { + totime[s] = glcalo->TO_TIME; + }; + // totime[s] = glcalo->TO_TIME; calibno[s] = glcalo->EV_ROOT; // if ( totime[s] == 0 ){