ProteoWizard
Public Member Functions
pwiz::msdata::SpectrumList Class Reference

Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW, mzXML, mzML). More...

#include <MSData.hpp>

Inheritance diagram for pwiz::msdata::SpectrumList:
pwiz::msdata::SpectrumListBase pwiz::msdata::SpectrumListSimple pwiz::msdata::SpectrumListWrapper MyBase pwiz::msdata::detail::SpectrumList_ABI pwiz::msdata::detail::SpectrumList_ABI_T2D pwiz::msdata::detail::SpectrumList_Agilent pwiz::msdata::detail::SpectrumList_Bruker pwiz::msdata::detail::SpectrumList_Thermo pwiz::msdata::detail::SpectrumList_Waters pwiz::msdata::SpectrumList_BTDX pwiz::msdata::SpectrumList_MGF pwiz::msdata::SpectrumList_MSn pwiz::msdata::SpectrumList_mz5 pwiz::msdata::SpectrumList_mzML pwiz::msdata::SpectrumList_mzXML pwiz::analysis::SpectrumList_ChargeStateCalculator pwiz::analysis::SpectrumList_Filter pwiz::analysis::SpectrumList_MetadataFixer pwiz::analysis::SpectrumList_MZWindow pwiz::analysis::SpectrumList_PeakFilter pwiz::analysis::SpectrumList_PeakPicker pwiz::analysis::SpectrumList_PrecursorRecalculator pwiz::analysis::SpectrumList_PrecursorRefine pwiz::analysis::SpectrumList_Smoother pwiz::analysis::SpectrumList_Sorter pwiz::analysis::SpectrumList_TitleMaker pwiz::analysis::SpectrumList_ZeroSamplesFilter pwiz::msdata::SpectrumListCache

List of all members.

Public Member Functions

virtual size_t size () const =0
 returns the number of spectra
virtual bool empty () const
 returns true iff (size() == 0) and (dataProcessingPtr.get() == NULL)
virtual const SpectrumIdentityspectrumIdentity (size_t index) const =0
 access to a spectrum index
virtual size_t find (const std::string &id) const
 find id in the spectrum index (returns size() on failure)
virtual IndexList findNameValue (const std::string &name, const std::string &value) const
 find all spectrum indexes with specified name/value pair
virtual IndexList findSpotID (const std::string &spotID) const
 find all spectrum indexes with spotID (returns empty vector on failure)
virtual SpectrumPtr spectrum (size_t index, bool getBinaryData=false) const =0
 retrieve a spectrum by index
virtual SpectrumPtr spectrum (const SpectrumPtr &seed, bool getBinaryData) const
 get a copy of the seed spectrum, optionally with its binary data populated this is useful for formats like mzML that can delay loading of binary data
virtual SpectrumPtr spectrum (size_t index, DetailLevel detailLevel) const
 retrieve a spectrum by index
virtual const
boost::shared_ptr< const
DataProcessing
dataProcessingPtr () const
 returns the data processing affecting spectra retrieved through this interface
virtual ~SpectrumList ()

Detailed Description

Interface for accessing spectra, which may be stored in memory or backed by a data file (RAW, mzXML, mzML).

Implementation notes:

Definition at line 651 of file MSData.hpp.


Constructor & Destructor Documentation

virtual pwiz::msdata::SpectrumList::~SpectrumList ( )
inlinevirtual

Definition at line 701 of file MSData.hpp.

{}

Member Function Documentation

virtual size_t pwiz::msdata::SpectrumList::size ( ) const
pure virtual
virtual bool pwiz::msdata::SpectrumList::empty ( ) const
virtual

returns true iff (size() == 0) and (dataProcessingPtr.get() == NULL)

Reimplemented in pwiz::msdata::SpectrumListSimple, and pwiz::msdata::SpectrumListWrapper.

virtual const SpectrumIdentity& pwiz::msdata::SpectrumList::spectrumIdentity ( size_t  index) const
pure virtual
virtual size_t pwiz::msdata::SpectrumList::find ( const std::string &  id) const
virtual
virtual IndexList pwiz::msdata::SpectrumList::findNameValue ( const std::string &  name,
const std::string &  value 
) const
virtual

find all spectrum indexes with specified name/value pair

Referenced by testSpectrumListSimple().

virtual IndexList pwiz::msdata::SpectrumList::findSpotID ( const std::string &  spotID) const
virtual

find all spectrum indexes with spotID (returns empty vector on failure)

virtual SpectrumPtr pwiz::msdata::SpectrumList::spectrum ( size_t  index,
bool  getBinaryData = false 
) const
pure virtual
virtual SpectrumPtr pwiz::msdata::SpectrumList::spectrum ( const SpectrumPtr seed,
bool  getBinaryData 
) const
inlinevirtual

get a copy of the seed spectrum, optionally with its binary data populated this is useful for formats like mzML that can delay loading of binary data

  • client may assume the underlying Spectrum* is valid

Definition at line 681 of file MSData.hpp.

{
return spectrum(seed->index, getBinaryData); // default implementation
};
virtual SpectrumPtr pwiz::msdata::SpectrumList::spectrum ( size_t  index,
DetailLevel  detailLevel 
) const
inlinevirtual

retrieve a spectrum by index

  • detailLevel determines what fields are guaranteed present on the spectrum after the call
  • client may assume the underlying Spectrum* is valid

Reimplemented in pwiz::analysis::SpectrumList_Filter, pwiz::msdata::detail::SpectrumList_Thermo, pwiz::msdata::SpectrumListWrapper, pwiz::msdata::detail::SpectrumList_Agilent, pwiz::msdata::detail::SpectrumList_Waters, and pwiz::msdata::detail::SpectrumList_ABI.

Definition at line 688 of file MSData.hpp.

References pwiz::msdata::DetailLevel_FastMetadata, pwiz::msdata::DetailLevel_FullData, and pwiz::msdata::DetailLevel_InstantMetadata.

{
// By default faster metadeta access is not implemented
if (detailLevel == DetailLevel_FastMetadata || detailLevel == DetailLevel_InstantMetadata)
return SpectrumPtr(new Spectrum);
return spectrum(index, detailLevel == DetailLevel_FullData);
}
virtual const boost::shared_ptr<const DataProcessing> pwiz::msdata::SpectrumList::dataProcessingPtr ( ) const
virtual

returns the data processing affecting spectra retrieved through this interface

  • may return a null shared pointer

Reimplemented in pwiz::msdata::SpectrumListSimple, pwiz::msdata::SpectrumListWrapper, pwiz::msdata::SpectrumListBase, and MyBase.

Referenced by pwiz::msdata::TextWriter::operator()(), and testSpectrumListSimple().


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