]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFQAChecker.cxx
Remove old raw reader class
[u/mrichter/AliRoot.git] / TOF / AliTOFQAChecker.cxx
index 89a5cd87dcb975267c53bee2313b815374ef7085..057bd99102c37c0e620839e280b27c0abfd3beef 100644 (file)
@@ -28,7 +28,7 @@
 #include "TObjArray.h"
 
 #include "AliLog.h"
-//#include "AliQA.h"
+//#include "AliQAv1.h"
 //#include "AliQAChecker.h"
 
 #include "AliTOFQAChecker.h"
 ClassImp(AliTOFQAChecker)
 
 //____________________________________________________________________________
-Double_t * AliTOFQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list) 
+void AliTOFQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t /*index*/,
+                                 TObjArray ** list,
+                                 const AliDetectorRecoParam * /*recoParam*/) 
 {
-
   // Super-basic check on the QA histograms on the input list: 
   // look whether they are empty!
 
-  Double_t * test  = new Double_t[AliRecoParam::kNSpecies] ; 
   Int_t count[AliRecoParam::kNSpecies] = { 0 }; 
 
   for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) 
+      continue ;
     test[specie] = 1.0 ; 
-    if ( !AliQA::Instance()->IsEventSpecieSet(specie) ) 
+    if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) 
       continue ; 
     if (list[specie]->GetEntries() == 0){  
       test[specie] = 0.0 ; // nothing to check
@@ -56,11 +58,11 @@ Double_t * AliTOFQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
       TIter next(list[specie]) ; 
       TH1 * hdata ;
       count[specie] = 0 ; 
-      while ( (hdata = dynamic_cast<TH1 *>(next())) ) {
-        if (hdata) { 
+      while ( (hdata = static_cast<TH1 *>(next())) ) {
+        if (hdata && hdata->InheritsFrom("TH1")) { 
           Double_t rv = 0.;
           if(hdata->GetEntries()>0)rv=1; 
-          AliInfo(Form("%s -> %f", hdata->GetName(), rv)) ; 
+          AliDebug(AliQAv1::GetQADebugLevel(), Form("%s -> %f", hdata->GetName(), rv)) ; 
           count[specie]++ ; 
           test[specie] += rv ; 
         }
@@ -76,11 +78,10 @@ Double_t * AliTOFQAChecker::Check(AliQA::ALITASK_t /*index*/, TObjArray ** list)
         else {
         test[specie] /= count[specie] ;
         }
-        AliInfo(Form("Test Result = %f", test[specie])) ; 
+        AliDebug(AliQAv1::GetQADebugLevel(), Form("Test Result = %f", test[specie])) ; 
       }
     }
   }
-  return test ; 
 }