40 os <<
"size: " << sl.
size() << endl;
42 for (
size_t i=0, end=sl.
size(); i<end; i++)
45 vector<MZIntensityPair> data;
46 spectrum->getMZIntensityPairs(data);
48 os << spectrum->index <<
" " 49 << spectrum->id <<
": ";
51 copy(data.begin(), data.end(), ostream_iterator<MZIntensityPair>(os,
" "));
62 for (
size_t i=0; i<10; i++)
69 vector<MZIntensityPair> data(5);
73 sl->spectra.push_back(spectrum);
78 *
os_ <<
"original spectrum list:\n";
90 vector<MZIntensityPair> data;
91 spectrum->getMZIntensityPairs(data);
99 for (
size_t i=0; i<sl->size(); i++)
106 *
os_ <<
"filtered list:\n";
125 int main(
int argc,
char* argv[])
131 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
int main(int argc, char *argv[])
boost::shared_ptr< Spectrum > SpectrumPtr
virtual SpectrumPtr spectrum(size_t index, bool getBinaryData=false) const =0
retrieve a spectrum by index
virtual size_t size() const =0
returns the number of spectra
float lexical_cast(const std::string &str)
Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW...
The data point type of a mass spectrum.
virtual size_t size() const
returns the number of spectra
boost::shared_ptr< SpectrumList > SpectrumListPtr
void printSpectrumList(const SpectrumList &sl, ostream &os)
SpectrumListPtr createSpectrumList()
MS_number_of_detector_counts
number of detector counts: The number of counted events observed in one or a group of elements of a d...
void verifySpectrumSize(const SpectrumList &sl, size_t index, size_t size)
#define TEST_PROLOG(argc, argv)
boost::shared_ptr< SpectrumListSimple > SpectrumListSimplePtr
SpectrumList filter, for creating Spectrum sub-lists.
The structure that captures the generation of a peak list (including the underlying acquisitions) ...
Simple writeable in-memory implementation of SpectrumList.