diff --git a/tracy/tools/soltracy.cc b/tracy/tools/soltracy.cc index 956e15303e0f295e95c9552b673d8db60d07eadc..f4d5db3b2dddecb6be31380dec7a5156cb44fcb9 100644 --- a/tracy/tools/soltracy.cc +++ b/tracy/tools/soltracy.cc @@ -272,24 +272,30 @@ int main(int argc, char *argv[]) { //print the twiss paramaters in a file defined by the name else if(strcmp(CommandStr,"PrintTwissFlag") == 0) { cout << "\n"; - cout << "print the twiss parameters to file: "<< twiss_file << "\n"; - printlatt(twiss_file); + cout << "print the twiss parameters to file: " + << UserCommandFlag[i]._PrintTwiss_twiss_file << "\n"; + + printlatt(UserCommandFlag[i]._PrintTwiss_twiss_file); } //print the close orbit else if(strcmp(CommandStr,"PrintCODFlag") == 0) { cout << "\n"; - cout << "print the close orbit to file: "<< cod_file << "\n"; + cout << "print the close orbit to file: " + << UserCommandFlag[i]._PrintCOD_cod_file << "\n"; getcod(dP, lastpos); - prt_cod(cod_file, globval.bpm, true); + prt_cod(UserCommandFlag[i]._PrintCOD_cod_file, globval.bpm, true); } //print coordinates at lattice elements obtained by tracking else if(strcmp(CommandStr,"PrintTrackFlag") == 0) { cout << "\n"; - cout << "print the coordinates to file: "<< track_file << "\n"; + cout << "print the tracked coordinates to file: " + << UserCommandFlag[i]._PrintTrack_track_file << "\n"; - PrintTrack(track_file,UserCommandFlag[i]._x,UserCommandFlag[i]._px, - UserCommandFlag[i]._y,UserCommandFlag[i]._py, - UserCommandFlag[i]._delta,UserCommandFlag[i]._ctau,UserCommandFlag[i]._nmax); + PrintTrack(UserCommandFlag[i]._PrintTrack_track_file, + UserCommandFlag[i]._PrintTrack_x, UserCommandFlag[i]._PrintTrack_px, + UserCommandFlag[i]._PrintTrack_y, UserCommandFlag[i]._PrintTrack_py, + UserCommandFlag[i]._PrintTrack_delta,UserCommandFlag[i]._PrintTrack_ctau, + UserCommandFlag[i]._PrintTrack_nmax); } //print the girder diff --git a/tracy/tracy/inc/soleillib.h b/tracy/tracy/inc/soleillib.h index 79629a6c7b0ec67b874745ba777ac0a47737a937..28b28aa3dfdb526bb25a852024008670b79f86c2 100644 --- a/tracy/tracy/inc/soleillib.h +++ b/tracy/tracy/inc/soleillib.h @@ -115,7 +115,7 @@ void AddCorrQtErr_fam(char const *fic, const int Fnum, const double conv, const /* fit tunes for soleil lattice, in which each quadrupole is cut into two parts*/ void FitTune4(long qf1,long qf2, long qd1, long qd2, double nux, double nuy); //print the coordinates at lattice elements -void PrintTrack(const char *file_name, double x, double px,double y,double py, +void PrintTrack(const char *TrackFile, double x, double px,double y,double py, double delta, double ctau, long int nmax); diff --git a/tracy/tracy/src/soleillib.cc b/tracy/tracy/src/soleillib.cc index 218e7148e177c47c52e33db5de6b4b30b30d3e80..bc39b53e800def075512dfda41eaa50086e8aa24 100644 --- a/tracy/tracy/src/soleillib.cc +++ b/tracy/tracy/src/soleillib.cc @@ -5620,14 +5620,14 @@ void FitTune4(long qf1,long qf2, long qd1, long qd2, double nux, double nuy) } /********************************************************************** -void PrintTrack(const char *file_name, double x, double px, double y,double py, +void PrintTrack(const char *TrackFile, double x, double px, double y,double py, double delta, double ctau, long int nmax) Purpose: - Print the coordinates at each lattice element using tracking + Print the coordinates at each lattice element by tracking around COD Input: - file_name file to be print + TrackFile file to be print x initial x relative to closed orbit px initial px relative to closed orbit y initial y relative to closed orbit @@ -5642,7 +5642,7 @@ void PrintTrack(const char *file_name, double x, double px, double y,double py, Comments: Written by Jianfeng Zhang @ synchro. soleil 05/2011 **********************************************************************/ -void PrintTrack(const char *file_name, double x, double px, double y,double py, +void PrintTrack(const char *TrackFile, double x, double px, double y,double py, double delta, double ctau, long int nmax) { @@ -5654,11 +5654,11 @@ void PrintTrack(const char *file_name, double x, double px, double y,double py, bool prt = false; - outf = file_write(file_name); + outf = file_write(TrackFile); /* Get time and date */ newtime = GetTime(); - fprintf(outf, "# Tracking with TRACY III-- %s -- %s\n",file_name, asctime2(newtime)); + fprintf(outf, "# Tracking using TRACY III-- %s -- %s\n",TrackFile, asctime2(newtime)); fprintf(outf, "#\n"); // fprintf(outf, "# work tunes: %7.5f %7.5f\n",globval.TotalTune[0], globval.TotalTune[1]); fprintf(outf, "# i ElemName S x p_x y p_y");