| OpenMS 2.5.0

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

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

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

Inheritance diagram for IsInCollisionEnergyRange< SpectrumType >:

## 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

  min | minimum collision energy to be included in the range.
  max | maximum collision energy to be included in the range.
  reverse | if `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

References MSSpectrum::getMSLevel(), SpectrumSettings::getPrecursors(), IsInCollisionEnergyRange< SpectrumType >::max_energy_, IsInCollisionEnergyRange< SpectrumType >::min_energy_, and IsInCollisionEnergyRange< SpectrumType >::reverse_.

## Member Data Documentation

## ◆ max_energy_

double max_energy_

private

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

## ◆ min_energy_

double min_energy_

private

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

## ◆ reverse_

bool reverse_

private

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