OpenMS
Loading...
Searching...
No Matches
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.
 
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()

template<class SpectrumType >
IsInCollisionEnergyRange ( double  min,
double  max,
bool  reverse = false 
)
inline

Constructor.

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

Member Function Documentation

◆ operator()()

Member Data Documentation

◆ max_energy_

template<class SpectrumType >
double max_energy_
private

◆ min_energy_

template<class SpectrumType >
double min_energy_
private

◆ reverse_

template<class SpectrumType >
bool reverse_
private