Removing obsolete macros which used the AliTPCtracker
[u/mrichter/AliRoot.git] / TPC / AliTPCAlign.cxx
index 629738e..3286c86 100644 (file)
@@ -83,12 +83,12 @@ AliTPCAlign::AliTPCAlign(Int_t reportloc, Int_t reportglob) :
   fFileGlob = new Char_t[80];
   Char_t path[50];
   //sprintf(path,gSystem->Getenv("ALICE_ROOT")); 
-  snprintf(path,50,gSystem->Getenv("ALICE_ROOT"));
+  snprintf(path,50,"%s",gSystem->Getenv("ALICE_ROOT"));
   //
   //sprintf(fFileLoc,"%s/TPC/Survey_%d_TPC.txt",path,reportloc);
-  snprintf(fFileLoc,100,"%s/TPC/Survey_%d_TPC.txt",path,reportloc);
+  snprintf(fFileLoc,80,"%s/TPC/Survey_%d_TPC.txt",path,reportloc);
   //sprintf(fFileGlob,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
-  snprintf(fFileGlob,100,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
+  snprintf(fFileGlob,80,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
   //
 
 }
@@ -114,7 +114,9 @@ AliTPCAlign & AliTPCAlign::operator =(const AliTPCAlign & align)
   //
   // assignment operator - dummy
   //
-  fDebug=align.fDebug;
+  if(this!=&align){
+    fDebug=align.fDebug;
+  }
   return (*this);
 }
 
@@ -154,11 +156,11 @@ Bool_t AliTPCAlign::LoadSurveyData(){
      surveyedPoints[i][1]=currPoint->GetY();
      surveyedPoints[i][2]=currPoint->GetZ();
      if(fDebug)
-     Printf(Form("INFO: Point \"%s\" coordinates read.", pointNames[i].Data()));
+     Printf("INFO: Point \"%s\" coordinates read.", pointNames[i].Data());
    }
    else {
      if(fDebug){
-    Printf(Form("ERROR: Essential point missing: \"%s\"", pointNames[i].Data()));
+    Printf("ERROR: Essential point missing: \"%s\"", pointNames[i].Data());
     return 1;
      }
    }  
@@ -183,11 +185,11 @@ Bool_t AliTPCAlign::LoadSurveyData(){
      idealPoints[i][1]=currPointL->GetZ();
      idealPoints[i][2]=currPointL->GetX();
           if(fDebug)
-     Printf(Form("INFO: Point \"%s\" coordinates read.", pointNamesL[i].Data()));
+     Printf("INFO: Point \"%s\" coordinates read.", pointNamesL[i].Data());
    }
    else{
      if(fDebug){
-    Printf(Form("ERROR: Essential point missing: \"%s\"", pointNamesL[i].Data()));
+    Printf("ERROR: Essential point missing: \"%s\"", pointNamesL[i].Data());
     return 1; }
    }
  }
@@ -307,7 +309,8 @@ TClonesArray *array = new TClonesArray("AliAlignObjParams",1);
     // save on file
     const char* filename = "TPCSurveyMisalignment.root";
     Char_t fullname[80];
-    sprintf(fullname,"%s/TPC/%s",gSystem->Getenv("ALICE_ROOT"),filename);
+    //sprintf(fullname,"%s/TPC/%s",gSystem->Getenv("ALICE_ROOT"),filename);
+    snprintf(fullname,80,"%s/TPC/%s",gSystem->Getenv("ALICE_ROOT"),filename);
     TFile *f = new TFile(fullname,"RECREATE");
     if(!f){
       AliError("cannot open file for output\n");