Protection against division by zero.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Jun 2009 14:40:02 +0000 (14:40 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 15 Jun 2009 14:40:02 +0000 (14:40 +0000)
TRD/AliTRDQAChecker.cxx

index 15b6ce9..4a4696b 100644 (file)
@@ -64,7 +64,8 @@ Double_t * AliTRDQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
     if (!hist) continue;
     
     Double_t value = hist->Integral(hist->FindBin(lowAmp), hist->FindBin(highAmp));
-    test[specie] = value / hist->GetSum();
+    if (hist->GetSum())
+      test[specie] = value / hist->GetSum();
 
   }
   return test ;