]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugfix: CDBManager caching was overrun for objects on the GRID due to missing subversion
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Sep 2010 12:38:01 +0000 (12:38 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Sep 2010 12:38:01 +0000 (12:38 +0000)
bugfix: HLT/Calib/StreamerInfo could not be loaded because the run number was invalid in the request

HLT/rec/AliHLTMiscImplementation.cxx

index 7047fe495f40ec817c3a66e5aa711910b55fba5d..7bacab9f770d9bcdf5a0a6d07c398191fe48141f 100644 (file)
@@ -113,6 +113,7 @@ AliCDBEntry* AliHLTMiscImplementation::LoadOCDBEntry(const char* path, int runNo
   // see header file for function documentation
   AliCDBManager* man = AliCDBManager::Instance();
   if (!man) return NULL;
+  if (runNo<0) runNo=man->GetRun();
 
   const char* uri=man->GetURI(path);
   if (!uri) return NULL;
@@ -134,8 +135,8 @@ AliCDBEntry* AliHLTMiscImplementation::LoadOCDBEntry(const char* path, int runNo
     // 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 (id.GetVersion()==version &&
-       id.GetSubVersion()==subVersion) {
+    if ((version<0 || id.GetVersion()==version) &&
+       (subVersion<0 || id.GetSubVersion()==subVersion)) {
       // entry in the cache has the correct version
       return entry;
     }