]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing naming so that it looks in the right directory of OCDB to find the RecoParam
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Feb 2010 10:53:32 +0000 (10:53 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Feb 2010 10:53:32 +0000 (10:53 +0000)
STEER/AliCorrQADataMakerRec.cxx
STEER/AliCorrQADataMakerRec.h
STEER/AliGlobalQADataMaker.cxx
STEER/AliGlobalQADataMaker.h
STEER/AliQADataMakerRec.cxx

index 0f489b58c830161a9cc957bd2eb4b64f4720f5ee..0e92ad680949b8961ddb5adf8d98fb397c66b270 100644 (file)
@@ -116,13 +116,6 @@ void AliCorrQADataMakerRec::InitESDs()
   AliInfo("TO BE IMPLEMENTED") ; 
 }
 
-//____________________________________________________________________________ 
-void AliCorrQADataMakerRec::InitRecPoints()
-{
-  // create Reconstructed Points histograms in RecPoints subdir
-
-  AliInfo("TO BE IMPLEMENTED") ; 
-}
 
 //____________________________________________________________________________ 
 void AliCorrQADataMakerRec::InitRaws()
@@ -168,6 +161,22 @@ void AliCorrQADataMakerRec::InitRaws()
   }  
 }
 
+//____________________________________________________________________________ 
+void AliCorrQADataMakerRec::InitRecPoints()
+{
+    // create Reconstructed Points histograms in RecPoints subdir
+  
+  AliInfo("TO BE IMPLEMENTED") ; 
+}
+
+//____________________________________________________________________________ 
+void AliCorrQADataMakerRec::InitRecoParams()
+{
+    // Get the recoparam form the OCDB for every detector involved in CORR
+  
+  AliInfo("TO BE IMPLEMENTED") ; 
+}
+
 //____________________________________________________________________________
 void AliCorrQADataMakerRec::MakeESDs(AliESDEvent * /*esd*/)
 {
index 61ebc09bc8fe1ab98b5ef891c0adaa5c9cfa45b3..8fa06e7a7170fc0456ef75365ee4ef68a071dfc1 100644 (file)
@@ -35,8 +35,9 @@ private:
 
   virtual void   EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ;
   virtual void   InitESDs() ; 
-  virtual void   InitRecPoints() ; 
   virtual void   InitRaws() ; 
+  virtual void   InitRecPoints() ; 
+  virtual void   InitRecoParams() ; 
   virtual void   MakeESDs(AliESDEvent * esd) ;
   virtual void   MakeRecPoints(TTree * recpoTree) ; 
   virtual void   MakeRaws(AliRawReader *) ; 
index 378c9146f81dff5e24572264e42115c50dfa153f..64c5dc1cb654ebc54f36843c45c70c51fea7073f 100644 (file)
@@ -9,6 +9,10 @@
 #include <TH1F.h>
 #include <TH2F.h>
 
+#include "AliCDBPath.h"
+#include "AliCDBEntry.h"
+#include "AliCDBManager.h"
+#include "AliDetectorRecoParam.h"
 #include "AliQAChecker.h"
 #include "AliGlobalQADataMaker.h"
 #include "AliGeomManager.h"
@@ -34,6 +38,46 @@ void AliGlobalQADataMaker::InitRaws()
   // create Raws histograms in Raws subdir
 }
 
+//____________________________________________________________________________
+void AliGlobalQADataMaker::InitRecoParams() 
+{
+  // Get the recoparam form the OCDB 
+  if (!fRecoParam) {
+    TString name("GRP") ; 
+    AliDebug(AliQAv1::GetQADebugLevel(), Form("Loading reconstruction parameter objects for detector %s", name.Data()));
+    AliCDBPath path(name.Data(),"Calib","RecoParam");
+    AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());
+    if(!entry) {
+      fRecoParam = NULL ; 
+      AliDebug(AliQAv1::GetQADebugLevel(), Form("Couldn't find RecoParam entry in OCDB for detector %s",name.Data()));
+    }
+    else {
+      TObject * recoParamObj = entry->GetObject() ; 
+      if ( strcmp(recoParamObj->ClassName(), "TObjArray") == 0 ) {
+          // The detector has only one set of reco parameters
+        AliDebug(AliQAv1::GetQADebugLevel(), Form("Array of reconstruction parameters found for detector %s",name.Data()));
+        TObjArray *recoParamArray = static_cast<TObjArray*>(recoParamObj) ;
+        for (Int_t iRP=0; iRP<recoParamArray->GetEntriesFast(); iRP++) {
+          fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamArray->At(iRP)) ;
+          if (!fRecoParam) 
+            break ; 
+          else if (fRecoParam->IsDefault()) 
+            break ; 
+        }
+      }
+      else if (recoParamObj->InheritsFrom("AliDetectorRecoParam")) {
+          // The detector has only one set of reco parameters
+          // Registering it in AliRecoParam
+        AliDebug(AliQAv1::GetQADebugLevel(), Form("Single set of reconstruction parameters found for detector %s",name.Data()));
+        fRecoParam = static_cast<AliDetectorRecoParam*>(recoParamObj) ;
+        static_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
+      } else { 
+        AliError(Form("No valid RecoParam object found in the OCDB for detector %s",name.Data()));
+      }
+    }
+  }
+}
+
 //____________________________________________________________________________ 
 void AliGlobalQADataMaker::InitRecPoints() {
   //------------------------------------------------------
index b28158b75ff96c03233eeb2012dec4390c4f2291..fd69b1063b95f65ffcfa1d72bbaeaf45c1ba2de0 100644 (file)
@@ -37,6 +37,8 @@ private:
 
        void InitRaws(); 
   
+  void InitRecoParams() ; 
+  
        void MakeRaws(AliRawReader* rawReader) ; 
   void MakeESDs(AliESDEvent *event);
 
index f400185483a3a4c248e6ddc55c3f94e0be11c4df..04d9423e14f8e7efd4862424e9f1363ab3dfd5f3 100644 (file)
@@ -327,6 +327,7 @@ void AliQADataMakerRec::Init(AliQAv1::TASKINDEX_t task, TObjArray ** list, Int_t
 //____________________________________________________________________________
 void AliQADataMakerRec::InitRecoParams() 
 {
+  // Get the recoparam form the OCDB 
   if (!fRecoParam) {
     AliDebug(AliQAv1::GetQADebugLevel(), Form("Loading reconstruction parameter objects for detector %s", GetName()));
     AliCDBPath path(GetName(),"Calib","RecoParam");