From 56ce896d356b15aebb081b8b55c6e38fad0e50dc Mon Sep 17 00:00:00 2001 From: marian Date: Fri, 5 Feb 2010 16:47:17 +0000 Subject: [PATCH] Loading some of the OCDB entries only on request. By default only entries currently used in the reconstruction cached --- TPC/AliTPCcalibDB.cxx | 49 ++++++++++++++++++++++++++++----------- TPC/AliTPCcalibDB.h | 1 + TPC/AliTPCcalibDButil.cxx | 1 + 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/TPC/AliTPCcalibDB.cxx b/TPC/AliTPCcalibDB.cxx index 1c43278aa0f..071c85e13e0 100644 --- a/TPC/AliTPCcalibDB.cxx +++ b/TPC/AliTPCcalibDB.cxx @@ -393,18 +393,18 @@ void AliTPCcalibDB::Update(){ fCEData=(TObjArray*)(entry->GetObject()); } //RAW calibration data - entry = GetCDBEntry("TPC/Calib/Raw"); - if (entry){ - entry->SetOwner(kTRUE); - TObjArray *arr=(TObjArray*)(entry->GetObject()); - if (arr) fCalibRaw=(AliTPCCalibRaw*)arr->At(0); - } - //QA calibration data - entry = GetCDBEntry("TPC/Calib/QA"); - if (entry){ - entry->SetOwner(kTRUE); - fDataQA=dynamic_cast(entry->GetObject()); - } + // entry = GetCDBEntry("TPC/Calib/Raw"); +// if (entry){ +// entry->SetOwner(kTRUE); +// TObjArray *arr=(TObjArray*)(entry->GetObject()); +// if (arr) fCalibRaw=(AliTPCCalibRaw*)arr->At(0); +// } +// //QA calibration data +// entry = GetCDBEntry("TPC/Calib/QA"); +// if (entry){ +// entry->SetOwner(kTRUE); +// fDataQA=dynamic_cast(entry->GetObject()); +// } entry = GetCDBEntry("TPC/Calib/Mapping"); if (entry){ @@ -446,6 +446,28 @@ void AliTPCcalibDB::Update(){ AliCDBManager::Instance()->SetCacheFlag(cdbCache); // reset original CDB cache } +void AliTPCcalibDB::UpdateNonRec(){ + // + // Update/Load the parameters which are important for QA studies + // and not used yet for the reconstruction + // + //RAW calibration data + AliCDBEntry * entry=0; + entry = GetCDBEntry("TPC/Calib/Raw"); + if (entry){ + entry->SetOwner(kTRUE); + TObjArray *arr=(TObjArray*)(entry->GetObject()); + if (arr) fCalibRaw=(AliTPCCalibRaw*)arr->At(0); + } + //QA calibration data + entry = GetCDBEntry("TPC/Calib/QA"); + if (entry){ + entry->SetOwner(kTRUE); + fDataQA=dynamic_cast(entry->GetObject()); + } + +} + void AliTPCcalibDB::CreateObjectList(const Char_t *filename, TObjArray *calibObjects) @@ -1584,7 +1606,8 @@ Bool_t AliTPCcalibDB::CreateGUITree(const char* filename){ AliError("Default Storage not set. Cannot create calibration Tree!"); return kFALSE; } - + UpdateNonRec(); // load all infromation now + AliTPCPreprocessorOnline prep; //noise and pedestals if (GetPedestals()) prep.AddComponent(new AliTPCCalPad(*(GetPedestals()))); diff --git a/TPC/AliTPCcalibDB.h b/TPC/AliTPCcalibDB.h index 89694444084..6dc5be8ebe3 100644 --- a/TPC/AliTPCcalibDB.h +++ b/TPC/AliTPCcalibDB.h @@ -49,6 +49,7 @@ class AliTPCcalibDB : public TObject void SetRun(Long64_t run); void Update(); //update entries void UpdateRunInformations(Int_t run, Bool_t force=kFALSE); + void UpdateNonRec(); // Long64_t GetRun() const {return fRun;} // diff --git a/TPC/AliTPCcalibDButil.cxx b/TPC/AliTPCcalibDButil.cxx index 02037dd3897..41ec6f0a120 100644 --- a/TPC/AliTPCcalibDButil.cxx +++ b/TPC/AliTPCcalibDButil.cxx @@ -146,6 +146,7 @@ void AliTPCcalibDButil::UpdateFromCalibDB() // Update pointers from calibDB // if (!fCalibDB) fCalibDB=AliTPCcalibDB::Instance(); + fCalibDB->UpdateNonRec(); // load all infromation now fPadNoise=fCalibDB->GetPadNoise(); fPedestals=fCalibDB->GetPedestals(); fPulserTmean=fCalibDB->GetPulserTmean(); -- 2.39.3