]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - GRP/UpdateCDBIdealGeom.C
correcting the scope of the storage
[u/mrichter/AliRoot.git] / GRP / UpdateCDBIdealGeom.C
index d31bae3a28c4954dcae52854036f9c7140a86cc0..f58c659540ee7c146e7d2a01cfcaa240ca32530a 100644 (file)
@@ -21,8 +21,14 @@ void UpdateCDBIdealGeom(const char* cdbUri, const char* cfgFile){
   AliCDBManager* cdb = AliCDBManager::Instance();
   // we set the default storage to the repository because some dets require
   // already at the time of geometry creation to find calibration objects in the cdb
+  AliCDBStorage* storage = 0;
   if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
-  AliCDBStorage* storage = cdb->GetStorage(cdbUri);
+  storage = cdb->GetStorage(cdbUri);
+  if(!storage) 
+  {
+    Printf("unable to create valid storage from: %s", cdbUri);
+    return;
+  }
   cdb->SetRun(0);
   AliCDBId id("GRP/Geometry/Data",0,AliCDBRunRange::Infinity());
   AliCDBMetaData *md= new AliCDBMetaData();