ProteoWizard
Public Member Functions
EvenMS2Predicate Struct Reference
Inheritance diagram for EvenMS2Predicate:
pwiz::analysis::SpectrumList_Filter::Predicate

List of all members.

Public Member Functions

virtual tribool accept (const SpectrumIdentity &spectrumIdentity) const
 return values: true: accept the Spectrum false: reject the Spectrum indeterminate: need to see the full Spectrum object to decide
virtual tribool accept (const Spectrum &spectrum) const
 return true iff Spectrum is accepted
- Public Member Functions inherited from pwiz::analysis::SpectrumList_Filter::Predicate
virtual msdata::DetailLevel suggestedDetailLevel () const
 can be overridden in subclasses that know they will need a certain detail level; it must be overridden to return DetailLevel_FullData if binary data is needed
virtual bool done () const
 return true iff done accepting spectra; this allows early termination of the iteration through the original SpectrumList, possibly using assumptions about the order of the iteration (e.g.
virtual ~Predicate ()

Detailed Description

Definition at line 171 of file SpectrumList_FilterTest.cpp.


Member Function Documentation

virtual tribool EvenMS2Predicate::accept ( const SpectrumIdentity spectrumIdentity) const
inlinevirtual

return values: true: accept the Spectrum false: reject the Spectrum indeterminate: need to see the full Spectrum object to decide

Implements pwiz::analysis::SpectrumList_Filter::Predicate.

Definition at line 173 of file SpectrumList_FilterTest.cpp.

References pwiz::msdata::SpectrumIdentity::index.

{
if (spectrumIdentity.index%2 != 0) return false;
return boost::logic::indeterminate;
}
virtual tribool EvenMS2Predicate::accept ( const Spectrum spectrum) const
inlinevirtual

return true iff Spectrum is accepted

Reimplemented from pwiz::analysis::SpectrumList_Filter::Predicate.

Definition at line 179 of file SpectrumList_FilterTest.cpp.

References pwiz::data::CVParam::cvid, CVID_Unknown, pwiz::cv::cvIsA(), pwiz::data::ParamContainer::cvParam(), pwiz::data::ParamContainer::cvParamChild(), MS_mass_spectrum, MS_ms_level, MS_spectrum_type, and pwiz::data::CVParam::valueAs().

{
if (param.cvid == CVID_Unknown) return boost::logic::indeterminate;
if (!cvIsA(param.cvid, MS_mass_spectrum))
return true; // MS level filter doesn't affect non-MS spectra
param = spectrum.cvParam(MS_ms_level);
if (param.cvid == CVID_Unknown) return boost::logic::indeterminate;
return (param.valueAs<int>() == 2);
}

The documentation for this struct was generated from the following file: