]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugfix: instead of unloading from the cache, retrieve the latest version and subversi...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Aug 2009 14:51:02 +0000 (14:51 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 Aug 2009 14:51:02 +0000 (14:51 +0000)
HLT/rec/AliHLTMiscImplementation.cxx

index e61687d176849dbc4e7c1c5f2de6e13531022022..2c7ff71f7dd818fb1aac8d0aa0a7960b7c6ff9aa 100644 (file)
@@ -24,6 +24,7 @@
 #include "AliHLTMiscImplementation.h"
 #include "AliHLTLogging.h"
 #include "AliCDBManager.h"
+#include "AliCDBStorage.h"
 #include "AliCDBEntry.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
@@ -77,7 +78,12 @@ int AliHLTMiscImplementation::SetCDBRunNo(int runNo)
 AliCDBEntry* AliHLTMiscImplementation::LoadOCDBEntry(const char* path, int runNo, int version, int subVersion)
 {
   // see header file for function documentation
-  AliCDBManager::Instance()->UnloadFromCache(path);
+  AliCDBStorage* store = AliCDBManager::Instance()->GetDefaultStorage();
+  if (!store) {
+    return NULL;
+  }
+  if (version<0) version = store->GetLatestVersion(path, runNo);
+  if (subVersion<0) subVersion = store->GetLatestSubVersion(path, runNo, version);
   return AliCDBManager::Instance()->Get(path, runNo, version, subVersion);
 }