Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
265fca61
Commit
265fca61
authored
Oct 09, 2018
by
Purves, Murray
Browse files
Amending SPE channel count calculation to reflect clearer documentation
parent
2953dc58
Pipeline
#16189
passed with stages
in 9 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixio/spectrumspestream.i.hh
View file @
265fca61
...
...
@@ -199,7 +199,7 @@ bool SpectrumSPEStream<data_type>::write_to(const std::string &file) const
radix_line
(
" number of channels: "
<<
numberOfChannels
);
radix_line
(
" counts by channel array size: "
<<
countsByChannel
.
size
());
fprintf
(
stream
,
"$DATA:
\n
"
);
fprintf
(
stream
,
"0 %d
\n
"
,
numberOfChannels
);
fprintf
(
stream
,
"0 %d
\n
"
,
numberOfChannels
-
1
);
for
(
int
i
=
0
;
i
<
countsByChannel
.
size
();
++
i
)
{
fprintf
(
stream
,
"%d
\n
"
,
int
(
countsByChannel
[
i
]));
...
...
@@ -307,8 +307,13 @@ void SpectrumSPEStream<data_type>::readData(std::ifstream &stream,
<<
") - returning"
);
return
;
}
firstChannel
=
std
::
stoi
(
trim_string
(
parts
[
0
]));
totalEntries
=
std
::
stoi
(
trim_string
(
parts
[
1
]));
firstChannel
=
std
::
stoi
(
trim_string
(
parts
[
0
]));
int
lastChannel
=
std
::
stoi
(
trim_string
(
parts
[
1
]));
totalEntries
=
lastChannel
-
firstChannel
+
1
;
radix_line
(
" Reading channel data:"
);
radix_line
(
" first channel: "
<<
firstChannel
);
radix_line
(
" last channel: "
<<
lastChannel
);
radix_line
(
" number of channels: "
<<
totalEntries
);
// Read the rest of the entries
radix
(
" "
);
for
(
int
entry
=
0
;
entry
<
totalEntries
;
++
entry
)
...
...
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