| OpenMS 2.5.0

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

Predicate that determines if a spectrum's precursor is within a certain m/z range. More...

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

Inheritance diagram for InPrecursorMZRange< SpectrumType >:

## Public Member Functions

| InPrecursorMZRange (const double &mz_left, const double &mz_right, bool reverse=false)
| Constructor. More...
bool | operator() (const SpectrumType &s) const

## Protected Attributes

double | mz_left_
double | mz_right_
bool | reverse_

## Detailed Description

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

Predicate that determines if a spectrum's precursor is within a certain m/z range.

SpectrumType must have a getPrecursors() method

If multiple precursors are present, all must fulfill the range criterion.

## Constructor & Destructor Documentation

## ◆ InPrecursorMZRange()

InPrecursorMZRange | ( | const double & | mz_left,
|  | const double & | mz_right,
|  | bool | reverse = `false`
| ) |  |

inline

Constructor.

Parameters

  mz_left | left m/z boundary (closed interval)
  mz_right | right m/z boundary (closed interval)
  reverse | if `reverse` is true, operator() returns true if the precursor's m/z is outside of the given interval.

## Member Function Documentation

## ◆ operator()()

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

inline

References SpectrumSettings::getPrecursors(), InPrecursorMZRange< SpectrumType >::mz_right_, and InPrecursorMZRange< SpectrumType >::reverse_.

## Member Data Documentation

## ◆ mz_left_

double mz_left_

protected

## ◆ mz_right_

double mz_right_

protected

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

## ◆ reverse_

bool reverse_

protected

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