1) When unloading an object from the cache, prompt just a warning and not an error if the object is not in the cache. In particular in reconstruction, first check for some objects if they are in the cache before asking to unload them.
2) Prompt an error instead of a debug message just before throwing an exception in AliCDBLocal::GetEntry, in the case of missing entry. The cause of the abort will like this be clear also in systems which are not able to prompt the error message of the runtime error.
TString errMessage(TString::Format("No valid CDB object found! request was: %s", queryId.ToString().Data()));
if (!dataId || !dataId->IsSpecified()){
+ AliError(Form("The data ID is undefined!"));
throw std::runtime_error(errMessage.Data());
return NULL;
}
TString filename;
if (!IdToFilename(*dataId, filename)) {
-
- AliDebug(2,Form("Bad data ID encountered! Subnormal error!"));
+ AliError(Form("Bad data ID encountered!"));
delete dataId;
throw std::runtime_error(errMessage.Data());
return NULL;
TFile file(filename, "READ"); // open file
if (!file.IsOpen()) {
- AliDebug(2,Form("Can't open file <%s>!", filename.Data()));
+ AliError(Form("Can't open file <%s>!", filename.Data()));
delete dataId;
throw std::runtime_error(errMessage.Data());
return NULL;
AliCDBEntry* anEntry = dynamic_cast<AliCDBEntry*> (file.Get("AliCDBEntry"));
if (!anEntry) {
- AliDebug(2,Form("Bad storage data: No AliCDBEntry in file!"));
+ AliError(Form("Bad storage data: No AliCDBEntry in file!"));
file.Close();
delete dataId;
throw std::runtime_error(errMessage.Data());
delete fIds->Remove(id);
}*/
} else {
- AliError(Form("Cache does not contain object \"%s\"!", path));
+ AliWarning(Form("Cache does not contain object \"%s\"!", path));
}
AliDebug(2, Form("Cache entries: %d",fEntryCache.GetEntries()));
return;
Abort("MisalignGeometry", TSelector::kAbortProcess);
return;
}
- AliCDBManager::Instance()->UnloadFromCache("GRP/Geometry/Data");
+
+ const TMap* cdbCache = AliCDBManager::Instance()->GetEntryCache();
+ if(cdbCache->Contains("GRP/Geometry/Data"))
+ AliCDBManager::Instance()->UnloadFromCache("GRP/Geometry/Data");
if(!toCDBSnapshot) AliCDBManager::Instance()->UnloadFromCache("*/Align/*");
AliSysInfo::AddStamp("MisalignGeom");
return;
}
AliSysInfo::AddStamp("InitGRP");
- if(!toCDBSnapshot) AliCDBManager::Instance()->UnloadFromCache("GRP/Calib/CosmicTriggers");
+ if(!toCDBSnapshot)
+ if(cdbCache->Contains("GRP/Calib/CosmicTriggers"))
+ AliCDBManager::Instance()->UnloadFromCache("GRP/Calib/CosmicTriggers");
if(!fCDBSnapshotMode || toCDBSnapshot){
if (!LoadCDB()) {
{
AliCDBManager::Instance()->DumpToSnapshotFile(snapshotFileOut.Data(),kFALSE);
AliCDBManager::Instance()->UnloadFromCache("*/Align/*");
- AliCDBManager::Instance()->UnloadFromCache("GRP/Calib/CosmicTriggers");
+ if(cdbCache->Contains("GRP/Calib/CosmicTriggers"))
+ AliCDBManager::Instance()->UnloadFromCache("GRP/Calib/CosmicTriggers");
}
if (fInput && gProof) {