OpenMS
Loading...
Searching...
No Matches
HasPrecursorCharge< SpectrumType > Class Template Reference

Predicate that determines if a spectrum has a certain precursor charge as given in the constructor list. More...

#include <OpenMS/KERNEL/RangeUtils.h>

Collaboration diagram for HasPrecursorCharge< SpectrumType >:
[legend]

Public Member Functions

 HasPrecursorCharge (const IntList &charges, bool reverse=false)
 Constructor.
 
bool operator() (const SpectrumType &s) const
 

Protected Attributes

IntList charges_
 
bool reverse_
 

Detailed Description

template<class SpectrumType>
class OpenMS::HasPrecursorCharge< SpectrumType >

Predicate that determines if a spectrum has a certain precursor charge as given in the constructor list.

SpectrumType must have a getPrecursors() method

Constructor & Destructor Documentation

◆ HasPrecursorCharge()

template<class SpectrumType >
HasPrecursorCharge ( const IntList charges,
bool  reverse = false 
)
inline

Constructor.

Parameters
[in]chargesList of charges that is compared against precursor charge.
[in]reverseif reverse is true, operator() returns true if the spectrum has not one of the specified precursor charges.

Member Function Documentation

◆ operator()()

Member Data Documentation

◆ charges_

template<class SpectrumType >
IntList charges_
protected

◆ reverse_

template<class SpectrumType >
bool reverse_
protected