]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bugfix with zero event % alert
authorpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Dec 2009 09:50:52 +0000 (09:50 +0000)
committerpulvir <pulvir@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Dec 2009 09:50:52 +0000 (09:50 +0000)
PWG2/RESONANCES/AliRsnAnalysisSE.cxx

index 91a3a95b0b726b724d2ee4e1f87e96825583e185..29594840fafaf63ab4d605c77798e8e9cf84bcfc 100644 (file)
@@ -119,7 +119,8 @@ void AliRsnAnalysisSE::RsnUserExec(Option_t*)
     {
       TH1I *hist = (TH1I*)fOutList[0]->FindObject(fTaskInfo.GetEventHistogramName());
       if (!hist) return;
-      Double_t zeroEventPercent = (Double_t)hist->GetBinContent(1) / hist->Integral() * 100;
+      Double_t zeroEventPercent = 0.0;
+      if (hist->Integral() > 1) zeroEventPercent = (Double_t)hist->GetBinContent(1) / hist->Integral() * 100;
       if ((zeroEventPercent>fZeroEventPercentWarning)&&(fEntry>100))
         AliWarning(Form("%3.2f%% Events are with zero tracks (CurrentEvent=%d)!!!",zeroEventPercent,fEntry));
     }