Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TOUZE Francois
PSPA
Commits
20d22a1a
Commit
20d22a1a
authored
Jul 12, 2019
by
TOUZE Francois
Browse files
fix bug in tunes option
parent
148c602d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
+24
-12
backend/pspa/v0/src/Core/softwareMadx.cc
backend/pspa/v0/src/Core/softwareMadx.cc
+23
-11
backend/pspa/v0/src/cppcode.cpp
backend/pspa/v0/src/cppcode.cpp
+1
-1
No files found.
backend/pspa/v0/src/Core/softwareMadx.cc
View file @
20d22a1a
...
...
@@ -1116,6 +1116,8 @@ smap softwareMadx::getTableContents(ifstream& infile)
{
if
(
debug
>
0
)
cout
<<
"softwareMadx::getTableContents()
\n
"
;
cout
<<
"softwareMadx::getTableContents()
\n
"
;
// format of the twiss file:
// the header
// element keywords
...
...
@@ -1131,6 +1133,8 @@ smap softwareMadx::getTableContents(ifstream& infile)
if
(
buf
.
find
(
"* NAME"
)
!=
string
::
npos
)
break
;
}
cout
<<
"buf => "
<<
buf
<<
endl
;
vector
<
string
>
vaxis
;
if
(
buf
.
find
(
"BETX"
)
!=
string
::
npos
)
vaxis
.
push_back
(
"betx"
);
if
(
buf
.
find
(
"ALFX"
)
!=
string
::
npos
)
vaxis
.
push_back
(
"alfx"
);
...
...
@@ -1140,6 +1144,8 @@ smap softwareMadx::getTableContents(ifstream& infile)
if
(
buf
.
find
(
"BETY"
)
!=
string
::
npos
)
vaxis
.
push_back
(
"bety"
);
if
(
buf
.
find
(
"ALFY"
)
!=
string
::
npos
)
vaxis
.
push_back
(
"alfy"
);
if
(
buf
.
find
(
"MUY"
)
!=
string
::
npos
)
vaxis
.
push_back
(
"muy"
);
cout
<<
"vaxis.size => "
<<
vaxis
.
size
()
<<
endl
;
//
// skip formats
...
...
@@ -1161,6 +1167,8 @@ smap softwareMadx::getTableContents(ifstream& infile)
infile
>>
buf
;
// name
}
cout
<<
"vmap.size => "
<<
vmap
.
size
()
<<
endl
;
return
vmap
;
}
...
...
@@ -1216,7 +1224,7 @@ json softwareMadx::readOpticalParameters()
// get the file xxx-Ytunes.txt back (if exists)
TYtune
(
j
);
}
// creates the output file => xxx-plot.txt
string
fname
=
userDir_
+
getFileName
(
"plot"
,
false
);
ofstream
outfile
;
...
...
@@ -1268,11 +1276,13 @@ void softwareMadx::TTwiss(json& j)
}
it
=
vmap
.
find
(
"mux"
);
for
(
int
k
=
0
;
k
<
it
->
second
.
size
();
k
++
)
{
double
ycoor
=
atof
(
it
->
second
.
at
(
k
).
c_str
()
);
j
[
"xmu"
].
push_back
(
ycoor
);
}
if
(
it
!=
vmap
.
end
())
{
for
(
int
k
=
0
;
k
<
it
->
second
.
size
();
k
++
)
{
double
ycoor
=
atof
(
it
->
second
.
at
(
k
).
c_str
()
);
j
[
"xmu"
].
push_back
(
ycoor
);
}
}
it
=
vmap
.
find
(
"dx"
);
for
(
int
k
=
0
;
k
<
it
->
second
.
size
();
k
++
)
{
...
...
@@ -1295,11 +1305,13 @@ void softwareMadx::TTwiss(json& j)
}
it
=
vmap
.
find
(
"muy"
);
for
(
int
k
=
0
;
k
<
it
->
second
.
size
();
k
++
)
{
double
ycoor
=
atof
(
it
->
second
.
at
(
k
).
c_str
()
);
j
[
"ymu"
].
push_back
(
ycoor
);
}
if
(
it
!=
vmap
.
end
())
{
for
(
int
k
=
0
;
k
<
it
->
second
.
size
();
k
++
)
{
double
ycoor
=
atof
(
it
->
second
.
at
(
k
).
c_str
()
);
j
[
"ymu"
].
push_back
(
ycoor
);
}
}
}
void
softwareMadx
::
TSigma
(
json
&
j
)
...
...
backend/pspa/v0/src/cppcode.cpp
View file @
20d22a1a
...
...
@@ -215,7 +215,7 @@ int main (int argc, char* argv[])
status
=
ptr
->
simuTEST
(
obj
);
std
::
cout
<<
std
::
boolalpha
;
cout
<<
"status => "
<<
status
<<
endl
;
//
ptr->Chartjs();
ptr
->
Chartjs
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment