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
Xavier Garrido
CAMEL
Commits
8facf9b8
Commit
8facf9b8
authored
Feb 24, 2017
by
Plaszczynski Stephane
Browse files
better decoding of kval_file in writeSpectraPk
parent
998cd8d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/camel/exec/writeSpectraPk.cc
src/camel/exec/writeSpectraPk.cc
+9
-1
No files found.
src/camel/exec/writeSpectraPk.cc
View file @
8facf9b8
...
...
@@ -201,9 +201,17 @@ int main(int argc,char** argv){
string
kvfile
=
parser
.
params
.
find
<
string
>
(
"kval_file"
,
""
);
if
(
kvfile
.
size
()
!=
0
)
{
cout
<<
"using k values from file="
<<
kvfile
<<
endl
;
//decode 1st column
ifstream
f
(
kvfile
.
c_str
());
string
line
;
double
kk
;
while
(
f
>>
kk
)
kval
.
push_back
(
kk
);
while
(
getline
(
f
,
line
))
{
//skip comments
if
(
line
.
find
(
"#"
,
0
)
!=
std
::
string
::
npos
)
continue
;
std
::
istringstream
str
(
line
);
if
(
str
>>
kk
)
kval
.
push_back
(
kk
);
}
}
else
{
const
int
npks
=
parser
.
params
.
find
<
int
>
(
"n_pks"
,
1000
);
...
...
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