From: mivanov Date: Mon, 2 Dec 2013 14:47:49 +0000 (+0000) Subject: Base/AliTPCcalibDB.cxx - Use non trivial default value (otherwise cached not intila... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=9198ac8a6601c02778299ab62436a17d0ca6c3ca Base/AliTPCcalibDB.cxx - Use non trivial default value (otherwise cached not intilaiized for 0 time stamp)+ comment update Rec/AliTPCseed.cxx - Proper intiitalization of the time stamp --- diff --git a/TPC/Base/AliTPCcalibDB.cxx b/TPC/Base/AliTPCcalibDB.cxx index 15379a13148..54aa7cb90b7 100644 --- a/TPC/Base/AliTPCcalibDB.cxx +++ b/TPC/Base/AliTPCcalibDB.cxx @@ -2533,9 +2533,10 @@ Double_t AliTPCcalibDB::GetGainCorrectionHVandPT(Int_t timeStamp, Int_t run, Int // deltaCache - maximal time differnce above which the cache is recaclulated // mode - mode==0 by default return combined correction // actual HV and Pt correction has to be present in the run calibration otherwise it is ignored. - // + // (retrun value differnt than 1 only in case calibration present in the OCDB entry CalibTimeGain // mode==1 return combined correction ( important for calibration pass) - // + // (in case thereis no calibration in CalibTimeGain, default value from the AliTPCParam (Parameters) is used + // this mode is used in the CPass0 // mode==2 return HV correction // mode==3 return P/T correction // Usage in the simulation/reconstruction @@ -2545,7 +2546,7 @@ Double_t AliTPCcalibDB::GetGainCorrectionHVandPT(Int_t timeStamp, Int_t run, Int static Float_t gGainCorrection[72]; static Float_t gGainCorrectionPT[72]; static Float_t gGainCorrectionHV[72]; - static Int_t gTimeStamp=0; + static Int_t gTimeStamp=-99999999; static Bool_t hasTimeDependent=kFALSE; if ( TMath::Abs(timeStamp-gTimeStamp)> deltaCache){ // diff --git a/TPC/Rec/AliTPCseed.cxx b/TPC/Rec/AliTPCseed.cxx index d956624e7da..e9a7e01f67c 100644 --- a/TPC/Rec/AliTPCseed.cxx +++ b/TPC/Rec/AliTPCseed.cxx @@ -1217,10 +1217,10 @@ Float_t AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I // if (trans) { runNumber = trans->GetCurrentRunNumber(); + time = trans->GetCurrentTimeStamp(); //AliTPCcalibDB::Instance()->SetRun(runNumber); timeGainSplines = AliTPCcalibDB::Instance()->GetTimeGainSplinesRun(runNumber); if (timeGainSplines && recoParam->GetUseGainCorrectionTime()>0) { - time = trans->GetCurrentTimeStamp(); AliSplineFit * fitMIP = (AliSplineFit *) timeGainSplines->At(0); AliSplineFit * fitFPcosmic = (AliSplineFit *) timeGainSplines->At(1); if (fitMIP) {