| OpenMS 2.5.0

Public Member Functions | Private Attributes | List of all members
IsInIsolationWindow< SpectrumType > Class Template Reference
Kernel » RangeUtils

Predicate that determines if the isolation window covers ANY of the given m/z values. More...

`#include <OpenMS/KERNEL/RangeUtils.h>`

Inheritance diagram for IsInIsolationWindow< SpectrumType >:

## Public Member Functions

| IsInIsolationWindow (std::vector< double > vec_mz, bool reverse=false)
| Constructor. More...
bool | operator() (const SpectrumType &s) const

## Private Attributes

std::vector< double > | vec_mz_
bool | reverse_

## Detailed Description

### template<class SpectrumType>
class OpenMS::IsInIsolationWindow< SpectrumType >

Predicate that determines if the isolation window covers ANY of the given m/z values.

Note
  This predicate will return always true for spectra with getMSLevel() = 1.

## Constructor & Destructor Documentation

## ◆ IsInIsolationWindow()

IsInIsolationWindow | ( | std::vector< double > | vec_mz,
|  | bool | reverse = `false`
| ) |  |

inline

Constructor.

Parameters

  vec_mz | Vector of m/z values, of which at least one needs to be covered
  reverse | if `reverse` is true, operator() returns true if the isolation window is outside for ALL m/z values.

References IsInIsolationWindow< SpectrumType >::vec_mz_.

## Member Function Documentation

## ◆ operator()()

bool operator() | ( | const SpectrumType & | s | ) | const

inline

References MSSpectrum::getMSLevel(), SpectrumSettings::getPrecursors(), OPENMS_LOG_WARN, IsInIsolationWindow< SpectrumType >::reverse_, and IsInIsolationWindow< SpectrumType >::vec_mz_.

## Member Data Documentation

## ◆ reverse_

bool reverse_

private

Referenced by IsInIsolationWindow< SpectrumType >::operator()().

## ◆ vec_mz_

std::vector<double> vec_mz_

private

Referenced by IsInIsolationWindow< SpectrumType >::IsInIsolationWindow(), and IsInIsolationWindow< SpectrumType >::operator()().