]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
specific storages bypass the snapshot
authorrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2012 11:08:27 +0000 (11:08 +0000)
committerrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2012 11:08:27 +0000 (11:08 +0000)
STEER/CDB/AliCDBManager.cxx
STEER/CDB/AliCDBManager.h

index 42723aed4eee7e537be25beae529edcb0c24f70e..d748021bb86007dd96f23dcdf5f1645b7b0537fc 100644 (file)
@@ -848,11 +848,14 @@ AliCDBEntry* AliCDBManager::Get(const AliCDBId& query) {
        }
 
        // if snapshot flag is set, try getting from the snapshot
-       if(fSnapshotMode && query.GetFirstRun() == fRun)
-           // entry = (AliCDBEntry*) fSnapshotCache->GetValue(query.GetPath()); // not possible,
-           // all the map would be charged in memory from the snapshot anyway.
-           entry = GetEntryFromSnapshot(query.GetPath());
-       if(entry) {
+       // but in the case a specific storage is specified for this path
+       AliCDBParam *aPar=SelectSpecificStorage(query.GetPath());
+       if(!aPar){
+           if(fSnapshotMode && query.GetFirstRun() == fRun)
+               // entry = (AliCDBEntry*) fSnapshotCache->GetValue(query.GetPath()); // not possible,
+               // all the map would be charged in memory from the snapshot anyway.
+               entry = GetEntryFromSnapshot(query.GetPath());
+           if(entry) {
                AliDebug(2, Form("Object %s retrieved from the snapshot !!",query.GetPath().Data()));
                if(query.GetFirstRun() == fRun) // no need to check fCache, fSnapshotMode not possible otherwise
                    CacheEntry(query.GetPath(), entry);
@@ -861,6 +864,7 @@ AliCDBEntry* AliCDBManager::Get(const AliCDBId& query) {
                    fIds->Add(entry->GetId().Clone());
 
                return entry;
+           }
        }
 
        // Entry is not in cache (and, in case we are in snapshot mode, not in the snapshot either)
@@ -869,9 +873,8 @@ AliCDBEntry* AliCDBManager::Get(const AliCDBId& query) {
                AliError("No storage set!");
                return NULL;
        }
-       AliCDBStorage *aStorage=0;
-       AliCDBParam *aPar=SelectSpecificStorage(query.GetPath());
 
+       AliCDBStorage *aStorage=0;
        if(aPar) {
                aStorage=GetStorage(aPar);
                TString str = aPar->GetURI();
index 2ceecd0efc31766846aba520ed9d13a3ca677eef..ce475b6b0f6f9762500b8c10a88c89700692813b 100644 (file)
@@ -182,8 +182,6 @@ protected:
        Bool_t fLock;   //! Lock flag, if ON default storage and run number cannot be reset
 
         Bool_t fSnapshotMode;           //! flag saying if we are in snapshot mode
-       //TMap* fSnapshotCache;         //! pointer to the cache of objects in the snapshot
-       //TList* fSnapshotIdsList;        //! pointer to the list of the object Id's in the snapshot
        TFile *fSnapshotFile;
 
        Bool_t fRaw;   // flag to say whether we are in the raw case