]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
expert QA data are written on demand only. The cycles array has been extended to...
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Aug 2008 18:15:39 +0000 (18:15 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 29 Aug 2008 18:15:39 +0000 (18:15 +0000)
STEER/AliQADataMaker.cxx
STEER/AliQADataMaker.h
STEER/AliQADataMakerRec.cxx
STEER/AliQADataMakerSim.cxx
STEER/AliReconstruction.cxx
STEER/AliReconstruction.h

index 9a08428d7374beb2ec282c85e732ae0f94cec4d0..6142b13fe4e390bf88e35a7b4c60c20f29591f1d 100644 (file)
@@ -51,6 +51,7 @@ AliQADataMaker::AliQADataMaker(const char * name, const char * title) :
   fCurrentCycle(0), 
   fCycle(9999999), 
   fCycleCounter(0), 
+  fWriteExpert(kFALSE),
   fParameterList(0x0), 
   fRun(0)
 {
@@ -67,6 +68,7 @@ AliQADataMaker::AliQADataMaker(const AliQADataMaker& qadm) :
   fCurrentCycle(qadm.fCurrentCycle), 
   fCycle(qadm.fCycle), 
   fCycleCounter(qadm.fCycleCounter), 
+  fWriteExpert(qadm.fWriteExpert),
   fParameterList(qadm.fParameterList),  
   fRun(qadm.fRun)
 {
index 320ef2fceed8bd09d51a49d130dd7ad29c101d5b..9e7ea6cf1687771acec7cfd5409678e68749fca7 100644 (file)
@@ -64,8 +64,11 @@ public:
        const Bool_t        IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
        void                Reset() { fCycleCounter = 0 ; }
        void                SetCycle(Int_t nevts) { fCycle = nevts ; } 
+  void                SetWriteExpert() { fWriteExpert = kTRUE ; }
        virtual void        StartOfCycle(Int_t run = -1)                                                      = 0 ;
        virtual void        StartOfCycle(AliQA::TASKINDEX_t, Int_t run, const Bool_t sameCycle = kFALSE) = 0 ;
+  void                UnSetWriteExpert() { fWriteExpert = kFALSE ; }
+  Bool_t              WriteExpert() { return fWriteExpert ; }
 
        virtual void        SetRecoParam(const AliDetectorRecoParam */*param*/) { return; }
          
@@ -103,6 +106,7 @@ protected:
        Int_t          fCurrentCycle ;    //! current cycle number
        Int_t          fCycle ;           //! length (# events) of the QA data acquisition cycle  
        Int_t          fCycleCounter ;    //! cycle counter
+  Bool_t         fWriteExpert ;     //! flag to write or not the expert QA data
   TList *        fParameterList ;   //! list of QA data parameters
        Int_t          fRun ;             //! run number
 
index c19ee37e2a1def59bc3996c085fbf77edb1b0bd2..c519ace3325630903c8d8380c8cb7f0cb4451907 100644 (file)
@@ -138,18 +138,20 @@ void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task)
           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) ; 
+      if (WriteExpert()) {
+        TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; 
+        if ( expertDir ) { // Write only if requested
+          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) {
index 369bc870429edb50292a4e2456f8e192ac675d0f..49207b25f9285c80c769971ee143d4398d7901a7 100644 (file)
@@ -127,18 +127,20 @@ void AliQADataMakerSim::EndOfCycle(AliQA::TASKINDEX_t task)
         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 (WriteExpert()) {
+      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() ; 
index 31855684e6e4b6e5831da0772128d6691a86aa2b..bf69c94cf4b6be6d5d57b20f8f3d29297da52a4f 100644 (file)
@@ -374,8 +374,11 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
     fReconstructor[iDet] = NULL;
     fLoader[iDet] = NULL;
     fTracker[iDet] = NULL;
-    fQACycles[iDet] = rec.fQACycles[iDet];     
-  }
+  }  
+  
+  for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) 
+    fQACycles[iDet] = rec.fQACycles[iDet];
+
   for (Int_t i = 0; i < rec.fSpecCDBUri.GetEntriesFast(); i++) {
     if (rec.fSpecCDBUri[i]) fSpecCDBUri.Add(rec.fSpecCDBUri[i]->Clone());
   }
@@ -448,9 +451,11 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec)
     delete fReconstructor[iDet]; fReconstructor[iDet] = NULL;
     delete fLoader[iDet]; fLoader[iDet] = NULL;
     delete fTracker[iDet]; fTracker[iDet] = NULL;
-    fQACycles[iDet] = rec.fQACycles[iDet];     
   }
-
+  
+  for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) 
+    fQACycles[iDet] = rec.fQACycles[iDet];
+  
   fVertexer             = NULL;
   delete fDiamondProfile; fDiamondProfile = NULL;
   if (rec.fDiamondProfile) fDiamondProfile = new AliESDVertex(*rec.fDiamondProfile);
@@ -1286,7 +1291,7 @@ void AliReconstruction::SlaveBegin(TTree*)
   if (fRunQA) {
     fQASteer = new AliQADataMakerSteer("rec") ; 
     fQASteer->SetActiveDetectors(fQADetectors) ; 
-    for (Int_t det = 0 ; det < fgkNDetectors ; det++)
+    for (Int_t det = 0 ; det < AliQA::kNDET ; det++)
       fQASteer->SetCycleLength(AliQA::DETECTORINDEX_t(det), fQACycles[det]) ;  
     if (!fRawReader && fQATasks.Contains(AliQA::kRAWS))
       fQATasks.ReplaceAll(Form("%d",AliQA::kRAWS), "") ;
index 02eb818377d752d19f3e4e4ed040273fea09a916..ec15f41bd0258e8d284e0803c0d12c1a80a0eb27 100644 (file)
@@ -265,7 +265,7 @@ private:
   Bool_t        fSetRunNumberFromDataCalled;  //! flag to check if run number is already loaded from run loader
 
   //Quality Assurance
-  Int_t fQACycles[      fgkNDetectors]; // # events over which QA data are accumulated
+  Int_t fQACycles[      AliQA::kNDET];  // # events over which QA data are accumulated
   TString               fQADetectors ;  // list of detectors to be QA'ed       
   AliQADataMakerSteer * fQASteer    ;   //! steering class to run QA
   TString               fQATasks ;      // list of QA tasks to be performed