95 template <
class MetaContainer>
97 std::unary_function<MetaContainer, bool>
131 template <
class SpectrumType>
133 std::unary_function<SpectrumType, bool>
144 InRTRange(
double min,
double max,
bool reverse =
false) :
152 double tmp = s.
getRT();
154 return reverse_ ^ (min_ <= tmp && tmp <= max_);
169 template <
class SpectrumType>
171 std::unary_function<SpectrumType, bool>
190 return reverse_ ^
std::find(levels_.begin(), levels_.end(), tmp) != levels_.end();
205 template <
class SpectrumType>
207 std::unary_function<SpectrumType, bool>
240 template <
class SpectrumType>
242 std::unary_function<SpectrumType, bool>
276 template <
class SpectrumType>
278 std::unary_function<SpectrumType, bool>
307 template <
class SpectrumType>
309 std::unary_function<SpectrumType, bool>
341 template <
class SpectrumType>
343 std::unary_function<SpectrumType, bool>
362 for (std::set<Precursor::ActivationMethod>::const_iterator it_a = it->getActivationMethods().begin();
363 it_a != it->getActivationMethods().end();
393 template <
class SpectrumType>
395 std::unary_function<SpectrumType, bool>
416 if (!(mz_left_ <= it->getMZ() && it->getMZ() <= mz_right_))
442 template <
class SpectrumType>
444 std::unary_function<SpectrumType, bool>
464 Int tmp = it->getCharge();
465 match = match || (
std::find(charges_.begin(), charges_.end(), tmp) != charges_.end());
487 template <
class PeakType>
489 std::unary_function<PeakType, bool>
500 InMzRange(
double min,
double max,
bool reverse =
false) :
510 return reverse_ ^ (min_ <= tmp && tmp <= max_);
525 template <
class PeakType>
527 std::unary_function<PeakType, bool>
547 return reverse_ ^ (min_ <= tmp && tmp <= max_);
562 template <
class SpectrumType>
564 std::unary_function<SpectrumType, bool>
586 bool hasCollisionEnergy =
false;
589 if (it->metaValueExists(
"collision energy"))
591 hasCollisionEnergy =
true;
592 double cE = it->getMetaValue(
"collision energy");
593 isIn |= !(cE > max_energy_ || cE < min_energy_);
598 if (!hasCollisionEnergy)
return false;
615 template <
class SpectrumType>
617 std::unary_function<SpectrumType, bool>
642 const double isolationWindowSize = it->getIsolationWindowUpperOffset() + it->getIsolationWindowLowerOffset();
643 isIn |= !(isolationWindowSize > max_size_ || isolationWindowSize < min_size_);
661 template <
class SpectrumType>
663 std::unary_function<SpectrumType, bool>
677 std::sort(vec_mz_.begin(), vec_mz_.end());
688 if (it->getIsolationWindowLowerOffset() == 0 || it->getIsolationWindowUpperOffset() == 0)
690 OPENMS_LOG_WARN <<
"IsInIsolationWindow(): Lower/Upper Offset for Precursor Isolation Window is Zero! " <<
691 "Filtering will probably be too strict (unless you hit the exact precursor m/z)!" << std::endl;
693 const double lower_mz = it->getMZ() - it->getIsolationWindowLowerOffset();
694 std::vector<double>::const_iterator it_mz = std::lower_bound(vec_mz_.begin(), vec_mz_.end(), lower_mz);
695 if (it_mz != vec_mz_.end())
697 const double upper_mz = it->getMZ() + it->getIsolationWindowUpperOffset();
698 isIn |= (*it_mz <= upper_mz);
IntensityType getIntensity() const
Definition: Peak2D.h:166
InMzRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:500
bool reverse_
Definition: RangeUtils.h:195
bool reverse_
Definition: RangeUtils.h:230
Predicate that determines if a class has a certain metavalue.
Definition: RangeUtils.h:96
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:680
InPrecursorMZRange(const double &mz_left, const double &mz_right, bool reverse=false)
Constructor.
Definition: RangeUtils.h:405
bool reverse_
Definition: RangeUtils.h:120
bool reverse_
Definition: RangeUtils.h:381
bool reverse_
Definition: RangeUtils.h:430
double min_
Definition: RangeUtils.h:551
Predicate that determines if a spectrum is empty.
Definition: RangeUtils.h:277
double min_size_
Definition: RangeUtils.h:651
Predicate that determines if a spectrum lies inside/outside a specific MS level set.
Definition: RangeUtils.h:170
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
bool operator()(const PeakType &p) const
Definition: RangeUtils.h:543
bool reverse_
Definition: RangeUtils.h:297
StringList methods_
Definition: RangeUtils.h:380
bool reverse_
Definition: RangeUtils.h:606
bool reverse_
Definition: RangeUtils.h:652
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:290
Predicate that determines if a peak lies inside/outside a specific m/z range.
Definition: RangeUtils.h:488
Predicate that determines if a spectrum was generated using any activation method given in the constr...
Definition: RangeUtils.h:342
bool operator()(const PeakType &p) const
Definition: RangeUtils.h:506
bool reverse_
Definition: RangeUtils.h:515
UInt getMSLevel() const
Returns the MS level.
IsEmptySpectrum(bool reverse=false)
Constructor.
Definition: RangeUtils.h:286
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:411
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:322
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:580
InIntensityRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:537
Predicate that determines if an MSn spectrum was generated with a collision energy in the given range...
Definition: RangeUtils.h:563
IsInIsolationWindow(std::vector< double > vec_mz, bool reverse=false)
Constructor.
Definition: RangeUtils.h:673
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:222
IsZoomSpectrum(bool reverse=false)
Constructor.
Definition: RangeUtils.h:318
Predicate that determines if a spectrum has a certain scan polarity.
Definition: RangeUtils.h:241
HasScanMode(Int mode, bool reverse=false)
Constructor.
Definition: RangeUtils.h:217
Predicate that determines if a spectrum lies inside/outside a specific retention time range...
Definition: RangeUtils.h:132
bool reverse_
Definition: RangeUtils.h:159
HasScanPolarity(Int polarity, bool reverse=false)
Constructor.
Definition: RangeUtils.h:252
double mz_left_
Definition: RangeUtils.h:428
IsInIsolationWindowSizeRange(double min_size, double max_size, bool reverse=false)
Constructor.
Definition: RangeUtils.h:628
Predicate that determines if a spectrum has a certain precursor charge as given in the constructor li...
Definition: RangeUtils.h:443
double min_
Definition: RangeUtils.h:158
HasMetaValue(String metavalue, bool reverse=false)
Constructor.
Definition: RangeUtils.h:106
bool getZoomScan() const
return if this scan is a zoom (enhanced resolution) scan
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:459
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged...
Definition: LogStream.h:460
Predicate that determines if a spectrum is a zoom (enhanced resolution) spectrum. ...
Definition: RangeUtils.h:308
bool reverse_
Definition: RangeUtils.h:329
Predicate that determines if a spectrum has a certain scan mode.
Definition: RangeUtils.h:206
PositionType const & getPosition() const
Non-mutable access to the position.
Definition: Peak2D.h:178
Int polarity_
Definition: RangeUtils.h:264
ScanMode getScanMode() const
returns the scan mode
std::vector< double > vec_mz_
Definition: RangeUtils.h:707
double mz_right_
Definition: RangeUtils.h:429
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:634
Predicate that determines if the isolation window covers ANY of the given m/z values.
Definition: RangeUtils.h:662
InMSLevelRange(const IntList &levels, bool reverse=false)
Constructor.
Definition: RangeUtils.h:181
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:257
Predicate that determines if a peak lies inside/outside a specific intensity range.
Definition: RangeUtils.h:526
double min_energy_
Definition: RangeUtils.h:605
HasPrecursorCharge(const IntList &charges, bool reverse=false)
Constructor.
Definition: RangeUtils.h:454
bool reverse_
Definition: RangeUtils.h:552
const InstrumentSettings & getInstrumentSettings() const
returns a const reference to the instrument settings of the current spectrum
Predicate that determines if a spectrum's precursor is within a certain m/z range.
Definition: RangeUtils.h:394
static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD]
Names of activation methods.
Definition: Precursor.h:94
static bool contains(const std::vector< T > &container, const E &elem)
Checks whether the element elem is contained in the given container.
Definition: ListUtils.h:146
bool operator()(const MetaContainer &s) const
Definition: RangeUtils.h:111
bool reverse_
Definition: RangeUtils.h:265
double min_
Definition: RangeUtils.h:514
Predicate that determines if the width of the isolation window of an MSn spectrum is in the given ran...
Definition: RangeUtils.h:616
IsInCollisionEnergyRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:574
A more convenient string class.
Definition: String.h:58
IntList levels_
Definition: RangeUtils.h:194
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:150
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:358
bool reverse_
Definition: RangeUtils.h:474
InRTRange(double min, double max, bool reverse=false)
Constructor.
Definition: RangeUtils.h:144
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:54
Int mode_
Definition: RangeUtils.h:229
HasActivationMethod(const StringList &methods, bool reverse=false)
Constructor.
Definition: RangeUtils.h:353
String metavalue_key_
Definition: RangeUtils.h:119
IonSource::Polarity getPolarity() const
returns the polarity
bool operator()(const SpectrumType &s) const
Definition: RangeUtils.h:186
IntList charges_
Definition: RangeUtils.h:473
bool reverse_
Definition: RangeUtils.h:708
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:55
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46