]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/STEER/AliQACheckerBase.cxx
Fix for raw ctp decoding (Marek)
[u/mrichter/AliRoot.git] / STEER / STEER / AliQACheckerBase.cxx
index ba0f724806db28ab1f1d60aa6299eb116f29482a..fc61b2648d1a3b14fca001aff3423a4e063ac512 100644 (file)
@@ -88,55 +88,12 @@ AliQACheckerBase::AliQACheckerBase(const char * name, const char * title) :
   }
 }
 
-//____________________________________________________________________________ 
-AliQACheckerBase::AliQACheckerBase(const AliQACheckerBase& qac) :
-  TNamed(qac.GetName(), qac.GetTitle()),
-  fDataSubDir(qac.fDataSubDir), 
-  fRefSubDir(qac.fRefSubDir), 
-  fRefOCDBSubDir(qac.fRefOCDBSubDir), 
-  fLowTestValue(new Float_t[AliQAv1::kNBIT]),
-  fUpTestValue(new Float_t[AliQAv1::kNBIT]), 
-  fImage(new TCanvas*[AliRecoParam::kNSpecies]),  
-  fPrintImage(kTRUE), 
-  fExternParamList(new TList())  
-{
-  //copy ctor
-  for (Int_t index = 0 ; index < AliQAv1::kNBIT ; index++) {
-    fLowTestValue[index]  = qac.fLowTestValue[index] ; 
-    fUpTestValue[index] = qac.fUpTestValue[index] ; 
-  }
-    for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-      fImage[specie] = qac.fImage[specie] ; 
-      fRefOCDBSubDir[specie] = qac.fRefOCDBSubDir[specie] ; 
-    }
-  if (qac.fExternParamList) {
-    TIter next(qac.fExternParamList) ; 
-    TParameter<double> * p ; 
-    while ( (p = (TParameter<double>*)next()) )
-      fExternParamList->Add(p) ;
-  }
-}
-
-//____________________________________________________________________________
-AliQACheckerBase& AliQACheckerBase::operator = (const AliQACheckerBase& qac )
-{
-  // Equal operator.
-  this->~AliQACheckerBase();
-  new(this) AliQACheckerBase(qac);
-  return *this;
-}
-
 //____________________________________________________________________________ 
 AliQACheckerBase::~AliQACheckerBase()
 {
   delete [] fLowTestValue ; 
   delete [] fUpTestValue ; 
-  for (Int_t esIndex = 0 ; esIndex < AliRecoParam::kNSpecies ; esIndex++) {
-    if ( fImage[esIndex] ) 
-      delete fImage[esIndex] ;
-    if ( fRefOCDBSubDir[esIndex] ) 
-      delete fRefOCDBSubDir[esIndex] ; 
-  }
+  DeleteImages();  
   delete[] fImage ; 
   delete[] fRefOCDBSubDir ; 
   AliQAv1::GetQAResultFile()->Close() ; 
@@ -147,7 +104,7 @@ AliQACheckerBase::~AliQACheckerBase()
 }
 
 //____________________________________________________________________________
-void AliQACheckerBase::Check(Double_t * test, AliQAv1::ALITASK_t index, const AliDetectorRecoParam * recoParam) 
+void AliQACheckerBase::PrivateCheck(Double_t * test, AliQAv1::ALITASK_t index, const AliDetectorRecoParam * recoParam) 
 {
   // Performs a basic checking
   // Compares all the histograms stored in the directory
@@ -187,7 +144,7 @@ void AliQACheckerBase::Check(Double_t * test, AliQAv1::ALITASK_t index, const Al
 }  
 
 //____________________________________________________________________________
-void AliQACheckerBase::Check(Double_t * test, AliQAv1::ALITASK_t task, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/) 
+void AliQACheckerBase::Check(Double_t * test, AliQAv1::ALITASK_t task, TObjArray ** list, const AliDetectorRecoParam * /* recoParam */) 
 {
   // Performs a basic checking
   // Compares all the histograms in the list
@@ -248,6 +205,16 @@ void AliQACheckerBase::Check(Double_t * test, AliQAv1::ALITASK_t task, TObjArray
 }  
 
 
+//____________________________________________________________________________ 
+void AliQACheckerBase::DeleteImages()
+{
+  // clean images
+  for (Int_t esIndex = 0 ; esIndex < AliRecoParam::kNSpecies ; esIndex++) {
+    if ( fImage[esIndex] )          {delete fImage[esIndex];          fImage[esIndex] = 0;}
+    if ( fRefOCDBSubDir[esIndex] )  {delete fRefOCDBSubDir[esIndex];  fRefOCDBSubDir[esIndex] = 0;}
+  }
+}
+
 //____________________________________________________________________________ 
 Double_t AliQACheckerBase::DiffC(const TH1 * href, const TH1 * hin) const
 {
@@ -327,12 +294,14 @@ void AliQACheckerBase::PrintExternParam()
 }
   
 //____________________________________________________________________________
-void AliQACheckerBase::Run(AliQAv1::ALITASK_t index, AliDetectorRecoParam * recoParam) 
+void AliQACheckerBase::Run(AliQAv1::ALITASK_t index, const AliDetectorRecoParam * recoParam) 
 { 
+    //Run the checker for all kind of species
   AliDebug(AliQAv1::GetQADebugLevel(), Form("Processing %s", AliQAv1::GetAliTaskName(index))) ; 
   
   Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;
-  Check(rv, index, recoParam) ;
+  for (int i=AliRecoParam::kNSpecies;i--;) rv[i] = 0.0;
+  PrivateCheck(rv, index, recoParam) ;
   SetQA(index, rv) ;   
   
   AliDebug(AliQAv1::GetQADebugLevel(), Form("Test result of %s", AliQAv1::GetAliTaskName(index))) ;
@@ -342,7 +311,7 @@ void AliQACheckerBase::Run(AliQAv1::ALITASK_t index, AliDetectorRecoParam * reco
 }
 
 //____________________________________________________________________________
-void AliQACheckerBase::Run(AliQAv1::ALITASK_t index, TObjArray ** list, AliDetectorRecoParam * recoParam) 
+void AliQACheckerBase::Run(AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * recoParam) 
 { 
   // RS: perform check for all trigger classes in loop
   Double_t * rv = new Double_t[AliRecoParam::kNSpecies] ;