ClassImp(AliMUONCalibrationData)
/// \endcond
+AliMUONVStore* AliMUONCalibrationData::fBypassPedestals(0x0);
+AliMUONVStore* AliMUONCalibrationData::fBypassGains(0x0);
+
//_____________________________________________________________________________
AliMUONCalibrationData::AliMUONCalibrationData(Int_t runNumber,
Bool_t deferredInitialization)
fCapacitances(0x0),
fNeighbours(0x0),
fOccupancyMap(0x0),
-fRejectList(0x0)
+fRejectList(0x0),
+fConfig(0x0)
{
/// Default ctor.
TriggerEfficiency();
Capacitances();
Neighbours();
+ Config();
}
}
/// 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();
{
- AliCodeTimerAutoClass(Form("Failed to get %s for run %d",path,runNumber));
+ AliCodeTimerAutoClass(Form("Failed to get %s for run %d",path,runNumber),1);
}
return dynamic_cast<AliMUONVStore*>(CreateObject(runNumber,"MUON/Calib/Pedestals",startOfValidity));
}
+//_____________________________________________________________________________
+AliMUONVStore*
+AliMUONCalibrationData::CreateConfig(Int_t runNumber, Int_t* startOfValidity)
+{
+ /// Create a new config store from the OCDB for a given run
+ return dynamic_cast<AliMUONVStore*>(CreateObject(runNumber,"MUON/Calib/Config",startOfValidity));
+}
+
//_____________________________________________________________________________
AliMUONRegionalTriggerConfig*
AliMUONCalibrationData::Gains() const
{
/// Create (if needed) and return the internal store for gains.
+ if (fBypassGains) return fBypassGains;
+
if (!fGains)
{
fGains = CreateGains(fRunNumber);
return fRejectList;
}
+//_____________________________________________________________________________
+void
+AliMUONCalibrationData::BypassStores(AliMUONVStore* ped, AliMUONVStore* gain)
+{
+ /// Force the use of those pedestals and gains
+ fBypassPedestals = ped;
+ fBypassGains = gain;
+
+}
+
//_____________________________________________________________________________
AliMUONVStore*
AliMUONCalibrationData::Pedestals() const
{
/// Return pedestals
+
+ if (fBypassPedestals) return fBypassPedestals;
+
if (!fPedestals)
{
fPedestals = CreatePedestals(fRunNumber);
return fPedestals;
}
+//_____________________________________________________________________________
+AliMUONVStore*
+AliMUONCalibrationData::Config() const
+{
+ /// Return config
+
+ if (!fConfig)
+ {
+ fConfig = CreateConfig(fRunNumber);
+ }
+ return fConfig;
+}
+
//_____________________________________________________________________________
AliMUONVCalibParam*
AliMUONCalibrationData::Pedestals(Int_t detElemId, Int_t manuId) const
cout << "RunNumber " << RunNumber()
<< " fGains=" << fGains
<< " fPedestals=" << fPedestals
+ << " fConfig=" << fConfig
<< " fHV=" << fHV
<< " fTriggerDCS=" << fTriggerDCS
<< " fLocalTriggerBoardMasks=" << fLocalTriggerBoardMasks
{
/// Reset all data
+ delete fConfig;
+ fConfig = 0x0;
delete fPedestals;
fPedestals = 0x0;
delete fGains;
{
AliInfoClass("Pedestals read OK");
}
+
+ if ( ! CreateConfig(runNumber) )
+ {
+ AliErrorClass("Could not read config");
+ }
+ else
+ {
+ AliInfoClass("Config read OK");
+ }
if ( ! CreateRegionalTriggerConfig(runNumber) )
{