]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/rec/AliHLTMiscImplementation.cxx
Fix for deleting array of AliMixInputHandlerInfo objects, causes crash at the end...
[u/mrichter/AliRoot.git] / HLT / rec / AliHLTMiscImplementation.cxx
index 11f1f985ffbe5ee510ffcab65d1d8cebe16e1832..b102f1e70083f525a67a9b61c59cf7c264f6c51a 100644 (file)
@@ -108,7 +108,7 @@ int AliHLTMiscImplementation::GetCDBRunNo() const
   return -1;
 }
 
-AliCDBEntry* AliHLTMiscImplementation::LoadOCDBEntry(const char* path, int runNo, int version, int subVersion) const
+AliCDBEntry* AliHLTMiscImplementation::LoadOCDBEntry(const char* path, int runNo) const
 {
   // see header file for function documentation
   if (!path) return NULL;
@@ -122,7 +122,7 @@ AliCDBEntry* AliHLTMiscImplementation::LoadOCDBEntry(const char* path, int runNo
   if (runNo<0) runNo=man->GetRun();
 
   // check the cache first if no specific version required
-  if (version<0) {
+  { //condition was deprecated, but keep for formatting
     const TMap* pCache=man->GetEntryCache();
     TObject* pEntryObj=NULL;
     if (pCache && (pEntryObj=pCache->GetValue(path))!=NULL) {
@@ -148,30 +148,14 @@ AliCDBEntry* AliHLTMiscImplementation::LoadOCDBEntry(const char* path, int runNo
     return NULL;
   }
 
-  TString strUri=store->GetURI();
-  bool bIsGrid=strUri.BeginsWith("alien://");
-
   int latest = store->GetLatestVersion(path, runNo);
   if (latest<0) {
-    log.Logging(kHLTLogError, "AliHLTMiscImplementation::LoadOCDBEntry", "CDB handling", "Could not find an entry in the CDB for \"%s\".", path);
+    log.Logging(kHLTLogError, "AliHLTMiscImplementation::LoadOCDBEntry", "CDB handling", "Could not find an entry for \"%s\" in storage \"%s\", run %d.", path, uri, runNo>=0?runNo:man->GetRun());
     return NULL;
   }
-  if (version<0) version=latest;
-
-  // OCDB objects on GRID have no sub version
-  if (subVersion<0 && !bIsGrid) subVersion = store->GetLatestSubVersion(path, runNo, version);
-  AliCDBEntry* entry=man->Get(path, runNo, version, subVersion);
-  if (entry) {
-    // there seems to be a problem with the caching of objects in the CDBManager
-    // regardless what version is specified it returns the object from the cache
-    AliCDBId id=entry->GetId();
-    if ((version<0 || id.GetVersion()==version) &&
-       (subVersion<0 || id.GetSubVersion()==subVersion)) {
-      // entry in the cache has the correct version
-      return entry;
-    }
-  }
-  return store->Get(path, runNo, version, subVersion);
+
+  AliCDBEntry* entry=man->Get(path, runNo);
+  return entry;
 }
 
 TObject* AliHLTMiscImplementation::ExtractObject(AliCDBEntry* entry) const