本文整理汇总了C++中PeakMap::getNrChromatograms方法的典型用法代码示例。如果您正苦于以下问题:C++ PeakMap::getNrChromatograms方法的具体用法?C++ PeakMap::getNrChromatograms怎么用?C++ PeakMap::getNrChromatograms使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PeakMap
的用法示例。
在下文中一共展示了PeakMap::getNrChromatograms方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cacheFile
CachedmzML cacheFile(std::string & tmp_filename, PeakMap& exp)
{
NEW_TMP_FILE(tmp_filename);
// Load experiment
MzMLFile().load(OPENMS_GET_TEST_DATA_PATH("MzMLFile_1.mzML"), exp);
TEST_EQUAL(exp.getNrSpectra() > 0, true)
TEST_EQUAL(exp.getNrChromatograms() > 0, true)
// Cache the experiment to a temporary file
CachedmzML cache;
cache.writeMemdump(exp, tmp_filename);
// Create the index from the given file
cache.createMemdumpIndex(tmp_filename);
return cache;
}
示例2: ifs_
delete ptr;
}
END_SECTION
// see also MSDataCachedConsumer_test.cpp -> consumeSpectrum
// this is a complete test of the caching object
START_SECTION(( [EXTRA] testCaching))
{
std::string tmp_filename;
NEW_TMP_FILE(tmp_filename);
// Load experiment
PeakMap exp;
MzMLFile().load(OPENMS_GET_TEST_DATA_PATH("MzMLFile_1.mzML"), exp);
TEST_EQUAL(exp.getNrSpectra() > 0, true)
TEST_EQUAL(exp.getNrChromatograms() > 0, true)
// Cache the experiment to a temporary file
CachedmzML cache;
cache.writeMemdump(exp, tmp_filename);
// Check whether spectra were written to disk correctly...
{
// Create the index from the given file
cache.createMemdumpIndex(tmp_filename);
std::vector<std::streampos> spectra_index = cache.getSpectraIndex();
TEST_EQUAL(spectra_index.size(), 4)
std::ifstream ifs_(tmp_filename.c_str(), std::ios::binary);
// retrieve the spectrum
OpenSwath::BinaryDataArrayPtr mz_array(new OpenSwath::BinaryDataArray);