22 #define CACHED_MZML_FILE_IDENTIFIER 8094
120 std::vector<OpenSwath::BinaryDataArrayPtr> data = readSpectrumFast(ifs, ms_level, rt);
134 static std::vector<OpenSwath::BinaryDataArrayPtr>
readSpectrumFast(std::ifstream& ifs,
int& ms_level,
double& rt);
148 std::vector<OpenSwath::BinaryDataArrayPtr> data = readChromatogramFast(ifs);
192 static inline void readDataFast_(std::ifstream& ifs, std::vector<OpenSwath::BinaryDataArrayPtr>& data,
const Size& data_size,
193 const Size& nr_float_arrays);
An class that uses on-disk caching to read and write spectra and chromatograms.
Definition: CachedMzMLHandler.h:41
static void readDataFast_(std::ifstream &ifs, std::vector< OpenSwath::BinaryDataArrayPtr > &data, const Size &data_size, const Size &nr_float_arrays)
helper method for fast reading of spectra and chromatograms
void writeSpectrum_(const SpectrumType &spectrum, std::ofstream &ofs) const
write a single spectrum to filestream
std::vector< DatumSingleton > Datavector
Definition: CachedMzMLHandler.h:54
const std::vector< std::streampos > & getChromatogramIndex() const
Access to a constant copy of the binary chromatogram index.
MSChromatogram ChromatogramType
Definition: CachedMzMLHandler.h:49
void writeChromatogram_(const ChromatogramType &chromatogram, std::ofstream &ofs) const
write a single chromatogram to filestream
static std::vector< OpenSwath::BinaryDataArrayPtr > readSpectrumFast(std::ifstream &ifs, int &ms_level, double &rt)
Fast access to a spectrum.
static void readSpectrum(SpectrumType &spectrum, std::ifstream &ifs)
Read a single spectrum directly into an OpenMS MSSpectrum (assuming file is already at the correct po...
double DoubleType
Definition: CachedMzMLHandler.h:43
MSSpectrum SpectrumType
Definition: CachedMzMLHandler.h:48
std::vector< std::streampos > chrom_index_
Definition: CachedMzMLHandler.h:197
void readMemdump(MapType &exp_reading, const String &filename) const
Read all spectra from a dump from the disk.
static void readSpectrumFast(OpenSwath::BinaryDataArrayPtr &data1, OpenSwath::BinaryDataArrayPtr &data2, std::ifstream &ifs, int &ms_level, double &rt)
fast access to a spectrum (a direct copy of the data into the provided arrays)
Definition: CachedMzMLHandler.h:114
std::vector< std::streampos > spectra_index_
Members.
Definition: CachedMzMLHandler.h:196
int IntType
Definition: CachedMzMLHandler.h:42
CachedMzMLHandler()
Default constructor.
void writeMetadata_x(const MapType &exp, const String &out_meta, bool addCacheMetaValue=false)
Write only the meta data of an MSExperiment.
void createMemdumpIndex(const String &filename)
Create an index on the location of all the spectra and chromatograms.
static void readChromatogram(ChromatogramType &chromatogram, std::ifstream &ifs)
Read a single chromatogram directly into an OpenMS MSChromatogram (assuming file is already at the co...
const std::vector< std::streampos > & getSpectraIndex() const
Access to a constant copy of the binary spectra index.
static void readChromatogramFast(OpenSwath::BinaryDataArrayPtr &data1, OpenSwath::BinaryDataArrayPtr &data2, std::ifstream &ifs)
Fast access to a chromatogram.
Definition: CachedMzMLHandler.h:145
PeakMap MapType
Definition: CachedMzMLHandler.h:47
CachedMzMLHandler & operator=(const CachedMzMLHandler &rhs)
Assignment operator.
void writeMetadata(MapType exp, const String &out_meta, bool addCacheMetaValue=false)
Write only the meta data of an MSExperiment.
static std::vector< OpenSwath::BinaryDataArrayPtr > readChromatogramFast(std::ifstream &ifs)
Fast access to a chromatogram.
double DatumSingleton
Definition: CachedMzMLHandler.h:52
~CachedMzMLHandler() override
Default destructor.
void writeMemdump(const MapType &exp, const String &out) const
Write complete spectra as a dump to the disk.
The representation of a chromatogram.
Definition: MSChromatogram.h:30
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
A more convenient string class.
Definition: String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
boost::shared_ptr< BinaryDataArray > BinaryDataArrayPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:53