Skip to content

Commit

Permalink
ALIROOT-5986 ATO-184 - Use the default voltage in case voltage entry …
Browse files Browse the repository at this point in the history
…for particular chamber not available

ATO-184 - fix in AliTPCcalibDB::GetGainCorrectionHVandPT

ATO-184 Check the pointer before you use it
  • Loading branch information
miranov25 authored and hristov committed May 13, 2015
1 parent 096baae commit f2deb95
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion TPC/Base/AliTPCcalibDB.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2582,7 +2582,14 @@ Double_t AliTPCcalibDB::GetGainCorrectionHVandPT(Int_t timeStamp, Int_t run, Int
if (!graphGPT) graphGPT = fParam->GetGainSlopesPT();
//
for (Int_t isec=0; isec<72; isec++){
Double_t deltaHV= GetChamberHighVoltage(run,isec, timeStamp) - fParam->GetNominalVoltage(isec);
Double_t HV= GetChamberHighVoltage(run,isec, timeStamp);
if (HV<=0){ // check if the HV was available
AliDCSSensor* sensor = GetChamberHVSensor(isec);
if (sensor && sensor->GetGraph()==NULL && sensor->GetFit()==NULL){
HV=fParam->GetNominalVoltage(isec);
}
}
Double_t deltaHV= HV - fParam->GetNominalVoltage(isec);
Double_t deltaGHV=0;
Double_t deltaGPT=0;
if (graphGHV) deltaGHV = graphGHV->GetY()[isec]*deltaHV;
Expand Down

0 comments on commit f2deb95

Please sign in to comment.