]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Added protection if the OCDB is allready initialized
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Mar 2011 16:34:44 +0000 (16:34 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 Mar 2011 16:34:44 +0000 (16:34 +0000)
EMCAL/AliCaloRawAnalyzerPeakFinder.cxx

index f4e63d6694a51bee8bd9d14e69d6a77c8386e486..43934f12e41f77a3d0bc81e1f785785fe3f533cc 100644 (file)
@@ -63,8 +63,14 @@ void
 AliCaloRawAnalyzerPeakFinder::InitOCDB(bool alien) const
 {
   // Setting the default OCDB pathe depending on wether we work locally or on the GRID.
-  AliCDBManager::Instance()->SetDefaultStorage(  alien == true ? "alien://$ALICE_ROOT/OCDB" : "local://$ALICE_ROOT/OCDB");
-  AliCDBManager::Instance()->SetRun(100);
+  
+
+  //  if( AliCDBManager::Instance()->HasStorage("alien://$ALICE_ROOT/OCDB")  == false  &&  AliCDBManager::Instance()->HasStorage("local://$ALICE_ROOT/OCDB") == false )
+  if( !AliCDBManager::Instance()->IsDefaultStorageSet ())
+    {
+      AliCDBManager::Instance()->SetDefaultStorage(  alien == true ? "alien://$ALICE_ROOT/OCDB" : "local://$ALICE_ROOT/OCDB" );
+      AliCDBManager::Instance()->SetRun(100);
+    }
 }