]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Protection against empty histogram.
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 May 2012 10:03:43 +0000 (10:03 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 15 May 2012 10:03:43 +0000 (10:03 +0000)
AliTPCPreprocesorOffline  was failing in case the TPC was not include in data acquisition

TPC/AliTPCcalibGainMult.cxx

index f12e22b8b99d8b542faa730f98ee8c62aa8f109d..0ec6c5e12702b7f5d28882f797e49be51cfbe1e4 100644 (file)
@@ -1790,6 +1790,8 @@ TGraphErrors* AliTPCcalibGainMult::GetGainPerChamber(Int_t padRegion/*=1*/, Bool
 
   if (padRegion<0||padRegion>2) return 0x0;
   
+  if (!fHistGainSector) return NULL;
+  if (!fHistGainSector->GetAxis(2)) return NULL;
   fHistGainSector->GetAxis(2)->SetRangeUser(padRegion,padRegion);
   TH2D * histGainSec = fHistGainSector->Projection(0,1);
 //   TH1D* proj=fHistGainSector->Projection(0);