+ // Load geometry from CDB updating it if we are producing the
+ // alignment objects for the CDB
+ AliCDBManager* cdb = AliCDBManager::Instance();
+ if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+ cdb->SetRun(0);
+
+ if(strStorage.IsNull()){ //if we produce the objects into a file
+ AliGeomManager::LoadGeometry(); //load geom from default CDB storage
+ }else{ // if we produce the objects in a CDB storage
+ // update geometry in it
+ Info(macroname,"Updating geometry in CDB storage %s",strStorage.Data());
+ gROOT->ProcessLine(".L $ALICE_ROOT/GRP/UpdateCDBIdealGeom.C");
+ if(partialGeom){
+ UpdateCDBIdealGeom(strStorage.Data(),"$ALICE_ROOT/macros/Config_PDC06.C");
+ }else{
+ UpdateCDBIdealGeom(strStorage.Data(),"$ALICE_ROOT/macros/Config.C");
+ }
+ // load the same geometry from given CDB storage
+ AliCDBPath path("GRP","Geometry","Data");
+ AliCDBStorage* storage = cdb->GetStorage(strStorage.Data());
+ AliCDBEntry *entry = storage->Get(path.GetPath(),cdb->GetRun());
+ if(!entry) Fatal(macroname,"Couldn't load geometry data from CDB!");
+ entry->SetOwner(0);
+ TGeoManager* geom = (TGeoManager*) entry->GetObject();
+ if (!geom) Fatal(macroname,"Couldn't find TGeoManager in the specified CDB entry!");
+ AliGeomManager::SetGeometry(geom);
+ }
+
+ // run macro for non-sensitive modules
+ // (presently generates only FRAME alignment objects)
+ gSystem->Exec("aliroot -b -q $ALICE_ROOT/GRP/MakeSTRUCTZeroMisAlignment.C");