Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TRACY3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Optics
TRACY3
Commits
a94174a9
Commit
a94174a9
authored
13 years ago
by
zhang
Browse files
Options
Downloads
Patches
Plain Diff
23/03/2011
1) Add "PrintCODFlag"
parent
6c9df245
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tracy/tools/soltracy.cc
+12
-5
12 additions, 5 deletions
tracy/tools/soltracy.cc
tracy/tracy/inc/read_script.h
+1
-1
1 addition, 1 deletion
tracy/tracy/inc/read_script.h
tracy/tracy/src/read_script.cc
+8
-1
8 additions, 1 deletion
tracy/tracy/src/read_script.cc
with
21 additions
and
7 deletions
tracy/tools/soltracy.cc
+
12
−
5
View file @
a94174a9
...
...
@@ -34,8 +34,7 @@ int main(int argc, char *argv[]) {
// globval.pathlength = false;
// globval.bpm = 0;
// const double x_max_FMA = 10e-3, delta_FMA = 10e-2;
// const int n_x = 801, n_dp = 80, n_tr = 2048;
long
i
=
0L
;
//initilize the for loop to read command string
char
CommandStr
[
max_str
];
double
nux
=
0
,
nuy
=
0
,
ksix
=
0
,
ksiy
=
0
;
...
...
@@ -68,11 +67,11 @@ int main(int argc, char *argv[]) {
}
/************************************************************************
writes flat file with all the design values of the lattice
, very important file for debug
print files
, very important file for debug
*************************************************************************/
//print flat file with all the design values of the lattice,
prtmfile
(
"flat_file.dat"
);
// print cod
// print close orbit to a file
getcod
(
dP
,
lastpos
);
prt_cod
(
"cod.out"
,
globval
.
bpm
,
true
);
...
...
@@ -97,6 +96,14 @@ int main(int argc, char *argv[]) {
cout
<<
"print the twiss parameters to file: "
<<
twiss_file
<<
"
\n
"
;
printlatt
(
twiss_file
);
}
//print the close orbit
else
if
(
strcmp
(
CommandStr
,
"PrintCODFlag"
)
==
0
)
{
cout
<<
"
\n
"
;
cout
<<
"print the close orbit to file: "
<<
cod_file
<<
"
\n
"
;
getcod
(
dP
,
lastpos
);
prt_cod
(
cod_file
,
globval
.
bpm
,
true
);
}
//turn on flag for quadrupole fringe field
else
if
(
strcmp
(
CommandStr
,
"QuadFringeOnFlag"
)
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
tracy/tracy/inc/read_script.h
+
1
−
1
View file @
a94174a9
...
...
@@ -113,6 +113,6 @@
extern
char
chamber_file
[
max_str
];
extern
char
twiss_file
[
max_str
];
extern
char
cod_file
[
max_str
];
// function
void
read_script
(
const
char
*
param_file_name
,
bool
rd_lat
,
long
&
CommNo
,
UserCommand
UserCommandFlag
[]);
This diff is collapsed.
Click to expand it.
tracy/tracy/src/read_script.cc
+
8
−
1
View file @
a94174a9
...
...
@@ -30,6 +30,8 @@
/* files */
//twiss file
char
twiss_file
[
max_str
];
// cod file
char
cod_file
[
max_str
];
//chamber file
char
chamber_file
[
max_str
];
// multipole files
...
...
@@ -150,10 +152,15 @@ void read_script(const char *param_file_name, bool rd_lat, long& CommNo, UserCom
}
/* read in bool flags */
//print twiss parameters flag
flag
//print twiss parameters flag
else
if
(
strcmp
(
"PrintTwissFlag"
,
name
)
==
0
){
sscanf
(
line
,
"%*s %s"
,
twiss_file
);
strcpy
(
UserCommandFlag
[
CommNo
].
CommandStr
,
name
);
}
//print close orbit(COD) flag
else
if
(
strcmp
(
"PrintCODFlag"
,
name
)
==
0
){
sscanf
(
line
,
"%*s %s"
,
cod_file
);
strcpy
(
UserCommandFlag
[
CommNo
].
CommandStr
,
name
);
}
//read chamber file flat
else
if
(
strcmp
(
"ReadChamberFlag"
,
name
)
==
0
){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment