ClassImp(AliEMCALLoader)
const TString AliEMCALLoader::fgkECARecPointsBranchName("EMCALECARP");//Name for branch with ECA Reconstructed Points
-AliEMCALCalibData* AliEMCALLoader::fgCalibData = 0; //calibation data
+AliEMCALCalibData* AliEMCALLoader::fgCalibData = 0; //calibation data
+AliCaloCalibPedestal* AliEMCALLoader::fgCaloPed = 0; //dead map data
//____________________________________________________________________________
AliEMCALLoader::AliEMCALLoader()
AliEMCALLoader::AliEMCALLoader(const Char_t *detname,const Char_t *eventfoldername)
: AliLoader(detname,eventfoldername),
fDebug(0),
- fHits(0),
- fDigits(0),
- fSDigits(0),
- fRecPoints(0)
+ fHits(new TClonesArray("AliEMCALHit")),
+ fDigits(new TClonesArray("AliEMCALDigit")),
+ fSDigits(new TClonesArray("AliEMCALDigit")),
+ fRecPoints(new TObjArray())
{
//Specific constructor for EMCAL Loader class
-
- fDebug=0;
- fHits = new TClonesArray("AliEMCALHit");
- fDigits = new TClonesArray("AliEMCALDigit");
- fSDigits = new TClonesArray("AliEMCALDigit");
- fRecPoints = new TObjArray();
}
//____________________________________________________________________________
AliEMCALLoader::AliEMCALLoader(const Char_t *name, TFolder *topfolder)
: AliLoader(name,topfolder),
fDebug(0),
- fHits(0),
- fDigits(0),
- fSDigits(0),
- fRecPoints(0)
+ fHits(new TClonesArray("AliEMCALHit")),
+ fDigits(new TClonesArray("AliEMCALDigit")),
+ fSDigits(new TClonesArray("AliEMCALDigit")),
+ fRecPoints(new TObjArray())
{
//Specific constructor for EMCAL Loader class
-
- fDebug=0;
- fHits = new TClonesArray("AliEMCALHit");
- fDigits = new TClonesArray("AliEMCALDigit");
- fSDigits = new TClonesArray("AliEMCALDigit");
- fRecPoints = new TObjArray();
-}
-
-//____________________________________________________________________________
-AliEMCALLoader::AliEMCALLoader(const AliEMCALLoader & obj)
- : AliLoader(obj),
- fDebug(obj.fDebug),
- fHits(obj.fHits),
- fDigits(obj.fDigits),
- fSDigits(obj.fSDigits),
- fRecPoints(obj.fRecPoints)
-{
- //copy ctor
}
//____________________________________________________________________________
}
+//____________________________________________________________________________
+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;
+
+}
+
//____________________________________________________________________________
Int_t AliEMCALLoader::CalibrateRaw(Double_t energy, Int_t module,