]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/MakePMDZeroMisAlignment.C
Actually this IS needed to work offline (with Offline created ESDs)
[u/mrichter/AliRoot.git] / PMD / MakePMDZeroMisAlignment.C
index 9174eab87f201a15aafa2a625aacc8d691d21944..9931cbaa4a0c559d0ce347faebf1e7f33facb193 100644 (file)
@@ -33,21 +33,13 @@ void MakePMDZeroMisAlignment(){
     // As these will be mounted on the same
     // Steel plate 
  */
-  
-  if(!AliGeomManager::GetGeometry()){
-    if(!(AliCDBManager::Instance())->IsDefaultStorageSet())
-      AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
-      AliCDBManager::Instance()->SetRun(0);
-    AliGeomManager::LoadGeometry();
-  }
-  // needed for the constructors with local coordinates not to fail
+
+  const char* macroname = "MakePMDZeroMisAlignment.C";
 
   //Create a TClonesArray of Align Object to store displacement Angles
   TClonesArray *array = new TClonesArray("AliAlignObjParams",10);
   TClonesArray &alobj = *array;
   
-  AliAlignObjParams o;
-  
   Int_t iIndex=0; //  let all modules have index=0 in a layer with no LUT
   AliGeomManager::ELayerID iLayer = AliGeomManager::kInvalidLayer;
   UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iIndex);
@@ -59,8 +51,7 @@ void MakePMDZeroMisAlignment(){
     new(alobj[j++]) AliAlignObjParams(snSector.Data(), volid, dx, dy, dz, dpsi, dtheta, dphi, kTRUE);
   }
 
-  const char* macroname = "MakePMDZeroMisAlignment.C";
-  if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
+  if( TString(gSystem->Getenv("TOCDB")) != TString("kTRUE") ){
     // Create a File to store the alignment data
     const char* filename = "PMDzeroMisalignment.root";
     TFile f(filename,"RECREATE");