Removing obsolete macros which used the AliTPCtracker
[u/mrichter/AliRoot.git] / TPC / AliTPCAlign.cxx
index 87b30dc..3286c86 100644 (file)
@@ -82,10 +82,13 @@ AliTPCAlign::AliTPCAlign(Int_t reportloc, Int_t reportglob) :
   fFileLoc = new Char_t[80];
   fFileGlob = new Char_t[80];
   Char_t path[50];
-  sprintf(path,gSystem->Getenv("ALICE_ROOT")); 
+  //sprintf(path,gSystem->Getenv("ALICE_ROOT")); 
+  snprintf(path,50,"%s",gSystem->Getenv("ALICE_ROOT"));
   //
-  sprintf(fFileLoc,"%s/TPC/Survey_%d_TPC.txt",path,reportloc);
-  sprintf(fFileGlob,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
+  //sprintf(fFileLoc,"%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,80,"%s/TPC/Survey_%d_TPC.txt",path,reportglob);
   //
 
 }
@@ -111,7 +114,9 @@ AliTPCAlign & AliTPCAlign::operator =(const AliTPCAlign & align)
   //
   // assignment operator - dummy
   //
-  fDebug=align.fDebug;
+  if(this!=&align){
+    fDebug=align.fDebug;
+  }
   return (*this);
 }
 
@@ -151,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;
      }
    }  
@@ -180,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; }
    }
  }
@@ -286,7 +291,7 @@ void AliTPCAlign::Run(){
 void AliTPCAlign::StoreAlignObj(){
   //
 AliCDBManager* cdb = AliCDBManager::Instance();
- if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT");
+ if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  //
 TClonesArray *array = new TClonesArray("AliAlignObjParams",1);
 //
@@ -304,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");