void printSpectrumList(const SpectrumList& sl, ostream& os) { os << "size: " << sl.size() << endl; for (size_t i=0, end=sl.size(); i<end; i++) { SpectrumPtr spectrum = sl.spectrum(i, false); os << spectrum->index << " " << spectrum->id << " " << "ms" << spectrum->cvParam(MS_ms_level).value << " " << "scanEvent:" << spectrum->scanList.scans[0].cvParam(MS_preset_scan_configuration).value << " " << "scanTime:" << spectrum->scanList.scans[0].cvParam(MS_scan_start_time).timeInSeconds() << " " << endl; } }
void verifySpectrumSize(const SpectrumList& sl, size_t index, size_t size) { SpectrumPtr spectrum = sl.spectrum(index, true); vector<MZIntensityPair> data; spectrum->getMZIntensityPairs(data); unit_assert(data.size() == size); }
void printSpectrumList(const SpectrumList& sl, ostream& os) { os << "size: " << sl.size() << endl; for (size_t i=0, end=sl.size(); i<end; i++) { SpectrumPtr spectrum = sl.spectrum(i, false); vector<MZIntensityPair> data; spectrum->getMZIntensityPairs(data); os << spectrum->index << " " << spectrum->id << ": "; copy(data.begin(), data.end(), ostream_iterator<MZIntensityPair>(os, " ")); os << endl; } }