protect function against missing data
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 Mar 2010 08:32:04 +0000 (08:32 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 31 Mar 2010 08:32:04 +0000 (08:32 +0000)
PWG1/TRD/AliTRDcheckDET.cxx

index a299ff6..d1d56fb 100644 (file)
@@ -1278,6 +1278,7 @@ void AliTRDcheckDET::MakePlotnTrackletsVsP(){
   Int_t np(ax->GetNbins());
   for(Int_t ipBin(1); ipBin<np; ipBin++){
     h = hBar->ProjectionY("npBin", ipBin, ipBin);
+    if(!Int_t(h->Integral())) return;
     h->Scale(100./h->Integral());
     Float_t p(ax->GetBinCenter(ipBin)); 
     Float_t dp(ax->GetBinWidth(ipBin));