Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
285607d1
Commit
285607d1
authored
Oct 09, 2018
by
Purves, Murray
Browse files
Fixing bit offset in PCF write
parent
c39a1b74
Pipeline
#16173
passed with stages
in 9 minutes and 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
radixio/spectrumpcfstream.i.hh
View file @
285607d1
...
...
@@ -413,11 +413,14 @@ bool SpectrumPCFStream<data_type>::write_to(const std::string &file) const
radix_line
(
"|"
);
}
// Skip to 256*83 bytes (start of spectral data)
stream
.
write
(
make_length
(
" "
,
(
256
*
83
)
-
stream
.
bytesWritten
()).
c_str
(),
(
256
*
83
)
-
stream
.
bytesWritten
());
// Skip to 256*82 bytes (start of spectral data)
radix_line
(
"Skipping "
<<
(
256
*
82
)
-
stream
.
bytesWritten
()
<<
" bytes to start of spectra data (256*83 = "
<<
256
*
82
<<
" bytes)"
);
stream
.
write
(
make_length
(
" "
,
(
256
*
82
)
-
stream
.
bytesWritten
()).
c_str
(),
(
256
*
82
)
-
stream
.
bytesWritten
());
// Add bytes written directly to eafstream count
stream
.
setBytesWritten
(
256
*
8
3
);
stream
.
setBytesWritten
(
256
*
8
2
);
}
else
if
(
mData
->
deviationPairPresence
().
compare
(
"DeviationPairsInFileCompressed"
)
==
0
)
...
...
@@ -459,11 +462,14 @@ bool SpectrumPCFStream<data_type>::write_to(const std::string &file) const
radix_line
(
"|"
);
}
// Skip to 256*83 bytes (start of spectral data)
stream
.
write
(
make_length
(
" "
,
(
256
*
83
)
-
stream
.
bytesWritten
()).
c_str
(),
(
256
*
83
)
-
stream
.
bytesWritten
());
// Skip to 256*82 bytes (start of spectral data)
radix_line
(
"Skipping "
<<
(
256
*
82
)
-
stream
.
bytesWritten
()
<<
" bytes to start of spectra data (256*83 = "
<<
256
*
82
<<
" bytes)"
);
stream
.
write
(
make_length
(
" "
,
(
256
*
82
)
-
stream
.
bytesWritten
()).
c_str
(),
(
256
*
82
)
-
stream
.
bytesWritten
());
// Add bytes written directly to eafstream count
stream
.
setBytesWritten
(
256
*
8
3
);
stream
.
setBytesWritten
(
256
*
8
2
);
}
else
{
...
...
radixio/tests/tstSpectrum.cc
View file @
285607d1
...
...
@@ -39,7 +39,7 @@ TEST(RadixIO, SpectrumToPCF)
ASSERT_TRUE
(
testStream2
.
read_from
(
testWritePCFFile
));
// Test the contents of the two spectra
EXPECT_EQ
(
30
,
testSpectrum2
->
spectrumDataCount
());
EXPECT_EQ
(
1
,
testSpectrum2
->
spectrumDataCount
());
EXPECT_EQ
(
testSpectrum1
->
spectrumDataCount
(),
testSpectrum2
->
spectrumDataCount
());
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment