Updated HMPID DA. It uses now recently introduced AilHMPIDRawStream class. The DA...
[u/mrichter/AliRoot.git] / HMPID / MakeHMPIDZeroMisAlignment.C
index 981ecad..e6e40fe 100644 (file)
@@ -7,14 +7,14 @@ void MakeHMPIDZeroMisAlignment(){
 
   Double_t dX=0.,dY=0.,dZ=0.,dPsi=0.,dTheta=0.,dPhi=0.;
  
-  Int_t idHMPID =  AliAlignObj::kHMPID;
+  Int_t idHMPID =  AliGeomManager::kHMPID;
   for (Int_t iCh = 0; iCh < 7; iCh++) {
-    new((*pCA)[iCh]) AliAlignObjMatrix(AliAlignObj::SymName(idHMPID,iCh),AliAlignObj::LayerToVolUID(idHMPID,iCh),dX,dY,dZ,dPsi,dTheta,dPhi,kTRUE);
+    new((*pCA)[iCh]) AliAlignObjMatrix(AliGeomManager::SymName(idHMPID,iCh),AliGeomManager::LayerToVolUID(idHMPID,iCh),dX,dY,dZ,dPsi,dTheta,dPhi,kTRUE);
   }
 
 //   pCA->Print();
   
-  if(!gSystem->Getenv("$TOCDB")){
+  if( gSystem->Getenv("TOCDB") != TString("kTRUE") ){
     // save on file
     TFile f("HMPIDzeroMisalignment.root","RECREATE");
     if(!f) cerr<<"cannot open file for output\n";
@@ -23,13 +23,13 @@ void MakeHMPIDZeroMisAlignment(){
     f.Close();
   }else{
     // save in CDB storage
-    const char* Storage = gSystem->Getenv("$STORAGE");
+    const char* Storage = gSystem->Getenv("STORAGE");
     AliCDBManager* cdb = AliCDBManager::Instance();
     AliCDBStorage* storage = cdb->GetStorage(Storage);
     AliCDBMetaData *pMeta= new AliCDBMetaData();  
     pMeta->SetResponsible("HMPID Expert");
     pMeta->SetComment("Zero alignment objects for HMPID");
-    pMeta->SetAliRootVersion(gSystem->Getenv("$ARVERSION"));
+    pMeta->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
     AliCDBId id("HMPID/Align/Data",0,9999999);
     storage->Put(pCA,id,pMeta);
   }