35 #ifndef OPENMS_KERNEL_ONDISCMSEXPERIMENT_H
36 #define OPENMS_KERNEL_ONDISCMSEXPERIMENT_H
51 #include <boost/shared_ptr.hpp>
66 template <
typename PeakT = Peak1D,
typename ChromatogramPeakT = ChromatogramPeak>
95 f.setOptions(options);
190 spectrum.reserve(mz_arr->data.size());
191 for (
Size i = 0; i < mz_arr->data.size(); i++)
194 p.setMZ(mz_arr->data[i]);
195 p.setIntensity(int_arr->data[i]);
196 spectrum.push_back(p);
222 chromatogram.reserve(rt_arr->data.size());
223 for (
Size i = 0; i < rt_arr->data.size(); i++)
226 p.setRT(rt_arr->data[i]);
227 p.setIntensity(int_arr->data[i]);
228 chromatogram.push_back(p);
258 #endif // OPENMS_KERNEL_ONDISCMSEXPERIMENT_H
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: openms/include/OpenMS/INTERFACES/DataStructures.h:237
MSChromatogram< ChromatogramPeakT > getChromatogram(Size id)
returns a single chromatogram
Definition: OnDiscMSExperiment.h:214
Size getNrChromatograms() const
get the total number of chromatograms available
Definition: OnDiscMSExperiment.h:160
OnDiscMSExperiment(const String &filename)
Constructor.
Definition: OnDiscMSExperiment.h:79
bool operator!=(const OnDiscMSExperiment &rhs) const
Inequality operator.
Definition: OnDiscMSExperiment.h:125
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openms/include/OpenMS/INTERFACES/DataStructures.h:157
A more convenient string class.
Definition: String.h:57
boost::shared_ptr< MSExperiment<> > meta_ms_experiment_
The meta-data.
Definition: OnDiscMSExperiment.h:253
The representation of a chromatogram.
Definition: MSChromatogram.h:52
Size size() const
alias for getNrSpectra
Definition: OnDiscMSExperiment.h:142
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
Definition: openms/include/OpenMS/INTERFACES/DataStructures.h:81
OnDiscMSExperiment & operator=(const OnDiscMSExperiment &)
Private Assignment operator -> we cannot copy file streams in IndexedMzMLFile.
Definition: OnDiscMSExperiment.h:244
OpenMS::Interfaces::ChromatogramPtr getChromatogramById(int id)
Retrieve the raw data for the chromatogram at position "id".
bool isSortedByRT() const
Checks if all spectra are sorted with respect to ascending RT.
Definition: OnDiscMSExperiment.h:136
MSSpectrum< PeakT > operator[](Size n)
alias for getSpectrum
Definition: OnDiscMSExperiment.h:172
void openFile(String filename)
Open a file.
String filename_
The filename of the underlying data file.
Definition: OnDiscMSExperiment.h:249
size_t getNrChromatograms() const
Returns the number of chromatograms available.
File adapter for MzML files.
Definition: MzMLFile.h:55
Representation of a mass spectrometry experiment on disk.
Definition: OnDiscMSExperiment.h:67
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
size_t getNrSpectra() const
Returns the number of spectra available.
OnDiscMSExperiment()
Definition: OnDiscMSExperiment.h:71
bool openFile(const String &filename)
Definition: OnDiscMSExperiment.h:84
A class to read an indexedmzML file.
Definition: IndexedMzMLFile.h:70
OpenMS::Interfaces::SpectrumPtr getSpectrumById(Size id)
returns a single spectrum
Definition: OnDiscMSExperiment.h:204
OpenMS::Interfaces::ChromatogramPtr getChromatogramById(Size id)
returns a single chromatogram
Definition: OnDiscMSExperiment.h:237
boost::shared_ptr< const ExperimentalSettings > getExperimentalSettings() const
returns the meta information of this experiment (const access)
Definition: OnDiscMSExperiment.h:166
bool operator==(const OnDiscMSExperiment &rhs) const
Equality operator.
Definition: OnDiscMSExperiment.h:116
OpenMS::Interfaces::SpectrumPtr getSpectrumById(int id)
Retrieve the raw data for the spectrum at position "id".
OnDiscMSExperiment(const OnDiscMSExperiment &source)
Copy constructor.
Definition: OnDiscMSExperiment.h:102
MSSpectrum< PeakT > getSpectrum(Size id)
returns a single spectrum
Definition: OnDiscMSExperiment.h:182
Size getNrSpectra() const
get the total number of spectra available
Definition: OnDiscMSExperiment.h:154
Options for loading files containing peak data.
Definition: PeakFileOptions.h:48
IndexedMzMLFile indexed_mzml_file_
The index of the underlying data file.
Definition: OnDiscMSExperiment.h:251
void setFillData(bool only)
sets whether to fill the actual data into the container (spectrum/chromatogram)
bool empty() const
returns whether spectra are empty
Definition: OnDiscMSExperiment.h:148
Description of the experimental settings.
Definition: ExperimentalSettings.h:59
bool getParsingSuccess() const
Returns whether parsing was successful.