35 #ifndef OPENMS_FORMAT_DATAACCESS_MSDATAWRITINGCONSUMER_H 36 #define OPENMS_FORMAT_DATAACCESS_MSDATAWRITINGCONSUMER_H 47 #include <boost/shared_ptr.hpp> 130 virtual void setExpectedSize(
Size expectedSpectra,
Size expectedChromatograms);
140 virtual void consumeSpectrum(SpectrumType & s);
150 virtual void consumeChromatogram(ChromatogramType &
c);
166 virtual Size getNrSpectraWritten();
171 virtual Size getNrChromatogramsWritten();
182 virtual void processSpectrum_(SpectrumType & s) = 0;
189 virtual void processChromatogram_(ChromatogramType &
c) = 0;
197 virtual void doCleanup_();
227 std::vector<std::vector< ConstDataProcessingPtr > >
dps_;
279 #endif // OPENMS_FORMAT_DATAACCESS_MSDATAWRITINGCONSUMER_H Description of the applied preprocessing steps.
Definition: DataProcessing.h:52
A more convenient string class.
Definition: String.h:57
bool writing_spectra_
Stores whether we are currently writing spectra.
Definition: MSDataWritingConsumer.h:207
Consumer class that writes MS data to disk using the mzML format.
Definition: MSDataWritingConsumer.h:241
void processChromatogram_(MapType::ChromatogramType &)
Process a chromatogram before storing to disk.
Definition: MSDataWritingConsumer.h:245
The representation of a chromatogram.
Definition: MSChromatogram.h:55
Semantically validates MzXML files.
Definition: MzMLValidator.h:49
Consumer class that perform no operation.
Definition: MSDataWritingConsumer.h:259
std::ofstream ofs_
File stream (to write mzML)
Definition: MSDataWritingConsumer.h:202
Size spectra_expected_
Number of spectra expected.
Definition: MSDataWritingConsumer.h:215
ExperimentalSettings settings_
Experimental settings to use for the whole file.
Definition: MSDataWritingConsumer.h:225
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
bool writing_chromatograms_
Stores whether we are currently writing chromatograms.
Definition: MSDataWritingConsumer.h:209
std::vector< std::vector< ConstDataProcessingPtr > > dps_
Vector of data processing objects -> will be filled by writeHeader_.
Definition: MSDataWritingConsumer.h:227
bool add_dataprocessing_
Whether to add dataprocessing term to the data before writing.
Definition: MSDataWritingConsumer.h:219
Definition: MzMLHandler.h:114
void setExperimentalSettings(const ExperimentalSettings &)
Set experimental settings for the whole file.
Definition: MSDataWritingConsumer.h:265
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
PlainMSDataWritingConsumer(String filename)
Definition: MSDataWritingConsumer.h:249
void processSpectrum_(MapType::SpectrumType &)
Process a spectrum before storing to disk.
Definition: MSDataWritingConsumer.h:244
MapType::SpectrumType SpectrumType
Definition: MSDataWritingConsumer.h:96
boost::shared_ptr< DataProcessing > DataProcessingPtr
Definition: DataProcessing.h:127
void consumeSpectrum(SpectrumType &)
Consume a spectrum.
Definition: MSDataWritingConsumer.h:266
void consumeChromatogram(ChromatogramType &)
Consume a chromatogram.
Definition: MSDataWritingConsumer.h:267
void processSpectrum_(MapType::SpectrumType &)
Process a spectrum before storing to disk.
Definition: MSDataWritingConsumer.h:272
MapType::ChromatogramType ChromatogramType
Definition: MSDataWritingConsumer.h:97
Internal::MzMLValidator * validator_
Validator that knows about CV terms.
Definition: MSDataWritingConsumer.h:222
bool started_writing_
Stores whether we have already started writing any data.
Definition: MSDataWritingConsumer.h:205
void doCleanup_()
Cleanup function called by the destructor.
Definition: MSDataWritingConsumer.h:271
void processChromatogram_(MapType::ChromatogramType &)
Process a chromatogram before storing to disk.
Definition: MSDataWritingConsumer.h:273
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
PeakMap MapType
Definition: MSDataWritingConsumer.h:95
Consumer class that writes MS data to disk using the mzML format.
Definition: MSDataWritingConsumer.h:89
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
The interface of a consumer of spectra and chromatograms.
Definition: IMSDataConsumer.h:68
Size chromatograms_expected_
Number of chromatograms expected.
Definition: MSDataWritingConsumer.h:217
NoopMSDataWritingConsumer(String filename)
Definition: MSDataWritingConsumer.h:264
Size chromatograms_written_
Number of chromatograms written.
Definition: MSDataWritingConsumer.h:213
Description of the experimental settings.
Definition: ExperimentalSettings.h:59
Size spectra_written_
Number of spectra written.
Definition: MSDataWritingConsumer.h:211
DataProcessingPtr additional_dataprocessing_
The dataprocessing to be added to each spectrum/chromatogram.
Definition: MSDataWritingConsumer.h:229