]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added the notion of expert QA data
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Aug 2008 19:44:40 +0000 (19:44 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 27 Aug 2008 19:44:40 +0000 (19:44 +0000)
STEER/AliCorrQADataMakerRec.cxx
STEER/AliQA.cxx
STEER/AliQA.h
STEER/AliQADataMaker.cxx
STEER/AliQADataMaker.h
STEER/AliQADataMakerRec.cxx
STEER/AliQADataMakerRec.h
STEER/AliQADataMakerSim.cxx
STEER/AliQADataMakerSim.h

index 776b2eeab8e360e113be5ca21e6b2ad8fa2dcd9c..2a5d16af793e3392d82c81639dd0aa61fcbad2ab 100644 (file)
@@ -42,7 +42,7 @@ ClassImp(AliCorrQADataMakerRec)
            
 //____________________________________________________________________________ 
 AliCorrQADataMakerRec::AliCorrQADataMakerRec(AliQADataMaker ** qadm ) : 
-  AliQADataMakerRec("Corr", "Corr Quality Assurance Data Maker"),
+AliQADataMakerRec(AliQA::GetDetName(AliQA::kCORR), "Corr Quality Assurance Data Maker"),
   fMaxRawVar(0),  
   fqadm(qadm)
 {
index a53bbad9d7ee3e4492c7948cb900bc4badcde74b..b6b6aa9e88008809fca7f16aa218c989154dbaba 100644 (file)
@@ -76,6 +76,7 @@ const TString AliQA::fkgQACorrNtName     = "CorrQA" ;
 const TString AliQA::fkgRefOCDBDirName   = "Ref"  ; 
 TString AliQA::fkgRefDataDirName        = ""  ; 
 const TString AliQA::fkgQARefOCDBDefault = "alien://folder=/alice/QA/20"  ; 
+const TString AliQA::fkgExpert                  = "QAExpErT" ; 
 
 //____________________________________________________________________________
 AliQA::AliQA() : 
index 63573cedf539a1d5f491a54bd13c01d2f08265a4..257f2d28b52c5bade9ce97777bb922dc5648d078 100644 (file)
@@ -50,6 +50,7 @@ public:
        const Bool_t           CheckFatal() const ;
        static void            Close() ; 
        static const char *    GetAliTaskName(ALITASK_t tsk) ;
+  static const TString   GetExpert() { return fkgExpert ; }
        static const TString   GetLabLocalFile() { return fkgLabLocalFile ; } 
        static const TString   GetLabLocalOCDB() { return fkgLabLocalOCDB ; } 
        static const TString   GetLabAliEnOCDB() { return fkgLabAliEnOCDB ; } 
@@ -123,6 +124,7 @@ private:
        static TString       fgQAResultFileName     ; //! the output file where the QA results are stored  
        static TString       fgRTNames[]                  ; //! list of Run Type names   
        static TString       fgTaskNames[]              ; //! list of tasks names   
+  static const TString fkgExpert              ; //! name for the expert directory
        static const TString fkgLabLocalFile        ; //! label to identify a file as local 
        static const TString fkgLabLocalOCDB        ; //! label to identify a file as local OCDB 
        static const TString fkgLabAliEnOCDB        ; //! label to identify a file as AliEn OCDB 
index 7d48e30f42031f49cab2d3f2d528e5c62d4ef7fa..9a08428d7374beb2ec282c85e732ae0f94cec4d0 100644 (file)
@@ -75,7 +75,7 @@ AliQADataMaker::AliQADataMaker(const AliQADataMaker& qadm) :
 }
 
 //____________________________________________________________________________
-Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t saveForCorr) 
+Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert, const Bool_t saveForCorr) 
 { 
        // Set histograms memory resident and add to the list
        // Maximm allowed is 10000
@@ -89,6 +89,11 @@ Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray * list,
                return -1 ; 
        } else {
                hist->SetDirectory(0) ; 
+    if (expert) {
+      TString name(hist->GetTitle()) ; 
+      name.Append(AliQA::GetExpert()) ; 
+      hist->SetTitle(name) ;
+    }
                list->AddAtAndExpand(hist, index) ; 
     char * name = Form("%s_%s", list->GetName(), hist->GetName()) ;  
     TParameter<double> * p = new TParameter<double>(name, 9999.9999) ;
index f28ee346319f3f7b22d962ebc40e18e3744275c1..320ef2fceed8bd09d51a49d130dd7ad29c101d5b 100644 (file)
@@ -40,12 +40,12 @@ public:
        AliQADataMaker(const AliQADataMaker& qadm) ;   
        virtual ~AliQADataMaker() {} // dtor
   
-       virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index)          = 0 ; 
-       virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index)            = 0 ; 
-       virtual Int_t Add2HitsList(TH1 * hist, const Int_t index)            = 0 ; 
-       virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index)       = 0 ; 
-       virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t saveForCorr = kFALSE)            = 0 ; 
-       virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index)         = 0 ; 
+       virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)          = 0 ; 
+       virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)            = 0 ; 
+       virtual Int_t Add2HitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)            = 0 ; 
+       virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)       = 0 ; 
+       virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE)            = 0 ; 
+       virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)         = 0 ; 
        virtual void        Exec(AliQA::TASKINDEX_t, TObject * data)         = 0 ;
        virtual void        EndOfCycle()                                     = 0 ;
        virtual void        EndOfCycle(AliQA::TASKINDEX_t)                   = 0 ;
@@ -71,7 +71,7 @@ public:
          
 protected: 
 
-       Int_t          Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t saveForCorr = kFALSE) ;
+       Int_t          Add2List(TH1 * hist, const Int_t index, TObjArray * list, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) ;
        virtual void   DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task ) ; 
        virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * obj ) = 0 ; 
        TObject *      GetData(TObjArray * list, const Int_t index) ;
index 72bd9ccd1e3d2da5c2c235d3a89863bb0801f941..c19ee37e2a1def59bc3996c085fbf77edb1b0bd2 100644 (file)
@@ -129,9 +129,31 @@ void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task)
                subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ; 
        if ( subDir ) {
                subDir->cd() ; 
-               if (list) 
-                       list->Write() ;
-    if (fObject) {
+               if (list) {
+      TIter next(list) ; 
+      TH1 * obj ; 
+      while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+        TString name(obj->GetTitle()) ;
+        if (!name.Contains(AliQA::GetExpert())) {
+          obj->Write() ;
+        }
+      }
+      TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
+      if ( expertDir ) {
+        expertDir->cd() ;
+        next.Reset() ; 
+        while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+          TString name(obj->GetTitle()) ;
+          if (!name.Contains(AliQA::GetExpert())) 
+            continue ; 
+          name.ReplaceAll(AliQA::GetExpert(), "") ;
+          obj->SetTitle(name) ; 
+          obj->Write() ;
+        }      
+      }
+    }
+    if (fObject && GetName() == AliQA::kCORR) {
+      subDir->cd() ; 
       fObject->Write() ; 
     }
        }
@@ -254,7 +276,13 @@ void AliQADataMakerRec::StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const B
        TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ; 
        if (!subDir)
                subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;  
+  TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
+  if (!expertDir)
+    expertDir = subDir->mkdir(AliQA::GetExpert()) ; 
+  
        subDir->cd() ; 
+  
 
        StartOfDetectorCycle() ; 
 }
index ba4d7ec86392f422aef3016a12fedea585a5ecd0..664f78169757de702a41db32b66b8d9d6af61da2 100644 (file)
@@ -30,12 +30,12 @@ public:
        AliQADataMakerRec& operator = (const AliQADataMakerRec& qadm) ;
        virtual ~AliQADataMakerRec() ; // dtor
   
-       virtual Int_t Add2DigitsList(TH1 * /*hist*/, const Int_t /*index*/)    { return -1 ; } 
-       virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index)  { return Add2List(hist, index, fESDsQAList) ; }
-       virtual Int_t Add2HitsList(TH1 * /*hist*/, const Int_t /*index*/)       { return -1 ; }  
-       virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index)  { return Add2List(hist, index, fRecPointsQAList) ; }
-       virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t saveForCorr = kFALSE)  { return Add2List(hist, index, fRawsQAList, saveForCorr) ; }
-       virtual Int_t Add2SDigitsList(TH1 * /*hist*/, const Int_t /*index*/)   { return -1 ; } 
+       virtual Int_t Add2DigitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/)    { return -1 ; } 
+       virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)  { return Add2List(hist, index, fESDsQAList, expert) ; }
+       virtual Int_t Add2HitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/)       { return -1 ; }  
+       virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)  { return Add2List(hist, index, fRecPointsQAList, expert) ; }
+       virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE)  { return Add2List(hist, index, fRawsQAList, expert, saveForCorr) ; }
+       virtual Int_t Add2SDigitsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/)   { return -1 ; } 
        virtual void        Exec(AliQA::TASKINDEX_t task, TObject * data) ;
        virtual void        EndOfCycle() ;
        virtual void        EndOfCycle(AliQA::TASKINDEX_t task) ;
index 598e427af9144de174074fd0ca748a0fb0b8d8e4..369bc870429edb50292a4e2456f8e192ac675d0f 100644 (file)
@@ -117,8 +117,30 @@ void AliQADataMakerSim::EndOfCycle(AliQA::TASKINDEX_t task)
        TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ; 
        if (subDir) { 
                subDir->cd() ; 
-               list->Write() ; 
-       }
+    TIter next(list) ; 
+    TH1 * obj ; 
+    while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+      TString name(obj->GetTitle()) ;
+      if (name.Contains(AliQA::GetExpert())) {
+        name.ReplaceAll(AliQA::GetExpert(), "") ;
+        obj->SetTitle(name) ; 
+        obj->Write() ;
+      }
+    }
+    TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
+    if ( expertDir ) {
+      expertDir->cd() ;
+      next.Reset() ; 
+      while ( (obj = dynamic_cast<TH1 *>(next())) ) {
+        TString name(obj->GetTitle()) ;
+        if (name.Contains(AliQA::GetExpert())) 
+          continue ; 
+        name.ReplaceAll(AliQA::GetExpert(), "") ;
+        obj->SetTitle(name) ; 
+        obj->Write() ;
+      }      
+    }
+  }
   ResetCycle() ; 
 }
  
@@ -255,6 +277,11 @@ void AliQADataMakerSim::StartOfCycle(AliQA::TASKINDEX_t task, Int_t run, const B
        TDirectory * subDir = fDetectorDir->GetDirectory(AliQA::GetTaskName(task)) ; 
        if (!subDir)
                subDir = fDetectorDir->mkdir(AliQA::GetTaskName(task)) ;  
+  
+  TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
+  if (!expertDir)
+    expertDir = subDir->mkdir(AliQA::GetExpert()) ; 
+
        subDir->cd() ; 
          
        StartOfDetectorCycle() ; 
index 5f1d1f801a68b33df3ffca91dbbd0afb1fc21779..4b81917f654d0bc99f6f6449dc5b2fc5ada2fc72 100644 (file)
@@ -28,12 +28,12 @@ public:
        AliQADataMakerSim& operator = (const AliQADataMakerSim& qadm) ;
        virtual ~AliQADataMakerSim() ; // dtor
   
-       virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index)    { return Add2List(hist, index, fDigitsQAList) ; }
-       virtual Int_t Add2ESDsList(TH1 * /*hist*/, const Int_t /*index*/)      { return -1 ; } 
-       virtual Int_t Add2HitsList(TH1 * hist, const Int_t index)      { return Add2List(hist, index, fHitsQAList) ; }
-       virtual Int_t Add2RecPointsList(TH1 * /*hist*/, const Int_t /*index*/) { return -1 ; } 
-       virtual Int_t Add2RawsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t saveForCorr = kFALSE)      { return -1 ; }  
-       virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index)   { return Add2List(hist, index, fSDigitsQAList) ; }
+       virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)    { return Add2List(hist, index, fDigitsQAList, expert) ; }
+       virtual Int_t Add2ESDsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/)      { return -1 ; } 
+       virtual Int_t Add2HitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)      { return Add2List(hist, index, fHitsQAList, expert) ; }
+       virtual Int_t Add2RecPointsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/) { return -1 ; } 
+       virtual Int_t Add2RawsList(TH1 * /*hist*/, const Int_t /*index*/, const Bool_t /*expert = kFALSE*/, const Bool_t /*saveForCorr = kFALSE*/)      { return -1 ; }  
+       virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE)   { return Add2List(hist, index, fSDigitsQAList, expert) ; }
        virtual void        Exec(AliQA::TASKINDEX_t task, TObject * data) ;
        virtual void        EndOfCycle() ;
        virtual void        EndOfCycle(AliQA::TASKINDEX_t task) ;