]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliCDBManager.cxx
Updated values of sigmas for truncated mean approach (L. Milano). Updated responses...
[u/mrichter/AliRoot.git] / STEER / AliCDBManager.cxx
index 70695d781fb10ded918c193dc57d1d4797da9bbd..06b412fea9391e8260f4cf9348fcb1092f8c488b 100644 (file)
@@ -505,6 +505,9 @@ void AliCDBManager::UnsetDefaultStorage() {
                AliWarning("Clearing cache!");
                ClearCache();
        }
+
+       fRun = fStartRunLHCPeriod = fEndRunLHCPeriod = -1;
+       fRaw = kFALSE;
        
        fDefaultStorage = 0x0;
 }
@@ -529,7 +532,7 @@ void AliCDBManager::SetSpecificStorage(const char* calibType, AliCDBParam* param
 // calibType must be a valid CDB path! (3 level folder structure)
 
 
-       if(!fDefaultStorage) {
+       if(!fDefaultStorage && !fRaw) {
                AliError("Please activate a default storage first!");
                return;
        }
@@ -644,10 +647,10 @@ AliCDBEntry* AliCDBManager::Get(const AliCDBId& query) {
                 return NULL;
        }
 
-       if(fLock && query.GetFirstRun() != fRun)
+       if(fLock && !(fRun >= query.GetFirstRun() && fRun <= query.GetLastRun())) 
                AliFatal("Lock is ON: cannot use different run number than the internal one!");
        
-       if(fCache && query.GetFirstRun() != fRun)
+       if(fCache && !(fRun >= query.GetFirstRun() && fRun <= query.GetLastRun())) 
                AliWarning("Run number explicitly set in query: CDB cache temporarily disabled!");
 
        AliCDBEntry *entry=0;
@@ -951,13 +954,13 @@ Bool_t AliCDBManager::Put(AliCDBEntry* entry, DataType type){
                return kFALSE;
        }
 
-       if (entry->GetObject()==0x0){
-               AliError("No valid object in CDB entry!");
+       if (!entry){
+               AliError("No entry!");
                return kFALSE;
        }
 
-       if (!entry){
-               AliError("No entry!");
+       if (entry->GetObject()==0x0){
+               AliError("No valid object in CDB entry!");
                return kFALSE;
        }