MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / readChromatogram

Method readChromatogram

src/openms/source/FORMAT/HANDLERS/CachedMzMLHandler.cpp:399–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 7

readChromatogramFastFunction · 0.85
reserveMethod · 0.45
sizeMethod · 0.45
setRTMethod · 0.45
push_backMethod · 0.45
setNameMethod · 0.45
setFloatDataArraysMethod · 0.45

Tested by

no test coverage detected