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
bf536369
Commit
bf536369
authored
13 years ago
by
zhang
Browse files
Options
Downloads
Patches
Plain Diff
Add features to do ID correction. (Based on the functions in nsrl-ii_lib.cc)
parent
8ef7487f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tracy/tracy/src/read_script.cc
+21
-1
21 additions, 1 deletion
tracy/tracy/src/read_script.cc
with
21 additions
and
1 deletion
tracy/tracy/src/read_script.cc
+
21
−
1
View file @
bf536369
...
@@ -45,7 +45,11 @@ char fic_hcorr[max_str],fic_vcorr[max_str], fic_skew[max_str];
...
@@ -45,7 +45,11 @@ char fic_hcorr[max_str],fic_vcorr[max_str], fic_skew[max_str];
/* COD correction */
/* COD correction */
int
nwh
=
56
,
nwv
=
56
;
//number of singular values for SVD correction
int
nwh
=
56
,
nwv
=
56
;
//number of singular values for SVD correction
//correction
/* ID compensation */
char
IDCq_name
[
max_str
][
11
];
//multipole field error correction (SOLEIL based)
char
hcorr_file
[
max_str
],
vcorr_file
[
max_str
];
//files with the status of hcorr/vcorr status,
char
hcorr_file
[
max_str
],
vcorr_file
[
max_str
];
//files with the status of hcorr/vcorr status,
//to choose which correctors are used for orbit correction
//to choose which correctors are used for orbit correction
//default name of special elements in lattice
//default name of special elements in lattice
...
@@ -491,6 +495,22 @@ void read_script(const char *param_file_name, bool rd_lat, long& CommNo, UserCom
...
@@ -491,6 +495,22 @@ void read_script(const char *param_file_name, bool rd_lat, long& CommNo, UserCom
else
if
(
strcmp
(
"nwv"
,
name
)
==
0
){
else
if
(
strcmp
(
"nwv"
,
name
)
==
0
){
sscanf
(
line
,
"%*s %d"
,
&
nwv
);
sscanf
(
line
,
"%*s %d"
,
&
nwv
);
}
}
//ID correction
else
if
(
strcmp
(
"IDCorrFlag"
,
name
)
==
0
)
strcpy
(
UserCommandFlag
[
CommNo
].
CommandStr
,
name
);
else
if
(
strcmp
(
"N_calls"
,
name
)
==
0
)
// ID correction parameters
sscanf
(
line
,
"%*s %d"
,
&
N_calls
);
else
if
(
strcmp
(
"N_steps"
,
name
)
==
0
)
sscanf
(
line
,
"%*s %d"
,
&
N_steps
);
else
if
(
strcmp
(
"N_Fam"
,
name
)
==
0
)
sscanf
(
line
,
"%*s %d"
,
&
N_Fam
);
else
if
(
strcmp
(
"IDCquads"
,
name
)
==
0
)
{
sscanf
(
line
,
"%*s %s %s %s %s %s %s %s %s %s %s %s"
,
IDCq_name
[
0
],
IDCq_name
[
1
],
IDCq_name
[
2
],
IDCq_name
[
3
],
IDCq_name
[
4
],
IDCq_name
[
5
],
IDCq_name
[
6
],
IDCq_name
[
7
],
IDCq_name
[
8
],
IDCq_name
[
9
],
IDCq_name
[
10
]);
}
// } else if (strcmp("scl_nu", name) == 0)
else
{
else
{
printf
(
"bad line in file %s, line %ld
\n
"
,
full_param_file_name
,
LineNum
);
printf
(
"bad line in file %s, line %ld
\n
"
,
full_param_file_name
,
LineNum
);
exit_
(
1
);
exit_
(
1
);
...
...
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