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

Method getChromatogram

src/openms/source/FORMAT/CachedMzML.cpp:80–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 MSChromatogram CachedmzML::getChromatogram(Size id)
81 {
82 OPENMS_PRECONDITION(id < getNrChromatograms(), "Id cannot be larger than number of chromatograms");
83
84 if ( !ifs_.seekg(chrom_index_[id]) )
85 {
86 std::cerr << "Error while reading chromatogram " << id << " - seekg created an error when trying to change position to " << chrom_index_[id] << "." << std::endl;
87 std::cerr << "Maybe an invalid position was supplied to seekg, this can happen for example when reading large files (>2GB) on 32bit systems." << std::endl;
88 throw Exception::ParseError(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
89 "Error while changing position of input stream pointer.", filename_cached_);
90 }
91
92 MSChromatogram c = meta_ms_experiment_.getChromatogram(id);
93 Internal::CachedMzMLHandler::readChromatogram(c, ifs_);
94 return c;
95 }
96
97 size_t CachedmzML::getNrSpectra() const
98 {

Callers 15

prepareChromatogramFunction · 0.80
addDataFileMethod · 0.80
LayerDataChrom.hFile · 0.80
main_Method · 0.80
main_Method · 0.80
main_Method · 0.80
main_Method · 0.80
scoreIdentification_Method · 0.80
addDataProcessing_Method · 0.80
storeMethod · 0.80
pickExperimentMethod · 0.80

Calls 1

getNrChromatogramsFunction · 0.50

Tested by 7

START_SECTIONFunction · 0.64
START_SECTIONFunction · 0.64
START_SECTIONFunction · 0.64
START_SECTIONFunction · 0.64
START_SECTIONFunction · 0.64
START_SECTIONFunction · 0.64
test_readfile_contentMethod · 0.64