Setting the reco-params for the QADataMakerRec objects. At least we managed to remove...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jul 2008 21:49:27 +0000 (21:49 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Jul 2008 21:49:27 +0000 (21:49 +0000)
MUON/AliMUONQADataMakerRec.cxx
MUON/AliMUONQADataMakerRec.h
PHOS/AliPHOSQADataMakerRec.cxx
PHOS/AliPHOSQADataMakerRec.h
PMD/AliPMDQADataMakerRec.cxx
STEER/AliQADataMaker.h
STEER/AliQADataMakerRec.cxx
STEER/AliQADataMakerRec.h
STEER/AliReconstruction.cxx

index f632936..fb9c320 100644 (file)
@@ -28,7 +28,6 @@
 #include "AliMUONLocalTrigger.h"
 #include "AliMUONRawStreamTracker.h"
 #include "AliMUONRawStreamTrigger.h"
-#include "AliMUONRecoParam.h"
 #include "AliMUONRegHeader.h"
 #include "AliMUONTrackerCalibratedDataMaker.h"
 #include "AliMUONTriggerDisplay.h"
@@ -81,7 +80,7 @@ ClassImp(AliMUONQADataMakerRec)
 /// \endcond
            
 //____________________________________________________________________________ 
-AliMUONQADataMakerRec::AliMUONQADataMakerRec(const AliMUONRecoParam* recoParam) : 
+AliMUONQADataMakerRec::AliMUONQADataMakerRec() : 
 AliQADataMakerRec(AliQA::GetDetName(AliQA::kMUON), "MUON Quality Assurance Data Maker"),
 fIsInitRaws(kFALSE),
 fIsInitRecPointsTracker(kFALSE),
@@ -91,8 +90,7 @@ fDigitStore(0x0),
 fTriggerStore(0x0),
 fDigitMaker(0x0),
 fClusterStore(0x0),
-fTrackerDataMaker(0x0),
-fRecoParam(recoParam)
+fTrackerDataMaker(0x0)
 {
     /// ctor
        
index 86ddcb6..3cfa052 100644 (file)
@@ -17,6 +17,7 @@ class AliMUONVTriggerStore;
 class AliMUONVClusterStore;
 
 #include "AliQADataMakerRec.h"
+#include "AliMUONRecoParam.h"
 
 class AliMUONVTrackerDataMaker;
 class AliMUONRecoParam;
@@ -24,7 +25,7 @@ class AliMUONRecoParam;
 class AliMUONQADataMakerRec: public AliQADataMakerRec {
 
 public:
-  AliMUONQADataMakerRec(const AliMUONRecoParam* recoParam);         
+  AliMUONQADataMakerRec();         
   AliMUONQADataMakerRec(const AliMUONQADataMakerRec& qadm);   
   AliMUONQADataMakerRec& operator=(const AliMUONQADataMakerRec& qadm);
   virtual ~AliMUONQADataMakerRec();
@@ -93,7 +94,7 @@ private:
   void MakeRecPointsTracker(TTree* treeR);
   void MakeRecPointsTrigger(TTree* treeR);
        
-  const AliMUONRecoParam* GetRecoParam() const { return fRecoParam; }
+  const AliMUONRecoParam* GetRecoParam() const { return dynamic_cast<const AliMUONRecoParam *>(fRecoParam); }
   
   Bool_t  fIsInitRaws;       //!<  info if InitRaws() went ok
   Bool_t  fIsInitRecPointsTracker;  //!<  info if InitRecPoints() went ok
@@ -105,11 +106,9 @@ private:
   AliMUONDigitMaker*    fDigitMaker;  //!< pointer to digit maker
   AliMUONVClusterStore* fClusterStore; //!< pointer to cluster store
        
-       AliMUONVTrackerDataMaker* fTrackerDataMaker; //!< tracker data accumulation
+  AliMUONVTrackerDataMaker* fTrackerDataMaker; //!< tracker data accumulation
        
-  const AliMUONRecoParam* fRecoParam; //!< pointer to reco params
-  
-  ClassDef(AliMUONQADataMakerRec,3)  // MUON Quality assurance data maker
+  ClassDef(AliMUONQADataMakerRec,4)  // MUON Quality assurance data maker
 
 };
 #endif
index fb8d978..6ec92cb 100644 (file)
@@ -45,7 +45,6 @@
 #include "AliPHOSRawDecoderv1.h"
 #include "AliPHOSRawDecoderv2.h"
 #include "AliPHOSReconstructor.h"
-#include "AliPHOSRecoParam.h"
 
 ClassImp(AliPHOSQADataMakerRec)
            
@@ -227,14 +226,14 @@ void AliPHOSQADataMakerRec::MakeRaws(AliRawReader* rawReader)
   //Fill prepared histograms with Raw digit properties
   rawReader->Reset() ;
   AliPHOSRawDecoder * decoder ;
-  if(strcmp(AliPHOSReconstructor::GetRecoParam()->EMCDecoderVersion(),"v1")==0)
+  if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v1")==0)
     decoder=new AliPHOSRawDecoderv1(rawReader);
   else
-    if(strcmp(AliPHOSReconstructor::GetRecoParam()->EMCDecoderVersion(),"v2")==0)
+    if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v2")==0)
       decoder=new AliPHOSRawDecoderv2(rawReader);
     else
       decoder=new AliPHOSRawDecoder(rawReader);
-  decoder->SubtractPedestals(AliPHOSReconstructor::GetRecoParam()->EMCSubtractPedestals());
+  decoder->SubtractPedestals(GetRecoParam()->EMCSubtractPedestals());
   Double_t lgEtot=0. ;
   Double_t hgEtot=0. ;
   Int_t lgNtot=0 ;
index 65b3567..014ca55 100644 (file)
@@ -22,6 +22,7 @@ class TObjArray ;
 
 // --- AliRoot header files ---
 #include "AliQADataMakerRec.h"
+#include "AliPHOSRecoParam.h"
 
 class AliPHOSQADataMakerRec: public AliQADataMakerRec {
 
@@ -46,6 +47,8 @@ public:
   virtual ~AliPHOSQADataMakerRec() {;} // dtor
   
 private:
+  const AliPHOSRecoParam* GetRecoParam() const { return dynamic_cast<const AliPHOSRecoParam *>(fRecoParam); }
+
   virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * list) ;
   virtual void   InitESDs() ; 
   virtual void   InitRecPoints() ; 
index e30d7ce..61422e7 100644 (file)
@@ -40,7 +40,6 @@
 #include "AliPMDddldata.h"
 #include "AliPMDUtility.h"
 #include "AliESDPmdTrack.h"
-//#include "AliPMDRecoParam.h"
 
 ClassImp(AliPMDQADataMakerRec)
            
index 331fd1c..6c6cc15 100644 (file)
@@ -25,6 +25,7 @@ class TObject;
 class TTree; 
 class AliESDEvent;
 class AliRawReader;
+class AliDetectorRecoParam;
 
 // --- Standard library ---
 
@@ -63,6 +64,8 @@ public:
     void                SetCycle(Int_t nevts) { fCycle = nevts ; } 
        virtual void        StartOfCycle(AliQA::TASKINDEX_t, const Bool_t sameCycle = kFALSE) = 0 ;
 
+       virtual void                SetRecoParam(const AliDetectorRecoParam */*param*/) { return; }
+         
 protected: 
 
        Int_t          Add2List(TH1 * hist, const Int_t index, TObjArray * list) ;
index 54970bf..1161b19 100644 (file)
@@ -42,7 +42,8 @@ AliQADataMakerRec::AliQADataMakerRec(const char * name, const char * title) :
   AliQADataMaker(name, title), 
   fESDsQAList(0x0), 
   fRawsQAList(0x0), 
-  fRecPointsQAList(0x0)
+  fRecPointsQAList(0x0),
+  fRecoParam(0x0)
 {
   // ctor
        fDetectorDirName = GetName() ; 
@@ -50,10 +51,11 @@ AliQADataMakerRec::AliQADataMakerRec(const char * name, const char * title) :
 
 //____________________________________________________________________________ 
 AliQADataMakerRec::AliQADataMakerRec(const AliQADataMakerRec& qadm) :
-    AliQADataMaker(qadm.GetName(), qadm.GetTitle()), 
-    fESDsQAList(qadm.fESDsQAList),
-       fRawsQAList(qadm.fRawsQAList),
-       fRecPointsQAList(qadm.fRecPointsQAList)
+  AliQADataMaker(qadm.GetName(), qadm.GetTitle()), 
+  fESDsQAList(qadm.fESDsQAList),
+  fRawsQAList(qadm.fRawsQAList),
+  fRecPointsQAList(qadm.fRecPointsQAList),
+  fRecoParam(qadm.fRecoParam)
   
 {
   //copy ctor
index 3df126b..128c161 100644 (file)
@@ -48,6 +48,8 @@ public:
        virtual void        Init(AliQA::TASKINDEX_t task, TObjArray * list, Int_t run, Int_t cycles = -1) ;
        virtual void        StartOfCycle(AliQA::TASKINDEX_t task, const Bool_t sameCycle = kFALSE) ;
 
+       virtual void                SetRecoParam(const AliDetectorRecoParam *param) { fRecoParam = param; }
+
 protected: 
 
        virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t, TObjArray * ) {AliInfo("To be implemented by detectors");} 
@@ -74,8 +76,10 @@ protected:
        TObjArray *    fESDsQAList ;      //! list of the ESDs QA data objects
        TObjArray *    fRawsQAList ;      //! list of the raws QA data objects
        TObjArray *    fRecPointsQAList ; //! list of the RecPoints QA data objects
+
+       const AliDetectorRecoParam *fRecoParam; //! const pointer to the reco parameters to be used in the reco QA
   
- ClassDef(AliQADataMakerRec,1)  // description 
+ ClassDef(AliQADataMakerRec,2)  // description 
 
 };
 
index a500963..6737da7 100644 (file)
@@ -295,7 +295,7 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename,
     fTracker[iDet] = NULL;
                fQACycles[iDet] = 999999;       
   }
-       fQASteer = new AliQADataMakerSteer("rec") ; 
+  fQASteer = new AliQADataMakerSteer("rec") ; 
   AliPID pid;
 }
 
@@ -361,7 +361,7 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fInitCDBCalled(rec.fInitCDBCalled),
   fSetRunNumberFromDataCalled(rec.fSetRunNumberFromDataCalled),
   fQADetectors(rec.fQADetectors), 
-       fQASteer(rec.fQASteer),  
+  fQASteer(rec.fQASteer),  
   fQATasks(rec.fQATasks), 
   fRunQA(rec.fRunQA),  
   fRunGlobalQA(rec.fRunGlobalQA),
@@ -391,7 +391,7 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
     fReconstructor[iDet] = NULL;
     fLoader[iDet] = NULL;
     fTracker[iDet] = NULL;
-               fQACycles[iDet] = rec.fQACycles[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());
@@ -419,7 +419,7 @@ AliReconstruction::~AliReconstruction()
   fOptions.Delete();
   fSpecCDBUri.Delete();
   delete fForcedFieldMap;
-       delete fQASteer ;
+  delete fQASteer ;
   AliCodeTimer::Instance()->Print();
 }
 
@@ -1063,6 +1063,8 @@ Bool_t AliReconstruction::InitRun(const char* input)
       if (!qadm) 
        continue;
       AliInfo(Form("Initializing the QA data maker for %s", fgkDetectorName[iDet]));
+      // Set default reco params
+      qadm->SetRecoParam(fRecoParam.GetDetRecoParam(iDet));
       if (fQATasks.Contains(Form("%d", AliQA::kRAWS))) ; 
       qadm->Init(AliQA::kRAWS, AliCDBManager::Instance()->GetRun());
       if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
@@ -1167,6 +1169,8 @@ Bool_t AliReconstruction::RunEvent(Int_t iEvent)
       AliQADataMaker *qadm = fQASteer->GetQADataMaker(iDet);  
       if (!qadm) 
        continue;
+      // Set reco params valid for this event
+      qadm->SetRecoParam(fRecoParam.GetDetRecoParam(iDet));
       if (fQATasks.Contains(Form("%d", AliQA::kRAWS))) {
        qadm->StartOfCycle(AliQA::kRAWS, fSameQACycle);
        fSameQACycle = kTRUE;
@@ -1423,13 +1427,13 @@ Bool_t AliReconstruction::RunEvent(Int_t iEvent)
     // write ESD
     if (fCleanESD) CleanESD(fesd);
 
-       if (fRunQA) {
-               if (fRunGlobalQA) {
-                       AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
-                       if (qadm && fQATasks.Contains(Form("%d", AliQA::kESDS)))
-                               qadm->Exec(AliQA::kESDS, fesd);
-               }
-       }
+    if (fRunQA) {
+      if (fRunGlobalQA) {
+       AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
+       if (qadm && fQATasks.Contains(Form("%d", AliQA::kESDS)))
+         qadm->Exec(AliQA::kESDS, fesd);
+      }
+    }
 
     if (fWriteESDfriend) {
       fesdf->~AliESDfriend();
@@ -1583,23 +1587,23 @@ Bool_t AliReconstruction::FinishRun()
 
   //Finish QA and end of cycle for out-of-loop QA
   if (!fInLoopQA) {
-         if (fRunQA) {
-                 if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
-                         fQASteer->Run(fRunLocalReconstruction.Data(), AliQA::kRECPOINTS, fSameQACycle);
-                 //fQASteer->Reset() ;
-                 if (fQATasks.Contains(Form("%d", AliQA::kESDS))) 
-                         fQASteer->Run(fRunLocalReconstruction.Data(), AliQA::kESDS, fSameQACycle);
-                 if (fRunGlobalQA) {
-                        AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
-                         if (qadm) {
-                                 if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
-                                         qadm->EndOfCycle(AliQA::kRECPOINTS);
-                                 if (fQATasks.Contains(Form("%d", AliQA::kESDS))) 
-                                         qadm->EndOfCycle(AliQA::kESDS);
-                                 qadm->Finish();
-                         }
-                 }
-         }
+    if (fRunQA) {
+      if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
+       fQASteer->Run(fRunLocalReconstruction.Data(), AliQA::kRECPOINTS, fSameQACycle);
+      //fQASteer->Reset() ;
+      if (fQATasks.Contains(Form("%d", AliQA::kESDS))) 
+       fQASteer->Run(fRunLocalReconstruction.Data(), AliQA::kESDS, fSameQACycle);
+      if (fRunGlobalQA) {
+       AliQADataMaker *qadm = fQASteer->GetQADataMaker(AliQA::kGLOBAL);
+       if (qadm) {
+         if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
+           qadm->EndOfCycle(AliQA::kRECPOINTS);
+         if (fQATasks.Contains(Form("%d", AliQA::kESDS))) 
+           qadm->EndOfCycle(AliQA::kESDS);
+         qadm->Finish();
+       }
+      }
+    }
   }
   
   // Cleanup of CDB manager: cache and active storages!
@@ -1732,18 +1736,18 @@ Bool_t AliReconstruction::RunLocalEventReconstruction(const TString& detectors)
     // In-loop QA for local reconstrucion 
                TString detQAStr(fQADetectors) ; 
     if (fRunQA && fInLoopQA && IsSelected(fgkDetectorName[iDet], detQAStr) ) {
-                        AliQADataMaker * qadm = fQASteer->GetQADataMaker(iDet);
-       if (qadm) {
-         //AliCodeTimerStart
-         //(Form("Running QA data maker for %s", fgkDetectorName[iDet]));
-         //AliInfo
-          //(Form("Running QA data maker for %s", fgkDetectorName[iDet]));
-
-                  if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
-                          qadm->Exec(AliQA::kRECPOINTS, clustersTree) ;
-         //AliCodeTimerStop
-          //(Form("Running QA data maker for %s", fgkDetectorName[iDet]));
-       }
+      AliQADataMaker * qadm = fQASteer->GetQADataMaker(iDet);
+      if (qadm) {
+       //AliCodeTimerStart
+       //(Form("Running QA data maker for %s", fgkDetectorName[iDet]));
+       //AliInfo
+       //(Form("Running QA data maker for %s", fgkDetectorName[iDet]));
+
+       if (fQATasks.Contains(Form("%d", AliQA::kRECPOINTS))) 
+         qadm->Exec(AliQA::kRECPOINTS, clustersTree) ;
+       //AliCodeTimerStop
+       //(Form("Running QA data maker for %s", fgkDetectorName[iDet]));
+      }
     }
 
     loader->WriteRecPoints("OVERWRITE");