]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add SetQA method
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Jun 2008 19:16:20 +0000 (19:16 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Jun 2008 19:16:20 +0000 (19:16 +0000)
STEER/AliQACheckerBase.cxx
STEER/AliQACheckerBase.h

index 2aed6d05d124326dce848bde1cc400243fd181f6..442839195a0c3f29c6ef301cf41da632fc02334f 100644 (file)
@@ -199,26 +199,19 @@ void AliQACheckerBase::Init(const AliQA::DETECTORINDEX_t det)
 //____________________________________________________________________________
 void AliQACheckerBase::Run(AliQA::ALITASK_t index, TObjArray * list) 
 { 
-  AliDebug(1, Form("Processing %s", AliQA::GetAliTaskName(index))) ; 
-
-  AliQA * qa = AliQA::Instance(index) ; 
-
-  Double_t rv = -1 ;   
-  if (list)
-    rv = Check(index, list) ;
-  else 
-    rv = Check(index) ;   
-
-  if ( rv <= 0.) 
-    qa->Set(AliQA::kFATAL) ; 
-  else if ( rv > 0 && rv <= 0.0002 )
-    qa->Set(AliQA::kERROR) ; 
-  else if ( rv > 0.0002 && rv <= 0.5 )
-    qa->Set(AliQA::kWARNING) ;
-  else if ( rv > 0.5 && rv < 1 ) 
-    qa->Set(AliQA::kINFO) ; 
-  AliDebug(1, Form("Test result of %s", AliQA::GetAliTaskName(index))) ;
-  Finish() ; 
+       AliDebug(1, Form("Processing %s", AliQA::GetAliTaskName(index))) ; 
+
+       Double_t rv = -1 ;      
+       if (list)
+               rv = Check(index, list) ;
+       else 
+               rv = Check(index) ;   
+
+       SetQA(index, rv) ; 
+       
+       AliDebug(1, Form("Test result of %s", AliQA::GetAliTaskName(index))) ;
+       
+       Finish() ; 
 }
 
 //____________________________________________________________________________
@@ -231,3 +224,20 @@ void AliQACheckerBase::Finish() const
        qa->Write(qa->GetName(), kWriteDelete) ;   
        AliQA::GetQAResultFile()->Close() ; 
 }
+
+//____________________________________________________________________________
+void AliQACheckerBase::SetQA(AliQA::ALITASK_t index, const Double_t value) const
+{
+       // sets the QA according the return value of the Check
+
+       AliQA * qa = AliQA::Instance(index) ; 
+
+       if ( value <= 0.) 
+               qa->Set(AliQA::kFATAL) ; 
+       else if ( value > 0 && value <= 0.0002 )
+               qa->Set(AliQA::kERROR) ; 
+       else if ( value > 0.0002 && value <= 0.5 )
+               qa->Set(AliQA::kWARNING) ;
+       else if ( value > 0.5 && value < 1 ) 
+               qa->Set(AliQA::kINFO) ;                 
+}
index 4d62c6969cbf95776ded6f37cbb699304a57293d..bcf6a23c1c8dbea3c92dca2f0170a605f2e8737e 100644 (file)
@@ -43,6 +43,7 @@ protected:
   const Double_t DiffC(const TH1 * href, const TH1 * hin) const ;   
   const Double_t DiffK(const TH1 * href, const TH1 * hin) const ;   
   void           Finish() const ; 
+  virtual void   SetQA(AliQA::ALITASK_t index, const Double_t value) const ;   
 
   TDirectory  * fDataSubDir    ; //! directory for the current task directory in the current detector directory in the data file
   TDirectory  * fRefSubDir     ; //! directory for the current task directory in the current detector directory in the reference file