X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=VZERO%2FMakeVZEROFullMisAlignment.C;h=9d839415536292f991b6b07b2df20dcdc784a22d;hp=6e3003541fa90105a2917674140448b566aaace9;hb=32d432960540cc2372ebcf8fc674bd398e1cd26c;hpb=6fce62af1975e067a08b96e421e6fec691ab4712 diff --git a/VZERO/MakeVZEROFullMisAlignment.C b/VZERO/MakeVZEROFullMisAlignment.C index 6e3003541fa..9d839415536 100644 --- a/VZERO/MakeVZEROFullMisAlignment.C +++ b/VZERO/MakeVZEROFullMisAlignment.C @@ -8,12 +8,12 @@ void MakeVZEROFullMisAlignment(){ // Activate CDB storage and load geometry from CDB AliCDBManager* cdb = AliCDBManager::Instance(); - if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT"); + if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); cdb->SetRun(0); AliCDBStorage* storage; - if( gSystem->Getenv("TOCDB") == TString("kTRUE") ){ + if( TString(gSystem->Getenv("TOCDB")) == TString("kTRUE") ){ TString Storage = gSystem->Getenv("STORAGE"); if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) { Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data()); @@ -53,7 +53,10 @@ void MakeVZEROFullMisAlignment(){ dtheta = rnd->Gaus(0.,sigmarot); dphi = rnd->Gaus(0.,sigmarot); new(alobj[0]) AliAlignObjParams(V0right, volid, dx, dy, dz, dpsi, dtheta, - dphi, kFALSE); + dphi, kFALSE); + AliAlignObjParams* itsalobj = (AliAlignObjParams*) alobj.UncheckedAt(0); + itsalobj->ApplyToGeometry(); + dx = rnd->Gaus(0.,sigmatr); dy = rnd->Gaus(0.,sigmatr); dz = rnd->Gaus(0.,sigmatr); @@ -62,29 +65,32 @@ void MakeVZEROFullMisAlignment(){ dphi = rnd->Gaus(0.,sigmarot); new(alobj[1]) AliAlignObjParams(V0left, volid, dx, dy, dz, dpsi, dtheta, dphi,kFALSE); + AliAlignObjParams* itsalobj = (AliAlignObjParams*) alobj.UncheckedAt(1); + itsalobj->ApplyToGeometry(); - if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){ - // save on file - const char* filename = "VZEROfullMisalignment.root"; - TFile f(filename,"RECREATE"); - if(!f){ - Error(macroname,"cannot open file for output\n"); - return; - } - Info(macroname,"Saving alignment objects to the file %s", filename); - f.cd(); - f.WriteObject(array,"VZEROAlignObjs","kSingleKey"); - f.Close(); + if(TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){ + // save on file + const char* filename = "VZEROfullMisalignment.root"; + TFile f(filename,"RECREATE"); + if(!f){ + Error(macroname,"cannot open file for output\n"); + return; + } + Info(macroname,"Saving alignment objects to the file %s", filename); + f.cd(); + f.WriteObject(array,"VZEROAlignObjs","kSingleKey"); + f.Close(); }else{ - // save in CDB storage - AliCDBMetaData* md = new AliCDBMetaData(); - md->SetResponsible("Brigitte Cheynis"); - md->SetComment("Alignment objects for V0 full misalignment"); - md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); - AliCDBId id("VZERO/Align/Data",0,AliCDBRunRange::Infinity()); - storage->Put(array,id,md); + // save in CDB storage + AliCDBMetaData* md = new AliCDBMetaData(); + md->SetResponsible("Brigitte Cheynis"); + md->SetComment("Alignment objects for V0 full misalignment"); + md->SetAliRootVersion(gSystem->Getenv("ARVERSION")); + AliCDBId id("VZERO/Align/Data",0,AliCDBRunRange::Infinity()); + storage->Put(array,id,md); } + array->Print(); array->Delete(); }