#include <TFile.h>
#include <TTree.h>
#include <TNtupleD.h>
+#include <TObjArray.h>
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliCDBPath.h"
+#include "AliCDBEntry.h"
+#include "AliDetectorRecoParam.h"
+#include "AliCDBManager.h"
+
#include "AliLog.h"
#include "AliQADataMakerRec.h"
#include "AliESDEvent.h"
TObjArray ** AliQADataMakerRec::Init(AliQA::TASKINDEX_t task, Int_t cycles)
{
// general intialisation
-
+ InitRecoParams() ;
TObjArray ** rv = NULL ;
if (cycles > 0)
{
// Intialisation by passing the list of QA data booked elsewhere
- fRun = run ;
+ InitRecoParams() ;
+ fRun = run ;
if (cycles > 0)
SetCycle(cycles) ;
}
}
+//____________________________________________________________________________
+void AliQADataMakerRec::InitRecoParams()
+{
+ if (!fRecoParam) {
+ AliInfo(Form("Loading reconstruction parameter objects for detector %s", GetName()));
+ AliCDBPath path(GetName(),"Calib","RecoParam");
+ AliCDBEntry *entry=AliCDBManager::Instance()->Get(path.GetPath());
+ if(!entry) {
+ fRecoParam = NULL ;
+ AliWarning(Form("Couldn't find RecoParam entry in OCDB for detector %s",GetName()));
+ }
+ else {
+ TObject * recoParamObj = entry->GetObject() ;
+ if (dynamic_cast<AliDetectorRecoParam*>(recoParamObj)) {
+ // The detector has only onse set of reco parameters
+ // Registering it in AliRecoParam
+ AliInfo(Form("Single set of reconstruction parameters found for detector %s",GetName()));
+ dynamic_cast<AliDetectorRecoParam*>(recoParamObj)->SetAsDefault();
+ fRecoParam = dynamic_cast<AliDetectorRecoParam*>(recoParamObj) ;
+ } else {
+ AliError(Form("No valid RecoParam object found in the OCDB for detector %s",GetName()));
+ }
+ }
+ }
+}
+
//____________________________________________________________________________
void AliQADataMakerRec::StartOfCycle(Int_t run)
{
// --- Standard library ---
// --- AliRoot header files ---
+class AliDetectorRecoParam ;
#include "AliQADataMaker.h"
#include "AliQA.h"
virtual void InitDigits() {AliWarning("Call not valid") ; }
virtual void InitESDs() {AliInfo("To be implemented by detectors");}
+ virtual void InitRecoParams() ;
virtual void InitHits() {AliWarning("Call not valid") ; }
//virtual void InitRecParticles() {AliInfo("To be implemented by detectors");}
virtual void InitRecPoints() {AliInfo("To be implemented by detectors");}