OpenMS
InPrecursorMZRange< SpectrumType > Class Template Reference

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

#include <OpenMS/KERNEL/RangeUtils.h>

Collaboration diagram for InPrecursorMZRange< SpectrumType >:
[legend]

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_leftleft m/z boundary (closed interval)
mz_rightright m/z boundary (closed interval)
reverseif reverse is true, operator() returns true if the precursor's m/z is outside of the given interval.

Member Function Documentation

◆ operator()()

Member Data Documentation

◆ mz_left_

double mz_left_
protected

◆ mz_right_

double mz_right_
protected

◆ reverse_

bool reverse_
protected