+//__________________________________________________________________
+Bool_t
+AliFMDAlignFaker::GetGeometry(Bool_t toCdb, const TString& storage)
+{
+ if (!toCdb) {
+ //load geom from default CDB storage
+ AliGeomManager::LoadGeometry();
+ return kTRUE;
+ }
+ if(!storage.BeginsWith("local://") &&
+ !storage.BeginsWith("alien://")) {
+ AliErrorClass(Form("STORAGE=\"%s\" invalid. Exiting\n", storage.Data()));
+ return kFALSE;
+ }
+
+ AliCDBManager* cdb = AliCDBManager::Instance();
+ AliCDBStorage* store = cdb->GetStorage(storage.Data());
+ if(!store){
+ AliErrorClass(Form("Unable to open storage %s\n", storage.Data()));
+ return kFALSE;
+ }
+
+ AliCDBPath path("GRP","Geometry","Data");
+ AliCDBEntry* entry = store->Get(path.GetPath(),cdb->GetRun());
+ if(!entry) {
+ AliErrorClass("Could not get the specified CDB entry!");
+ return kFALSE;
+ }
+
+
+ entry->SetOwner(0);
+ TGeoManager* geom = static_cast<TGeoManager*>(entry->GetObject());
+ AliGeomManager::SetGeometry(geom);
+ return kTRUE;
+}
+