OpenMS  2.8.0
Public Member Functions | Private Attributes | List of all members
IsInCollisionEnergyRange< SpectrumType > Class Template Reference

Predicate that determines if an MSn spectrum was generated with a collision energy in the given range. More...

#include <OpenMS/KERNEL/RangeUtils.h>

Collaboration diagram for IsInCollisionEnergyRange< SpectrumType >:
[legend]

Public Member Functions

 IsInCollisionEnergyRange (double min, double max, bool reverse=false)
 Constructor. More...
 
bool operator() (const SpectrumType &s) const
 

Private Attributes

double min_energy_
 
double max_energy_
 
bool reverse_
 

Detailed Description

template<class SpectrumType>
class OpenMS::IsInCollisionEnergyRange< SpectrumType >

Predicate that determines if an MSn spectrum was generated with a collision energy in the given range.

Note
This applies only to CID and HCD spectra. For spectra that do not have a collision energy, the predicate will return true.
This predicate will return always true for spectra with getMSLevel() = 1.

Constructor & Destructor Documentation

◆ IsInCollisionEnergyRange()

IsInCollisionEnergyRange ( double  min,
double  max,
bool  reverse = false 
)
inline

Constructor.

Parameters
minminimum collision energy to be included in the range.
maxmaximum collision energy to be included in the range.
reverseif reverse is true, operator() returns true if the collision energy lies outside the range.

Member Function Documentation

◆ operator()()

bool operator() ( const SpectrumType s) const
inline

Member Data Documentation

◆ max_energy_

double max_energy_
private

◆ min_energy_

double min_energy_
private

◆ reverse_

bool reverse_
private