]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALLoader.cxx
adding first sketch of a DCS publisher component for global HLT data points
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALLoader.cxx
index 2373496c9213786f6f159f97a1f61555f832fc31..672a78889891d9aca0fc808afe30bf23ed4e175c 100644 (file)
 
 ClassImp(AliEMCALLoader)
   
-const TString AliEMCALLoader::fgkECARecPointsBranchName("EMCALECARP");//Name for branch with ECA Reconstructed Points
-AliEMCALCalibData* AliEMCALLoader::fgCalibData = 0; //calibation data
+const TString         AliEMCALLoader::fgkECARecPointsBranchName("EMCALECARP");//Name for branch with ECA Reconstructed Points
+AliEMCALCalibData*    AliEMCALLoader::fgCalibData = 0; //calibration data
+AliCaloCalibPedestal* AliEMCALLoader::fgCaloPed   = 0; //dead map data
+AliEMCALSimParam*     AliEMCALLoader::fgSimParam  = 0; //simulation parameters
 
 //____________________________________________________________________________ 
 AliEMCALLoader::AliEMCALLoader()
@@ -141,6 +143,46 @@ AliEMCALCalibData* AliEMCALLoader::CalibData()
   
 }
 
+//____________________________________________________________________________ 
+AliCaloCalibPedestal* AliEMCALLoader::PedestalData()
+{ 
+       // Check if the instance of AliCaloCalibPedestal exists, if not, create it if 
+       // the OCDB is available, and finally return it.
+       
+       if(!fgCaloPed && (AliCDBManager::Instance()->IsDefaultStorageSet()))
+    {
+               AliCDBEntry *entry = (AliCDBEntry*) 
+               AliCDBManager::Instance()->Get("EMCAL/Calib/Pedestals");
+               if (entry) fgCaloPed =  (AliCaloCalibPedestal*) entry->GetObject();
+    }
+       
+       if(!fgCaloPed)
+               AliFatal("Pedestal info not found in CDB!");
+       
+       return fgCaloPed;
+       
+}
+
+//____________________________________________________________________________ 
+AliEMCALSimParam* AliEMCALLoader::SimulationParameters()
+{ 
+       // Check if the instance of AliEMCALSimParam exists, if not, create it if 
+       // the OCDB is available, and finally return it.
+       
+       if(!fgSimParam && (AliCDBManager::Instance()->IsDefaultStorageSet()))
+    {
+               AliCDBEntry *entry = (AliCDBEntry*) 
+               AliCDBManager::Instance()->Get("EMCAL/Calib/SimParam");
+               if (entry) fgSimParam =  (AliEMCALSimParam*) entry->GetObject();
+       
+    }
+       
+       if(!fgSimParam)
+               AliFatal("Simulations parameters not found in CDB!");
+
+       return fgSimParam;
+       
+}
 
 //____________________________________________________________________________ 
 Int_t AliEMCALLoader::CalibrateRaw(Double_t energy, Int_t module,