31 using namespace pwiz::util;
33 using namespace pwiz::data;
34 using namespace pwiz::msdata;
56 Spectrum& s20 = *spectrumList->spectra[0];
85 vector<double>& s20_mz = s20.
getMZArray()->data;
88 for (
int i=0; i<10; i++)
89 s20_mz.push_back(i*2);
91 for (
int i=0; i<10; i++)
92 s20_intensity.push_back((10-i)*2);
97 Spectrum& s21 = *spectrumList->spectra[1];
127 vector<double>& s21_mz = s21.
getMZArray()->data;
130 for (
int i=1; i<=10; i++)
131 s21_mz.push_back(i*3);
133 for (
int i=0; i<10; i++)
134 s21_intensity.push_back((10-i)*3);
146 serializer.
write(oss, msd);
148 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
150 shared_ptr<istringstream> iss(
new istringstream(oss.str()));
152 serializer.
read(iss, msd2);
159 if (
os_ && diff) *
os_ << diff << endl;
187 int main(
int argc,
char* argv[])
193 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;