]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - OADB/AliOADBContainer.cxx
Eventplane information
[u/mrichter/AliRoot.git] / OADB / AliOADBContainer.cxx
index 25575d6d8763bdb1e3be4dfc7b32de57e8fbd2e4..30bf5b713ad8f4ae12065069dd8df51263d46a0d 100644 (file)
@@ -111,7 +111,7 @@ void AliOADBContainer::AppendObject(TObject* obj, Int_t lower, Int_t upper)
   Int_t index = HasOverlap(lower, upper);
   
   if (index != -1) {
-    AliFatal(Form("Ambiguos validity range (%5d) !\n", index));
+    AliFatal(Form("Ambiguos validity range (%5d, %5.5d-%5.5d) !\n", index,lower,upper));
     return;
   }
   //
@@ -165,10 +165,13 @@ void AliOADBContainer::UpdateObject(Int_t idx, TObject* obj, Int_t lower, Int_t
       return;
     }
   //
+  // Remove the old object
+  RemoveObject(idx);
+
   // Check that there is no overlap with existing run ranges  
   Int_t index = HasOverlap(lower, upper);
   if (index != -1) {
-    AliFatal(Form("Ambiguos validity range (%5d) !\n", index));
+    AliFatal(Form("Ambiguos validity range (%5d, %5.5d-%5.5d) !\n", index,lower,upper));
     return;
   }
   //
@@ -215,7 +218,7 @@ Int_t AliOADBContainer::GetIndexForRun(Int_t run) const
   return index;
 }
 
-TObject* AliOADBContainer::GetObject(Int_t run, char* def) const
+TObject* AliOADBContainer::GetObject(Int_t run, const char* def) const
 {
   // Return object for given run or default if not found
   TObject* obj = 0;
@@ -263,7 +266,10 @@ Int_t AliOADBContainer::InitFromFile(char* fname, char* key)
        AliError("Object not found in file \n");        
        return 1;
     }
-    
+
+    SetName(cont->GetName());
+    SetTitle(cont->GetTitle());
+
     fEntries = cont->GetNumberOfEntries();
     fLowerLimits.Set(fEntries);
     fUpperLimits.Set(fEntries);
@@ -272,7 +278,7 @@ Int_t AliOADBContainer::InitFromFile(char* fname, char* key)
        fUpperLimits[i] = cont->UpperLimit(i);
        fArray->AddAt(cont->GetObjectByIndex(i), i);
     }
-
+    if (!fDefaultList) fDefaultList = new TList(); 
     TIter next(cont->GetDefaultList());
     TObject* obj;
     while((obj = next())) fDefaultList->Add(obj);