ClassImp(AliMUONCalibrationData)
/// \endcond
-AliMUONVStore* AliMUONCalibrationData::fBypassPedestals(0x0);
-AliMUONVStore* AliMUONCalibrationData::fBypassGains(0x0);
+AliMUONVStore* AliMUONCalibrationData::fgBypassPedestals(0x0);
+AliMUONVStore* AliMUONCalibrationData::fgBypassGains(0x0);
//_____________________________________________________________________________
AliMUONCalibrationData::AliMUONCalibrationData(Int_t runNumber,
//_____________________________________________________________________________
AliMUONCalibrationData::~AliMUONCalibrationData()
{
- /// Destructor. Note that we're the owner of our pointers.
- //PH The owner of the objects is CDB, do not delete them!
- // Reset();
+ /// Destructor. Note that we're the owner of our pointers if the OCDB cache
+ /// is not set. Otherwise the cache is supposed to take care of them...
+ if (!(AliCDBManager::Instance()->GetCacheFlag())) Reset();
}
//_____________________________________________________________________________
/// Access the CDB for a given path (e.g. MUON/Calib/Pedestals),
/// and return the corresponding TObject.
- AliCodeTimerAutoClass(Form("%d : %s",runNumber,path),);
+ AliCodeTimerAutoClass(Form("%d : %s",runNumber,path),0);
AliCDBManager* man = AliCDBManager::Instance();
if ( startOfValidity ) *startOfValidity = entry->GetId().GetFirstRun();
TObject* object = entry->GetObject();
- entry->SetOwner(kFALSE);
- if (!(man->GetCacheFlag())) delete entry;
+ if (!(man->GetCacheFlag()))
+ {
+ entry->SetOwner(kFALSE);
+ delete entry;
+ }
return object;
}
else
{
- AliCodeTimerAutoClass(Form("Failed to get %s for run %d",path,runNumber),0);
+ AliCodeTimerAutoClass(Form("Failed to get %s for run %d",path,runNumber),1);
}
AliMUONCalibrationData::Gains() const
{
/// Create (if needed) and return the internal store for gains.
- if (fBypassGains) return fBypassGains;
+ if (fgBypassGains) return fgBypassGains;
if (!fGains)
{
AliMUONCalibrationData::BypassStores(AliMUONVStore* ped, AliMUONVStore* gain)
{
/// Force the use of those pedestals and gains
- fBypassPedestals = ped;
- fBypassGains = gain;
+ fgBypassPedestals = ped;
+ fgBypassGains = gain;
}
{
/// Return pedestals
- if (fBypassPedestals) return fBypassPedestals;
+ if (fgBypassPedestals) return fgBypassPedestals;
if (!fPedestals)
{
{
/// Reset all data
+ AliCodeTimerAuto("",0);
+
delete fConfig;
fConfig = 0x0;
delete fPedestals;