]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added the option to save or not the QA data objects
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Nov 2009 19:36:01 +0000 (19:36 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Nov 2009 19:36:01 +0000 (19:36 +0000)
STEER/AliQADataMakerRec.cxx
STEER/AliQAManager.cxx
STEER/AliQAManager.h

index 3fef9e5ab9cfa75ae50f464204eb3362b6bf39e9..58bd7d1f39928e162def1c9f92f0d97b2dd2718b 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "AliLog.h"
 #include "AliQADataMakerRec.h"
+#include "AliQAManager.h"
 #include "AliESDEvent.h"
 #include "AliRawReader.h"
 
@@ -163,6 +164,7 @@ void AliQADataMakerRec::EndOfCycle(AliQAv1::TASKINDEX_t task)
     return ; 
   //DefaultEndOfDetectorCycle(task) ;
        EndOfDetectorCycle(task, list) ;
+  
   fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ; 
   if (!fDetectorDir)
     fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ; 
@@ -378,7 +380,8 @@ void AliQADataMakerRec::StartOfCycle(AliQAv1::TASKINDEX_t task, Int_t run, const
                ResetCycle() ;
                if (fOutput) 
                        fOutput->Close() ; 
-               fOutput = AliQAv1::GetQADataFile(GetName(), fRun) ;     
+               if (AliQAManager::QAManager(AliQAv1::kRECMODE)->IsSaveData())
+      fOutput = AliQAv1::GetQADataFile(GetName(), fRun) ;      
        }       
        AliDebug(AliQAv1::GetQADebugLevel(), Form(" Run %d Cycle %d task %s file %s", 
                                 fRun, fCurrentCycle, AliQAv1::GetTaskName(task).Data(), fOutput->GetName() )) ;
index 9a0e08a7810d9ced6c6b83a057ca211dd4a4c545..ae436ac629ad5957141a157421f8b01ea6586917 100644 (file)
@@ -90,7 +90,8 @@ AliQAManager::AliQAManager() :
   fRunLoader(NULL), 
   fTasks(""),  
   fEventSpecie(AliRecoParam::kDefault), 
-  fPrintImage(kTRUE) 
+  fPrintImage(kTRUE), 
+  fSaveData(kTRUE) 
 {
        // default ctor
        fMaxEvents = fNumberOfEvents ; 
@@ -125,7 +126,8 @@ AliQAManager::AliQAManager(AliQAv1::MODE_t mode, const Char_t* gAliceFilename) :
        fRunLoader(NULL), 
   fTasks(""), 
   fEventSpecie(AliRecoParam::kDefault), 
-  fPrintImage(kTRUE) 
+  fPrintImage(kTRUE), 
+  fSaveData(kTRUE) 
 {
        // default ctor
        fMaxEvents = fNumberOfEvents ; 
@@ -160,7 +162,8 @@ AliQAManager::AliQAManager(const AliQAManager & qas) :
        fRunLoader(NULL), 
   fTasks(qas.fTasks), 
   fEventSpecie(qas.fEventSpecie), 
-  fPrintImage(qas.fPrintImage) 
+  fPrintImage(qas.fPrintImage), 
+  fSaveData(qas.fSaveData) 
 
 {
        // cpy ctor
@@ -534,10 +537,12 @@ void  AliQAManager::EndOfCycle(TObjArray * detArray)
                        }
       qac->SetPrintImage(fPrintImage) ;
       
-                       for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
-                               if ( fTasks.Contains(Form("%d", taskIndex)) ) 
-                                       qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
-                       }
+      if (IsSaveData()) {
+        for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
+          if ( fTasks.Contains(Form("%d", taskIndex)) ) 
+            qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
+        }
+      }
                        qadm->Finish();
                }
        }
@@ -563,10 +568,12 @@ void  AliQAManager::EndOfCycle(TString detectors)
       if (!detectors.Contains(AliQAv1::GetDetName(iDet))) 
         continue ;
       qac->SetPrintImage(fPrintImage) ;
-               for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
-                               if ( fTasks.Contains(Form("%d", taskIndex)) ) 
-                                       qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
-                       }
+      if (IsSaveData()) {
+        for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) {
+          if ( fTasks.Contains(Form("%d", taskIndex)) ) 
+            qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ;
+        }
+      }
                        qadm->Finish();
                }
        }
index 52d942154427e5270edbe3aafc749ed40ea16334..16f8b0b2c8f58de3ea31627a485b049b6c752fa9 100644 (file)
@@ -54,6 +54,7 @@ public:
        AliQADataMaker * GetQADataMaker(const Int_t iDet) ; 
        void             Increment(const AliQAv1::TASKINDEX_t taskIndex = AliQAv1::kNULLTASKINDEX) ;
        void             InitQADataMaker(UInt_t run, TObjArray * detArray=0x0) ;
+  Bool_t           IsSaveData() { return fSaveData ; } 
        Bool_t           IsSelected(const Char_t * detName)  ;
        Bool_t           Merge(Int_t runNumber = -1, const char *fileName = NULL) const ;  
   void             MergeCustom() const ;
@@ -79,6 +80,7 @@ public:
   void             SetPrintImage(Bool_t opt = kTRUE) { fPrintImage = opt ; }
        void             SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) ;
        void             SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
+  void             SetSaveData(Bool_t opt = kTRUE ) { fSaveData = opt ; }
        void             SetTasks(TString tasks) { fTasks = tasks ; }
   void             SetWriteExpert() ; 
   void             ShowQA() ; 
@@ -118,9 +120,10 @@ private:
        Int_t                       fQACycles[fgkNDetectors];       //! array of QA cycle length
        Bool_t                      fQAWriteExpert[fgkNDetectors];  //! array of QA cycle length
   AliRecoParam::EventSpecie_t fEventSpecie ;                  //! type of event 
-  Bool_t                      fPrintImage ;                    //! flag to print the images or not
+  Bool_t                      fPrintImage ;                   //! flag to print the images or not
+  Bool_t                      fSaveData ;                     //! flag to sve the QA data or not   
     
-  ClassDef(AliQAManager, 1)      // class for running the QA makers
+  ClassDef(AliQAManager, 2)      // class for running the QA makers
 };
 
 #endif