Skip to content
Snippets Groups Projects
Commit cf215089 authored by zhang's avatar zhang
Browse files

24/02/2011

1)  Add parameters in Printlatt( ), now user can define the file name to save twiss parameters.
parent eb8855a4
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ void rm_mean(long int n, double x[]);
void printglob(void);
void printlatt(void);
void printlatt(const char fic[]);
void PrintMat(long n, Vector *A);
......@@ -282,5 +282,4 @@ void TransTwiss(Vector2 &alpha, Vector2 &beta, Vector2 &eta, Vector2 &etap,
/* Vacuum chamber */
void PrintCh(void);
void ChamberOff(void);
......@@ -74,6 +74,7 @@ extern char sxm1[max_str],sxm2[max_str]; extern double targetksix, targetksiz ;
//extern bool PhaseSpaceFlag;
extern bool TouschekFlag, IBSFlag, TousTrackFlag;
extern char chamber_file[max_str];
extern char twiss_file[max_str];
void read_script(const char *param_file_name, bool rd_lat);
......@@ -6,7 +6,7 @@
L. Nadolski SOLEIL 2002 Link to NAFF, Radia field maps
J. Bengtsson NSLS-II, BNL 2004 -
*/
/* Current revision $Revision: 1.14 $
/* Current revision $Revision: 1.15 $
On branch $Name: not supported by cvs2svn $
Latest change by $Author: zhang $
*/
......@@ -261,10 +261,9 @@ void printglob(void) {
****************************************************************************/
//void printlatt(void)
void printlatt(void) {
void printlatt(const char fic[]) {
long int i = 0;
FILE *outf;
const char fic[] = "linlat.out";
struct tm *newtime;
/* Get time and date */
......
......@@ -108,6 +108,7 @@ bool TouschekFlag = false, IBSFlag = false, TousTrackFlag = false;
char chamber_file[max_str];
char multipole_file[max_str];
char twiss_file[max_str];
#define OLD_LATTICE
/* Read script */
......@@ -220,10 +221,16 @@ void read_script(const char *param_file_name, bool rd_lat)
}
else if (strcmp("multipole_file", name) == 0){
sscanf(line, "%*s %s", str);
sprintf(multipole_file,"%s%s", in_dir, str); /* add file directory of the chamber file*/
sprintf(multipole_file,"%s%s", in_dir, str); /* add file directory of the multipole file*/
}
/* read in bool flags */
//print twiss parameters flag flag
else if (strcmp("PrintTwissFlag", name) == 0){
sscanf(line, "%*s %s", twiss_file);
strcpy(UserCommand[CommandNo-1],name);
}
//read chamber file flat
else if (strcmp("ReadChamberFlag", name) == 0){
strcpy(UserCommand[CommandNo-1],name);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment