50 #include <boost/shared_ptr.hpp>
95 indexed_mzml_file_.openFile(filename);
96 if (filename !=
"" && !skipMetaData)
98 loadMetaData_(filename);
100 return indexed_mzml_file_.getParsingSuccess();
105 filename_(source.filename_),
106 indexed_mzml_file_(source.indexed_mzml_file_),
107 meta_ms_experiment_(source.meta_ms_experiment_)
146 if (!meta_ms_experiment_)
return false;
148 return meta_ms_experiment_->isSorted(
false);
154 return getNrSpectra();
160 return getNrSpectra() == 0;
166 return indexed_mzml_file_.getNrSpectra();
172 return indexed_mzml_file_.getNrChromatograms();
178 return boost::static_pointer_cast<const ExperimentalSettings>(meta_ms_experiment_);
183 return meta_ms_experiment_;
189 return getSpectrum(n);
199 if (!meta_ms_experiment_)
return indexed_mzml_file_.getMSSpectrumById(
int(
id));
201 MSSpectrum spectrum(meta_ms_experiment_->operator[](
id));
202 indexed_mzml_file_.getMSSpectrumById(
int(
id), spectrum);
211 return indexed_mzml_file_.getSpectrumById((
int)
id);
221 if (!meta_ms_experiment_)
return indexed_mzml_file_.getMSChromatogramById(
int(
id));
223 MSChromatogram chromatogram(meta_ms_experiment_->getChromatogram(
id));
224 indexed_mzml_file_.getMSChromatogramById(
int(
id), chromatogram);
247 return indexed_mzml_file_.getChromatogramById(
id);
253 indexed_mzml_file_.setSkipXMLChecks(skip);
A 1-dimensional raw data point or peak for chromatograms.
Definition: ChromatogramPeak.h:54
A low-level class to read an indexedmzML file.
Definition: IndexedMzMLHandler.h:80
The representation of a chromatogram.
Definition: MSChromatogram.h:58
The representation of a 1D spectrum.
Definition: MSSpectrum.h:71
Representation of a mass spectrometry experiment on disk.
Definition: OnDiscMSExperiment.h:69
MSSpectrum getSpectrum(Size id)
returns a single spectrum
Definition: OnDiscMSExperiment.h:197
boost::shared_ptr< PeakMap > getMetaData() const
Definition: OnDiscMSExperiment.h:181
void setSkipXMLChecks(bool skip)
sets whether to skip some XML checks and be fast instead
Definition: OnDiscMSExperiment.h:251
MSSpectrum getMetaSpectrumById_(const std::string &id)
Internal::IndexedMzMLHandler indexed_mzml_file_
The index of the underlying data file.
Definition: OnDiscMSExperiment.h:272
OpenMS::Interfaces::SpectrumPtr getSpectrumById(Size id)
returns a single spectrum
Definition: OnDiscMSExperiment.h:209
bool operator!=(const OnDiscMSExperiment &rhs) const
Inequality operator.
Definition: OnDiscMSExperiment.h:133
OpenMS::Interfaces::ChromatogramPtr getChromatogramById(Size id)
returns a single chromatogram
Definition: OnDiscMSExperiment.h:245
Size getNrSpectra() const
get the total number of spectra available
Definition: OnDiscMSExperiment.h:164
bool isSortedByRT() const
Checks if all spectra are sorted with respect to ascending RT.
Definition: OnDiscMSExperiment.h:144
String filename_
The filename of the underlying data file.
Definition: OnDiscMSExperiment.h:270
void loadMetaData_(const String &filename)
OnDiscMSExperiment & operator=(const OnDiscMSExperiment &)
Private Assignment operator -> we cannot copy file streams in IndexedMzMLHandler.
bool empty() const
returns whether spectra are empty
Definition: OnDiscMSExperiment.h:158
Size getNrChromatograms() const
get the total number of chromatograms available
Definition: OnDiscMSExperiment.h:170
MSSpectrum operator[](Size n)
alias for getSpectrum
Definition: OnDiscMSExperiment.h:187
MSChromatogram getChromatogram(Size id)
returns a single chromatogram
Definition: OnDiscMSExperiment.h:219
bool operator==(const OnDiscMSExperiment &rhs) const
Equality operator.
Definition: OnDiscMSExperiment.h:118
Peak1D PeakT
Definition: OnDiscMSExperiment.h:72
bool openFile(const String &filename, bool skipMetaData=false)
Open a specific file on disk.
Definition: OnDiscMSExperiment.h:92
boost::shared_ptr< PeakMap > meta_ms_experiment_
The meta-data.
Definition: OnDiscMSExperiment.h:274
OnDiscMSExperiment()
Constructor.
Definition: OnDiscMSExperiment.h:81
MSChromatogram getChromatogramByNativeId(const std::string &id)
returns a single chromatogram
boost::shared_ptr< const ExperimentalSettings > getExperimentalSettings() const
returns the meta information of this experiment (const access)
Definition: OnDiscMSExperiment.h:176
ChromatogramPeak ChromatogramPeakT
Definition: OnDiscMSExperiment.h:71
std::unordered_map< std::string, Size > spectra_native_ids_
Mapping of spectra native ids to offsets.
Definition: OnDiscMSExperiment.h:278
Size size() const
alias for getNrSpectra
Definition: OnDiscMSExperiment.h:152
MSSpectrum getSpectrumByNativeId(const std::string &id)
returns a single spectrum
std::unordered_map< std::string, Size > chromatograms_native_ids_
Mapping of chromatogram native ids to offsets.
Definition: OnDiscMSExperiment.h:276
MSChromatogram getMetaChromatogramById_(const std::string &id)
OnDiscMSExperiment(const OnDiscMSExperiment &source)
Copy constructor.
Definition: OnDiscMSExperiment.h:104
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
A more convenient string class.
Definition: String.h:61
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openms/include/OpenMS/INTERFACES/DataStructures.h:156
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: openms/include/OpenMS/INTERFACES/DataStructures.h:236
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
OpenMS::OnDiscMSExperiment OnDiscPeakMap
Definition: OnDiscMSExperiment.h:281