11 #include <OpenMS/OPENSWATHALGO/OpenSwathAlgoConfig.h>
14 #include <boost/shared_ptr.hpp>
47 virtual boost::shared_ptr<ISpectrumAccess>
lightClone()
const = 0;
56 virtual std::vector<std::size_t>
getSpectraByRT(
double RT,
double deltaRT)
const = 0;
100 auto mz_it = mz_arr->data.cbegin();
101 auto int_it = int_arr->data.cbegin();
102 auto im_it = im_arr->data.cbegin();
103 auto mz_end = mz_arr->data.cend();
108 im_arr_out->description = im_arr->description;
110 while (mz_it != mz_end)
112 if ( (drift_start <= *im_it) && (drift_end >= *im_it) )
114 mz_arr_out->data.push_back( *mz_it );
115 intens_arr_out->data.push_back( *int_it );
116 im_arr_out->data.push_back( *im_it );
122 output->setMZArray(mz_arr_out);
123 output->setIntensityArray(intens_arr_out);
124 output->getDataArrays().push_back(im_arr_out);
The interface of a mass spectrometry experiment.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:30
SpectrumPtr getSpectrumById(int id, double drift_start, double drift_end)
Return pointer to a spectrum at the given id, the spectrum will be filtered by drift time.
virtual ChromatogramPtr getChromatogramById(int id)=0
Return a pointer to a chromatogram at the given id.
virtual std::vector< std::size_t > getSpectraByRT(double RT, double deltaRT) const =0
Return a vector of ids of spectra that are within RT +/- deltaRT.
virtual ~ISpectrumAccess()
Destructor.
static SpectrumPtr filterByDrift(const SpectrumPtr &input, double drift_start, double drift_end)
filters a spectrum by drift time, spectrum pointer returned is a copy
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:82
SpectrumSequence getMultipleSpectra(double RT, int nr_spectra_to_fetch)
virtual boost::shared_ptr< ISpectrumAccess > lightClone() const =0
Light clone operator to produce a copy for concurrent read access.
virtual SpectrumMeta getSpectrumMetaById(int id) const =0
Returns the meta information for a spectrum.
virtual SpectrumPtr getSpectrumById(int id)=0
Return a pointer to a spectrum at the given id.
virtual std::size_t getNrChromatograms() const =0
Returns the number of chromatograms available.
virtual size_t getNrSpectra() const =0
Returns the number of spectra available.
virtual std::string getChromatogramNativeID(int id) const =0
Returns the native id of the chromatogram at the given id.
SpectrumSequence getMultipleSpectra(double RT, int nr_spectra_to_fetch, double drift_start, double drift_end)
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::vector< OpenSwath::SpectrumPtr > SpectrumSequence
a vector of spectrum pointers that DIA scores can operate on, allows for clever integration of only t...
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:20
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:146
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:53
OpenMS::SpectrumSequence SpectrumSequence
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:25
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:276
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:131
The datastructures used by the OpenSwath interfaces.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:42
The structure that captures the generation of a peak list (including the underlying acquisitions)
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:181