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,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);
//
}
// 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");