35 #ifndef OPENMS_KERNEL_RANGEUTILS_H 
   36 #define OPENMS_KERNEL_RANGEUTILS_H 
   95   template <
class MetaContainer>
 
   97     std::unary_function<MetaContainer, bool>
 
  116         return !has_meta_value;
 
  118       return has_meta_value;
 
  134   template <
class SpectrumType>
 
  136     std::unary_function<SpectrumType, bool>
 
  160       return min_ <= tmp && max_ >= tmp;
 
  175   template <
class SpectrumType>
 
  177     std::unary_function<SpectrumType, bool>
 
  194       Int tmp = s.getMSLevel();
 
  214   template <
class SpectrumType>
 
  216     std::unary_function<SpectrumType, bool>
 
  235         return s.getInstrumentSettings().getScanMode() != 
mode_;
 
  237       return s.getInstrumentSettings().getScanMode() == 
mode_;
 
  252   template <
class SpectrumType>
 
  254     std::unary_function<SpectrumType, bool>
 
  286   template <
class SpectrumType>
 
  288     std::unary_function<SpectrumType, bool>
 
  305         return !s.getInstrumentSettings().getZoomScan();
 
  307       return s.getInstrumentSettings().getZoomScan();
 
  323   template <
class SpectrumType>
 
  325     std::unary_function<SpectrumType, bool>
 
  342       for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
 
  344         for (std::set<Precursor::ActivationMethod>::const_iterator it_a = it->getActivationMethods().begin();
 
  345              it_a != it->getActivationMethods().end();
 
  375   template <
class SpectrumType>
 
  377     std::unary_function<SpectrumType, bool>
 
  395       for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
 
  398         if (!(mz_left_ <= it->getMZ() && it->getMZ() <= 
mz_right_))
 
  424   template <
class SpectrumType>
 
  426     std::unary_function<SpectrumType, bool>
 
  444       for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
 
  446         Int tmp = it->getCharge();
 
  469   template <
class PeakType>
 
  471     std::unary_function<PeakType, bool>
 
  495       return min_ <= tmp && max_ >= tmp;
 
  510   template <
class PeakType>
 
  512     std::unary_function<PeakType, bool>
 
  535       return min_ <= tmp && max_ >= tmp;
 
  550   template <
class SpectrumType>
 
  552     std::unary_function<SpectrumType, bool>
 
  571       if (s.getMSLevel() == 1) 
return false;
 
  574       bool hasCollisionEnergy = 
false;
 
  575       for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
 
  577         if (it->metaValueExists(
"collision energy"))
 
  579           hasCollisionEnergy = 
true;
 
  580           DoubleReal cE = it->getMetaValue(
"collision energy");
 
  586       if (!hasCollisionEnergy) 
return false;
 
  603   template <
class SpectrumType>
 
  605     std::unary_function<SpectrumType, bool>
 
  625       if (s.getMSLevel() == 1) 
return false;
 
  628       for (std::vector<Precursor>::const_iterator it = s.getPrecursors().begin(); it != s.getPrecursors().end(); ++it)
 
  630         const DoubleReal isolationWindowSize = it->getIsolationWindowUpperOffset() + it->getIsolationWindowLowerOffset();
 
  645 #endif // OPENMS_KERNEL_RANGEUTILS_H 
IntList levels_
Definition: RangeUtils.h:203
Predicate that determines if a spectrum lies inside/outside a specific retention time range...
Definition: RangeUtils.h:135
DoubleReal max_energy_
Definition: RangeUtils.h:593
PositionType const & getPosition() const 
Non-mutable access to the position. 
Definition: Peak2D.h:173
DoubleReal mz_left_
Definition: RangeUtils.h:410
bool reverse_
Definition: RangeUtils.h:594
InMSLevelRange(const IntList &levels, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:187
bool reverse_
Definition: RangeUtils.h:276
A more convenient string class. 
Definition: String.h:56
InPrecursorMZRange(const DoubleReal &mz_left, const DoubleReal &mz_right, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:387
A 2-dimensional raw data point or peak. 
Definition: Peak2D.h:55
DoubleReal max_
Definition: RangeUtils.h:539
bool contains(const String &s) const 
Returns if a string is contained in the list. 
IntensityType getIntensity() const 
Definition: Peak2D.h:161
DoubleReal max_
Definition: RangeUtils.h:164
Predicate that determines if a spectrum has a certain scan mode. 
Definition: RangeUtils.h:215
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:340
bool reverse_
Definition: RangeUtils.h:363
DoubleReal max_size_
Definition: RangeUtils.h:639
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:393
bool reverse_
Definition: RangeUtils.h:242
bool reverse_
Definition: RangeUtils.h:640
DoubleReal mz_right_
Definition: RangeUtils.h:411
DoubleReal min_size_
Definition: RangeUtils.h:639
bool operator()(const PeakType &p) const 
Definition: RangeUtils.h:528
bool operator()(const PeakType &p) const 
Definition: RangeUtils.h:488
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:622
IsInIsolationWindowSizeRange(DoubleReal min_size, DoubleReal max_size, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:616
InIntensityRange(DoubleReal min, DoubleReal max, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:522
static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD]
Names of activation methods. 
Definition: Precursor.h:82
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:266
DoubleReal max_
Definition: RangeUtils.h:499
DoubleReal min_
Definition: RangeUtils.h:539
bool reverse_
Definition: RangeUtils.h:412
InMzRange(DoubleReal min, DoubleReal max, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:482
HasScanMode(Int mode, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:226
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:153
IsZoomSpectrum(bool reverse=false)
Constructor. 
Definition: RangeUtils.h:297
Predicate that determines if a spectrum lies inside/outside a specific MS level set. 
Definition: RangeUtils.h:176
IsEmptySpectrum(bool reverse=false)
Constructor. 
Definition: RangeUtils.h:262
bool reverse_
Definition: RangeUtils.h:165
Predicate that determines if a spectrum has a certain precursor charge as given in the constructor li...
Definition: RangeUtils.h:425
bool reverse_
Definition: RangeUtils.h:311
Predicate that determines if a peak lies inside/outside a specific intensity range. 
Definition: RangeUtils.h:511
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:231
bool reverse_
Definition: RangeUtils.h:204
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:441
Int mode_
Definition: RangeUtils.h:241
String list. 
Definition: StringList.h:56
bool reverse_
Definition: RangeUtils.h:540
InRTRange(DoubleReal min, DoubleReal max, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:147
IntList charges_
Definition: RangeUtils.h:455
StringList methods_
Definition: RangeUtils.h:362
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:301
HasActivationMethod(const StringList &methods, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:335
Predicate that determines if the width of the isolation window of an MSn spectrum is in the given ran...
Definition: RangeUtils.h:604
bool reverse_
Definition: RangeUtils.h:456
DoubleReal min_
Definition: RangeUtils.h:164
HasPrecursorCharge(const IntList &charges, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:436
Predicate that determines if a peak lies inside/outside a specific m/z range. 
Definition: RangeUtils.h:470
Predicate that determines if a spectrum's precursor is within a certain m/z range. 
Definition: RangeUtils.h:376
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:568
bool reverse_
Definition: RangeUtils.h:500
Predicate that determines if a spectrum is a zoom (enhanced resolution) spectrum. ...
Definition: RangeUtils.h:287
bool operator()(const SpectrumType &s) const 
Definition: RangeUtils.h:192
int Int
Signed integer type. 
Definition: Types.h:100
DoubleReal min_
Definition: RangeUtils.h:499
Predicate that determines if a spectrum was generated using any activation method given in the constr...
Definition: RangeUtils.h:324
Predicate that determines if an MSn spectrum was generated with a collision energy in the given range...
Definition: RangeUtils.h:551
Predicate that determines if a spectrum is empty. 
Definition: RangeUtils.h:253
IsInCollisionEnergyRange(DoubleReal min, DoubleReal max, bool reverse=false)
Constructor. 
Definition: RangeUtils.h:562
Int list. 
Definition: IntList.h:56
DoubleReal min_energy_
Definition: RangeUtils.h:593