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

Method getType

src/openms/source/KERNEL/MSSpectrum.cpp:101–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 SpectrumSettings::SpectrumType MSSpectrum::getType(const bool query_data) const
102 {
103 SpectrumSettings::SpectrumType t = SpectrumSettings::getType();
104 // easy case: type is known
105 if (t != SpectrumSettings::UNKNOWN)
106 {
107 return t;
108 }
109 // Some conversion software only annotate "MS:1000525 spectrum representation" leading to an UNKNOWN type
110 // Fortunately, some store a data processing item that indicates that the data has been picked
111 for (auto& dp : getDataProcessing())
112 {
113 if (dp->getProcessingActions().count(DataProcessing::PEAK_PICKING) == 1)
114 {
115 return SpectrumSettings::CENTROID;
116 }
117 }
118
119 if (query_data)
120 {
121 return PeakTypeEstimator::estimateType(begin(), end());
122 }
123 return SpectrumSettings::UNKNOWN;
124 }
125
126 MSSpectrum::ConstIterator MSSpectrum::getBasePeak() const
127 {

Callers 15

foreachFunction · 0.45
logToolStartedMethod · 0.45
logToolFinishedMethod · 0.45
logToolFailedMethod · 0.45
logToolCrashedMethod · 0.45
visualize_Method · 0.45
addDataFileMethod · 0.45
toolStartedMethod · 0.45
toolFinishedMethod · 0.45
toolCrashedMethod · 0.45
toolFailedMethod · 0.45
update_Method · 0.45

Calls 4

getTypeFunction · 0.85
countMethod · 0.80
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected