| 62 | |
| 63 | |
| 64 | Size SpectrumLookup::findByNativeID(const String& native_id) const |
| 65 | { |
| 66 | map<String, Size>::const_iterator pos = ids_.find(native_id); |
| 67 | if (pos == ids_.end()) |
| 68 | { |
| 69 | String element = "spectrum with native ID '" + native_id + "'"; |
| 70 | throw Exception::ElementNotFound(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION, |
| 71 | element); |
| 72 | } |
| 73 | return pos->second; |
| 74 | } |
| 75 | |
| 76 | |
| 77 | Size SpectrumLookup::findByIndex(Size index, bool count_from_one) const |
no test coverage detected