Adding setting of default CDB storage (if not defined)
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Apr 2008 22:04:51 +0000 (22:04 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 20 Apr 2008 22:04:51 +0000 (22:04 +0000)
(Artur)

MUON/AliMUONDataInterface.cxx
MUON/AliMUONMCDataInterface.cxx

index 4f670bc..deee011 100644 (file)
@@ -93,6 +93,15 @@ fIterator(0x0)
   
   ++fgInstanceCounter;
   
+  if (AliCDBManager::Instance() != NULL)
+  {
+    if (AliCDBManager::Instance()->GetDefaultStorage() == NULL)
+    {
+      AliInfo("Default storage for CDB not set.");
+      AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+    }
+  }
+  
   Open(filename);
 
   // Load mapping
index 2a42ec8..062ae8f 100644 (file)
@@ -82,6 +82,15 @@ fIterator(0x0)
   
   ++fgInstanceCounter;
   
+  if (AliCDBManager::Instance() != NULL)
+  {
+    if (AliCDBManager::Instance()->GetDefaultStorage() == NULL)
+    {
+      AliInfo("Default storage for CDB not set.");
+      AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
+    }
+  }
+  
   Open(filename);
 
   // Load mapping