70 template <
class MetaContainer>
105 template <
class SpectrumType>
117 InRTRange(
double min,
double max,
bool reverse =
false) :
125 double tmp = s.
getRT();
142 template <
class SpectrumType>
177 template <
class SpectrumType>
211 template <
class SpectrumType>
246 template <
class SpectrumType>
276 template <
class SpectrumType>
309 template <
class SpectrumType>
357 template <
class SpectrumType>
379 if (!(mz_left_ <= it->getMZ() && it->getMZ() <=
mz_right_))
405 template <
class SpectrumType>
426 Int tmp = it->getCharge();
449 template <
class PeakType>
461 InMzRange(
double min,
double max,
bool reverse =
false) :
486 template <
class PeakType>
522 template <
class SpectrumType>
545 bool hasCollisionEnergy =
false;
548 if (it->metaValueExists(
"collision energy"))
550 hasCollisionEnergy =
true;
551 double cE = it->getMetaValue(
"collision energy");
557 if (!hasCollisionEnergy)
return false;
574 template <
class SpectrumType>
600 const double isolationWindowSize = it->getIsolationWindowUpperOffset() + it->getIsolationWindowLowerOffset();
619 template <
class SpectrumType>
645 if (it->getIsolationWindowLowerOffset() == 0 || it->getIsolationWindowUpperOffset() == 0)
647 OPENMS_LOG_WARN <<
"IsInIsolationWindow(): Lower/Upper Offset for Precursor Isolation Window is Zero! " <<
648 "Filtering will probably be too strict (unless you hit the exact precursor m/z)!" << std::endl;
650 const double lower_mz = it->getMZ() - it->getIsolationWindowLowerOffset();
651 std::vector<double>::const_iterator it_mz = std::lower_bound(
vec_mz_.begin(),
vec_mz_.end(), lower_mz);
654 const double upper_mz = it->getMZ() + it->getIsolationWindowUpperOffset();
655 isIn |= (*it_mz <= upper_mz);
#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:447
Predicate that determines if a spectrum was generated using any activation method given in the constr...
Definition RangeUtils.h:311
HasActivationMethod(const StringList &methods, bool reverse=false)
Constructor.
Definition RangeUtils.h:320
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:325
StringList methods_
Definition RangeUtils.h:344
bool reverse_
Definition RangeUtils.h:345
Predicate that determines if a spectrum has a certain precursor charge as given in the constructor li...
Definition RangeUtils.h:407
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:421
HasPrecursorCharge(const IntList &charges, bool reverse=false)
Constructor.
Definition RangeUtils.h:416
IntList charges_
Definition RangeUtils.h:435
bool reverse_
Definition RangeUtils.h:436
Predicate that determines if a spectrum has a certain scan mode.
Definition RangeUtils.h:179
Int mode_
Definition RangeUtils.h:200
HasScanMode(Int mode, bool reverse=false)
Constructor.
Definition RangeUtils.h:188
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:193
bool reverse_
Definition RangeUtils.h:201
Predicate that determines if a spectrum has a certain scan polarity.
Definition RangeUtils.h:213
IonSource::Polarity polarity_
Definition RangeUtils.h:234
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:227
HasScanPolarity(IonSource::Polarity polarity, bool reverse=false)
Constructor.
Definition RangeUtils.h:222
bool reverse_
Definition RangeUtils.h:235
Predicate that determines if a peak lies inside/outside a specific intensity range.
Definition RangeUtils.h:488
double max_
Definition RangeUtils.h:511
InIntensityRange(double min, double max, bool reverse=false)
Constructor.
Definition RangeUtils.h:497
double min_
Definition RangeUtils.h:511
bool operator()(const PeakType &p) const
Definition RangeUtils.h:503
bool reverse_
Definition RangeUtils.h:512
Predicate that determines if a spectrum lies inside/outside a specific MS level set.
Definition RangeUtils.h:144
InMSLevelRange(const IntList &levels, bool reverse=false)
Constructor.
Definition RangeUtils.h:153
IntList levels_
Definition RangeUtils.h:166
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:158
bool reverse_
Definition RangeUtils.h:167
Predicate that determines if a peak lies inside/outside a specific m/z range.
Definition RangeUtils.h:451
double max_
Definition RangeUtils.h:475
InMzRange(double min, double max, bool reverse=false)
Constructor.
Definition RangeUtils.h:461
double min_
Definition RangeUtils.h:475
bool operator()(const PeakType &p) const
Definition RangeUtils.h:467
bool reverse_
Definition RangeUtils.h:476
Predicate that determines if a spectrum's precursor is within a certain m/z range.
Definition RangeUtils.h:359
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:374
double mz_right_
Definition RangeUtils.h:392
InPrecursorMZRange(const double &mz_left, const double &mz_right, bool reverse=false)
Constructor.
Definition RangeUtils.h:368
double mz_left_
Definition RangeUtils.h:391
bool reverse_
Definition RangeUtils.h:393
Predicate that determines if a spectrum lies inside/outside a specific retention time range.
Definition RangeUtils.h:107
double max_
Definition RangeUtils.h:131
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:123
InRTRange(double min, double max, bool reverse=false)
Constructor.
Definition RangeUtils.h:117
double min_
Definition RangeUtils.h:131
bool reverse_
Definition RangeUtils.h:132
ScanMode getScanMode() const
returns the scan mode
IonSource::Polarity getPolarity() const
returns the polarity
bool getZoomScan() const
return if this scan is a zoom (enhanced resolution) scan
Polarity
Polarity of the ion source.
Definition IonSource.h:119
Predicate that determines if a spectrum is empty.
Definition RangeUtils.h:248
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:259
IsEmptySpectrum(bool reverse=false)
Constructor.
Definition RangeUtils.h:255
bool reverse_
Definition RangeUtils.h:266
Predicate that determines if an MSn spectrum was generated with a collision energy in the given range...
Definition RangeUtils.h:524
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:539
IsInCollisionEnergyRange(double min, double max, bool reverse=false)
Constructor.
Definition RangeUtils.h:533
double min_energy_
Definition RangeUtils.h:564
double max_energy_
Definition RangeUtils.h:564
bool reverse_
Definition RangeUtils.h:565
Predicate that determines if the width of the isolation window of an MSn spectrum is in the given ran...
Definition RangeUtils.h:576
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:592
double max_size_
Definition RangeUtils.h:609
double min_size_
Definition RangeUtils.h:609
IsInIsolationWindowSizeRange(double min_size, double max_size, bool reverse=false)
Constructor.
Definition RangeUtils.h:586
bool reverse_
Definition RangeUtils.h:610
Predicate that determines if the isolation window covers ANY of the given m/z values.
Definition RangeUtils.h:621
IsInIsolationWindow(std::vector< double > vec_mz, bool reverse=false)
Constructor.
Definition RangeUtils.h:630
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:637
std::vector< double > vec_mz_
Definition RangeUtils.h:664
bool reverse_
Definition RangeUtils.h:665
Predicate that determines if a spectrum is a zoom (enhanced resolution) spectrum.
Definition RangeUtils.h:278
bool operator()(const SpectrumType &s) const
Definition RangeUtils.h:290
IsZoomSpectrum(bool reverse=false)
Constructor.
Definition RangeUtils.h:286
bool reverse_
Definition RangeUtils.h:297
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:137
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
UInt getMSLevel() const
Returns the MS level.
A 2-dimensional raw data point or peak.
Definition Peak2D.h:30
PositionType const & getPosition() const
Non-mutable access to the position.
Definition Peak2D.h:155
IntensityType getIntensity() const
Definition Peak2D.h:143
Precursor meta information.
Definition Precursor.h:37
static const std::string NamesOfActivationMethod[static_cast< size_t >(ActivationMethod::SIZE_OF_ACTIVATIONMETHOD)]
Names of activation methods.
Definition Precursor.h:84
ActivationMethod
Method of activation.
Definition Precursor.h:61
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
const InstrumentSettings & getInstrumentSettings() const
returns a const reference to the instrument settings of the current spectrum
A more convenient string class.
Definition String.h:34
int Int
Signed integer type.
Definition Types.h:72
std::vector< Int > IntList
Vector of signed integers.
Definition ListUtils.h:29
std::vector< String > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19