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

Method load

src/openms/source/FORMAT/FeatureXMLFile.cpp:44–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 }
43
44 void FeatureXMLFile::load(const String& filename, FeatureMap& feature_map)
45 {
46 feature_map.clear(true);
47 //set DocumentIdentifier
48 feature_map.setLoadedFileType(filename);
49 feature_map.setLoadedFilePath(filename);
50
51 Internal::FeatureXMLHandler handler(feature_map, filename);
52 handler.setOptions(options_);
53 handler.setLogType(getLogType());
54 parse_(filename, &handler);
55
56 // !!! Hack: set feature FWHM from meta info entries as
57 // long as featureXML doesn't support a width entry.
58 // See also hack in BaseFeature::setWidth().
59 for (auto& feature : feature_map)
60 {
61 if (feature.metaValueExists("FWHM"))
62 {
63 feature.setWidth((double)feature.getMetaValue("FWHM"));
64 }
65 }
66
67 // put ranges into defined state
68 feature_map.updateRanges();
69 }
70
71 void FeatureXMLFile::store(const String& filename, const FeatureMap& feature_map)
72 {

Callers 3

alignFunction · 0.95
mainFunction · 0.95

Calls 9

setLoadedFileTypeMethod · 0.80
setLoadedFilePathMethod · 0.80
setLogTypeMethod · 0.80
metaValueExistsMethod · 0.80
getMetaValueMethod · 0.80
clearMethod · 0.45
setOptionsMethod · 0.45
setWidthMethod · 0.45
updateRangesMethod · 0.45

Tested by

no test coverage detected