fixed a problem with writing the expert QA Data. Added a method in simulation and...
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Mar 2009 10:47:22 +0000 (10:47 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Mar 2009 10:47:22 +0000 (10:47 +0000)
STEER/AliQADataMaker.cxx
STEER/AliQAManager.cxx
STEER/AliQAManager.h
STEER/AliReconstruction.cxx
STEER/AliReconstruction.h
STEER/AliSimulation.cxx
STEER/AliSimulation.h

index f07fbbc..97e145b 100644 (file)
@@ -130,7 +130,10 @@ TH1 *  AliQADataMaker::CloneMe(TH1 * hist, Int_t specie) const
 {
   // clones a histogram 
   char * name = Form("%s_%s", AliRecoParam::GetEventSpecieName(specie), hist->GetName()) ;
-  return dynamic_cast<TH1 *>(hist->Clone(name)) ; 
+  TH1 * hClone = dynamic_cast<TH1 *>(hist->Clone(name)) ; 
+  if ( hist->TestBit(AliQA::GetExpertBit()) )
+       hClone->SetBit(AliQA::GetExpertBit()) ; 
+  return hClone ; 
 }
 
 //____________________________________________________________________________
index 2da1f9a..0be0a5b 100644 (file)
@@ -95,9 +95,9 @@ AliQAManager::AliQAManager() :
                        fLoader[iDet]      = NULL ;
                        fQADataMaker[iDet] = NULL ;
                        fQACycles[iDet]    = 999999 ;
-      fQAWriteExpert[iDet] = kTRUE ;
                }
        }       
+  SetWriteExpert() ; 
 }
 
 //_____________________________________________________________________________
@@ -129,9 +129,9 @@ AliQAManager::AliQAManager(const Char_t * mode, const Char_t* gAliceFilename) :
                        fLoader[iDet]      = NULL ;
                        fQADataMaker[iDet] = NULL ;
                        fQACycles[iDet]    = 999999 ;
-      fQAWriteExpert[iDet] = kTRUE ;
     }
   }
+  SetWriteExpert() ; 
 }
 
 //_____________________________________________________________________________
@@ -610,14 +610,13 @@ void  AliQAManager::InitQADataMaker(UInt_t run, TObjArray * detArray)
                        } else {
         if (fQAWriteExpert[iDet])
           qadm->SetWriteExpert() ; 
-                               AliDebug(1, Form("Data Maker found for %s", qadm->GetName())) ; 
+                               AliDebug(1, Form("Data Maker found for %s %d", qadm->GetName(), qadm->WriteExpert())) ; 
                                // skip non active detectors
                                if (detArray) {
                                        AliModule* det = static_cast<AliModule*>(detArray->FindObject(AliQA::GetDetName(iDet))) ;
                                        if (!det || !det->IsActive())  
                                                continue ;
                                }
-                               if (fQAWriteExpert[iDet]) qadm->SetWriteExpert() ; 
              // Set default reco params
         Bool_t sameCycle = kFALSE ; 
                                for (UInt_t taskIndex = 0; taskIndex < AliQA::kNTASKINDEX; taskIndex++) {
@@ -1193,4 +1192,12 @@ void AliQAManager::SetRecoParam(const Int_t det, const AliDetectorRecoParam *par
   GetQADataMaker(det)->SetRecoParam(par) ; 
 }
 
-
+//_____________________________________________________________________________
+void AliQAManager::SetWriteExpert()
+{
+  // enable the writing of QA expert data
+  for (UInt_t iDet = 0; iDet < fgkNDetectors; iDet++) {
+       if (IsSelected(AliQA::GetDetName(iDet))) 
+      fQAWriteExpert[iDet] = kTRUE ;
+  }
+}  
index 23f1874..c8d9baa 100644 (file)
@@ -72,7 +72,7 @@ public:
        void        SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) ;
        void        SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
        void        SetTasks(TString tasks) { fTasks = tasks ; }
-
+  void        SetWriteExpert() ; 
 private: 
        Bool_t                    DoIt(const AliQA::TASKINDEX_t taskIndex) ;
        AliLoader   * GetLoader(Int_t iDet) ; 
index 5968c99..ff6e2b5 100644 (file)
@@ -257,6 +257,7 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename) :
   fRunGlobalQA(kTRUE),
   fSameQACycle(kFALSE),
   fInitQACalled(kFALSE), 
+  fWriteQAExpertData(kTRUE), 
   fRunPlaneEff(kFALSE),
 
   fesd(NULL),
@@ -352,6 +353,7 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fRunGlobalQA(rec.fRunGlobalQA),
   fSameQACycle(rec.fSameQACycle),
   fInitQACalled(rec.fInitQACalled),
+  fWriteQAExpertData(rec.fWriteQAExpertData), 
   fRunPlaneEff(rec.fRunPlaneEff),
 
   fesd(NULL),
@@ -485,6 +487,7 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec)
   fRunGlobalQA                 = rec.fRunGlobalQA;
   fSameQACycle                 = rec.fSameQACycle;
   fInitQACalled                = rec.fInitQACalled;
+  fWriteQAExpertData           = rec.fWriteQAExpertData;
   fRunPlaneEff                 = rec.fRunPlaneEff;
 
   fesd     = NULL;
@@ -528,6 +531,9 @@ void AliReconstruction::InitQA()
   fInitQACalled = kTRUE;
   
   fQAManager = AliQAManager::QAManager("rec") ; 
+  if (fWriteQAExpertData)
+    fQAManager->SetWriteExpert() ; 
   if (fQAManager->IsDefaultStorageSet()) {
     AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
     AliWarning("Default QA reference storage has been already set !");
index b842764..5d8dd77 100644 (file)
@@ -145,6 +145,7 @@ public:
   void    SetQARefDefaultStorage(const char* uri);
   void    InitQA();
   void    MergeQA(); 
+  void    SetWriteQAExpert() { fWriteQAExpertData = kTRUE ; }
 
   // Plane Efficiency Evaluation
   void    SetRunPlaneEff(Bool_t flag=kFALSE)  {fRunPlaneEff = flag;}
@@ -276,7 +277,8 @@ private:
   Bool_t                fRunGlobalQA;   // Run global QA flag
   Bool_t                fSameQACycle;   //! open a new QA data file or not
   Bool_t                fInitQACalled;  //! control of QA intialisation
-  
+  Bool_t                fWriteQAExpertData ; //! decides wheter or not to write experts QA data; true by default
+
   // Plane Efficiency Evaluation
   Bool_t         fRunPlaneEff ;      // Evaluate Plane Efficiency
 
index 04d222e..de7864e 100644 (file)
@@ -195,6 +195,7 @@ AliSimulation::AliSimulation(const char* configFileName,
   fQAManager(NULL), 
   fRunQA(kTRUE), 
   fEventSpecie(AliRecoParam::kDefault),
+  fWriteQAExpertData(kTRUE), 
   fRunHLT("default"),
   fWriteGRPEntry(kTRUE)
 {
@@ -253,7 +254,9 @@ void AliSimulation::InitQA()
   fQAManager = AliQAManager::QAManager("sim") ; 
   fQAManager->SetActiveDetectors(fQADetectors) ; 
   fQATasks = Form("%d %d %d", AliQA::kHITS, AliQA::kSDIGITS, AliQA::kDIGITS) ; 
-  fQAManager->SetTasks(fQATasks) ;     
+  fQAManager->SetTasks(fQATasks) ;
+       if (fWriteQAExpertData)
+    fQAManager->SetWriteExpert() ; 
   
   if (fQAManager->IsDefaultStorageSet()) {
     AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
index df4b2e4..1667b08 100644 (file)
@@ -119,9 +119,7 @@ public:
   void        SetQARefDefaultStorage(const char* uri);
   void        InitQA();
   void        SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecie = es ; }
-
-
-  
+  void        SetWriteQAExpert() { fWriteQAExpertData = kTRUE ; }
 
   void SetWriteGRPEntry(Bool_t flag = kTRUE) { fWriteGRPEntry = flag; }
   void WriteGRPEntry();
@@ -185,6 +183,7 @@ private:
   AliQAManager * fQAManager ;                           // steering object to run QA
   Bool_t               fRunQA ;                         // Runs the QA at the end of simulation
   AliRecoParam::EventSpecie_t fEventSpecie ;            // type of event (see AliRecoParam::EventSpecie_t)
+  Bool_t               fWriteQAExpertData ;             //! decides wheter or not to write experts QA data; true by default
 
   //HLT
   TString        fRunHLT;             // HLT options, HLT is disabled if empty, default='default'