diff --git a/tracy/tools/soltracy.cc b/tracy/tools/soltracy.cc index 3ef4445e76620d4062ecb3c9223906609451f71a..647db9fa33699b2099fff2c731588ee6bcd69543 100644 --- a/tracy/tools/soltracy.cc +++ b/tracy/tools/soltracy.cc @@ -253,7 +253,7 @@ int main(int argc, char *argv[]) { // The corresponding field error is replaced by the new value. // This feature is generic, works for all lattices else if (strcmp(CommandStr,"ReadfefileFlag") == 0) { - fprintf(stdout,"\n Read field error from fe_file: \n"); + fprintf(stdout,"\n Read field error from fe_file: %s \n", UserCommandFlag[i].fe_file); LoadFieldErrs(UserCommandFlag[i].fe_file, true, 1.0, true, 1); Ring_GetTwiss(true, 0.0); @@ -695,8 +695,8 @@ int main(int argc, char *argv[]) { //the vacuum chamber is read from the file "chamber_file" // finally, write the momentum acceptance to file "mom_aper.out". if (strcmp(CommandStr,"TousTrackFlag") == 0) { - globval.Aperture_on = true; - ReadCh(UserCommandFlag[i].chamber_file); + // globval.Aperture_on = true; + // ReadCh(UserCommandFlag[i].chamber_file); // LoadApers("/home/simon/projects/src/lattice/Apertures.dat", 1, 1); tau = Touschek(Qb, globval.delta_RF, false, globval.eps[X_], globval.eps[Y_], sigma_delta, sigma_s, n_turns, true, sum_delta, diff --git a/tracy/tracy/src/lsoc.cc b/tracy/tracy/src/lsoc.cc index b5141caef526fa81d047502efdda985c509b728d..9e4bd8b24c09f372cb0935a12f69b67624f9d8fe 100644 --- a/tracy/tracy/src/lsoc.cc +++ b/tracy/tracy/src/lsoc.cc @@ -504,13 +504,15 @@ void LoadFieldErrs(const char *FieldErrorFile, const bool Scale_it, while (fgets(line, max_str, inf) != NULL) { + if (!prt) + cout << line << endl; if (strstr(line, "#") == NULL) { // if line does not strat with # // check for whether to set new seed sscanf(line, "%s", name); if (strcmp("seed", name) == 0) { // if seed number set_rnd = true; sscanf(line, "%*s %ld", &seed_val); - printf("LoadFieldErr: setting random seed to %d\n", seed_val+ik); + printf("LoadFieldErr: setting random seed to %ld\n", seed_val+ik); iniranf(seed_val+ik); } else { // then it is an & bn definition sscanf(line, "%*s %s %lf", type, &r0); // read reference radius @@ -521,10 +523,13 @@ void LoadFieldErrs(const char *FieldErrorFile, const bool Scale_it, printf("LoadFieldErr: seed not defined\n"); exit(1); } //end if - // skip first three parameters + + // skip first three parameters strtok(line, " "); // set pointer for (k = 1; k <= 2; k++) strtok(NULL, " "); // pointer move to nxt element + + while (((prm = strtok(NULL, " ")) != NULL) && (strcmp(prm, "\r\n") != 0)) { sscanf(prm, "%d", &n); @@ -537,7 +542,8 @@ void LoadFieldErrs(const char *FieldErrorFile, const bool Scale_it, An *= Scale; } if (prt) - printf(" %1d %9.1e %9.1e\n", n, Bn, An); + cout << n << " " << Bn << " " << An << " "<<endl; + // convert to normalized multipole components SetFieldErrors(name, rms, r0, n, Bn, An, true); } // end while