27 #include "boost/iostreams/positioning.hpp"
32 using namespace pwiz::util;
33 using namespace pwiz::msdata;
54 Spectrum& s20 = *spectrumList->spectra[0];
73 vector<double>& s20_mz = s20.
getMZArray()->data;
76 for (
int i=0; i<10; i++)
77 s20_mz.push_back(i*2);
79 for (
int i=0; i<10; i++)
80 s20_intensity.push_back((10-i)*2);
101 Spectrum& s20 = *spectrumList->spectra[0];
127 vector<double>& s20_mz = s20.
getMZArray()->data;
130 for (
int i=0; i<10; i++)
131 s20_mz.push_back(i*2);
133 for (
int i=0; i<10; i++)
134 s20_intensity.push_back((10-i)*2);
146 serializer.
write(oss, msd);
148 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
151 shared_ptr<istream> iss(
new istringstream(oss.str()));
152 serializer.
read(iss, msd2);
158 if (
os_ && diff) *
os_ << diff << endl;
167 serializer.
write(oss, msd);
169 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
172 shared_ptr<istream> iss(
new istringstream(oss.str()));
173 serializer.
read(iss, msd2);
179 if (
os_ && diff) *
os_ << diff << endl;
188 serializer.
write(oss, msd);
190 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
193 shared_ptr<istream> iss(
new istringstream(oss.str()));
194 serializer.
read(iss, msd2);
200 if (
os_ && diff) *
os_ << diff << endl;
209 serializer.
write(oss, msd);
211 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
214 shared_ptr<istream> iss(
new istringstream(oss.str()));
215 serializer.
read(iss, msd2);
220 if (
os_ && diff) *
os_ << diff << endl;
229 serializer.
write(oss, msd);
231 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
234 shared_ptr<istream> iss(
new istringstream(oss.str()));
235 serializer.
read(iss, msd2);
241 if (
os_ && diff) *
os_ << diff << endl;
250 serializer.
write(oss, msd);
252 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
255 shared_ptr<istream> iss(
new istringstream(oss.str()));
256 serializer.
read(iss, msd2);
262 if (
os_ && diff) *
os_ << diff << endl;
282 int main(
int argc,
char* argv[])
288 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;