| 397 | } |
| 398 | |
| 399 | void CachedMzMLHandler::readChromatogram(ChromatogramType& chromatogram, std::ifstream& ifs) |
| 400 | { |
| 401 | std::vector<OpenSwath::BinaryDataArrayPtr> data = readChromatogramFast(ifs); |
| 402 | chromatogram.reserve(data[0]->data.size()); |
| 403 | |
| 404 | for (Size j = 0; j < data[0]->data.size(); j++) |
| 405 | { |
| 406 | ChromatogramPeak p; |
| 407 | p.setRT(data[0]->data[j]); |
| 408 | p.setIntensity(data[1]->data[j]); |
| 409 | chromatogram.push_back(p); |
| 410 | } |
| 411 | |
| 412 | MSChromatogram::FloatDataArrays fdas; |
| 413 | for (Size j = 2; j < data.size(); j++) |
| 414 | { |
| 415 | MSChromatogram::FloatDataArray fda; |
| 416 | fda.reserve(data[j]->data.size()); |
| 417 | for (const auto& k : fda) fda.push_back(k); |
| 418 | fda.setName(data[j]->description); |
| 419 | fdas.push_back(fda); |
| 420 | } |
| 421 | chromatogram.setFloatDataArrays(fdas); |
| 422 | } |
| 423 | |
| 424 | void CachedMzMLHandler::writeSpectrum_(const SpectrumType& spectrum, std::ofstream& ofs) const |
| 425 | { |
nothing calls this directly
no test coverage detected