35 #ifndef OPENMS_FORMAT_XMASSFILE_H
36 #define OPENMS_FORMAT_XMASSFILE_H
83 template <
class PeakType>
100 while (spectrum.size() < acqus.getSize())
105 spectrum.push_back(p);
112 spectrum.
setName(
"Xmass analysis file " + acqus.getParam(
"$ID_raw"));
114 spectrum.
setNativeID(
"spectrum=xsd:" + acqus.getParam(
"$ID_raw").remove(
'<').remove(
'>'));
121 if (acqus.getParam(
".IONIZATION MODE") ==
"LD+")
125 else if (acqus.getParam(
".IONIZATION MODE") ==
"LD-")
142 source_file.
setFileSize(4.0 * acqus.getSize() / 1024 / 1024);
143 source_file.
setFileType(
"Xmass analysis file (fid)");
148 software.
setName(
"FlexControl");
149 String fc_ver = acqus.getParam(
"$FCVer");
152 fc_ver = fc_ver.
suffix(
' ');
156 fc_ver = fc_ver.
prefix(
'>');
159 software.
setMetaValue(
"Acquisition method",
DataValue(acqus.getParam(
"$ACQMETH").remove(
'<').remove(
'>')));
161 std::set<DataProcessing::ProcessingAction> actions;
168 std::vector<DataProcessing> data_processing_vector;
169 data_processing_vector.push_back(data_processing);
181 template <
class PeakType>
188 Instrument & instrument = experimental_settings.getInstrument();
189 instrument.
setName(acqus.getParam(
"SPECTROMETER/DATASYSTEM"));
190 instrument.
setVendor(acqus.getParam(
"ORIGIN"));
191 instrument.
setModel(acqus.getParam(
"$InstrID").remove(
'<').remove(
'>'));
193 std::vector<IonSource> & ionSourceList = instrument.
getIonSources();
194 ionSourceList.clear();
195 ionSourceList.resize(1);
196 if (acqus.getParam(
".INLET") ==
"DIRECT")
205 if (acqus.getParam(
".IONIZATION MODE") ==
"LD+")
209 else if (acqus.getParam(
".IONIZATION MODE") ==
"LD-")
217 ionSourceList[0].setMetaValue(
"MALDI target reference",
DataValue(acqus.getParam(
"$TgIDS").remove(
'<').remove(
'>')));
218 ionSourceList[0].setOrder(0);
220 std::vector<MassAnalyzer> & massAnalyzerList = instrument.
getMassAnalyzers();
221 massAnalyzerList.clear();
222 massAnalyzerList.resize(1);
223 if (acqus.getParam(
".SPECTROMETER TYPE") ==
"TOF")
233 date.
set(acqus.getParam(
"$AQ_DATE").remove(
'<').remove(
'>'));
234 experimental_settings.setDateTime(date);
242 template <
typename SpectrumType>
251 #endif // OPENMS_FORMAT_XMASSFILE_H
Description of the applied preprocessing steps.
Definition: DataProcessing.h:51
void load(const String &filename, MSSpectrum< PeakType > &spectrum)
Loads a spectrum from a XMass file.
Definition: XMassFile.h:84
Description of a MS instrument.
Definition: Instrument.h:64
void setAcquisitionInfo(const AcquisitionInfo &acquisition_info)
sets the acquisition info
Description of the settings a MS Instrument was run with.
Definition: InstrumentSettings.h:48
A more convenient string class.
Definition: String.h:57
const std::vector< IonSource > & getIonSources() const
returns a const reference to the ion source list
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:55
void setZoomScan(bool zoom_scan)
sets if this scan is a zoom (enhanced resolution) scan
void set(UInt month, UInt day, UInt year, UInt hour, UInt minute, UInt second)
sets data from six integers
void setInstrumentSettings(const InstrumentSettings &instrument_settings)
sets the instrument settings of the current spectrum
Description of the combination of raw data to a single spectrum.
Definition: AcquisitionInfo.h:53
bool hasSuffix(const String &string) const
true if String ends with string, false otherwise
void setVendor(const String &vendor)
sets the instrument vendor
const std::vector< MassAnalyzer > & getMassAnalyzers() const
returns a const reference to the mass analyzer list
void setFileType(const String &file_type)
sets the file type
void setScanMode(ScanMode scan_mode)
sets the scan mode
void setComment(const String &comment)
sets the free-text comment
void setProcessingActions(const std::set< ProcessingAction > &actions)
sets the description of the applied processing
void setPolarity(IonSource::Polarity polarity)
sets the polarity
void setName(const String &name)
sets the name of the instrument
Description of a file location, used to store the origin of (meta) data.
Definition: SourceFile.h:47
void setName(const String &name)
Sets the name.
Definition: MSSpectrum.h:277
File not found exception.
Definition: Exception.h:524
Description of the software used for processing.
Definition: Software.h:49
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
File adapter for 'XMass Analysis (fid)' files.
Definition: XMassFile.h:66
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:167
Class to hold strings, numeric values, lists of strings and lists of numeric values.
Definition: DataValue.h:57
void setCompletionTime(const DateTime &completion_time)
sets the time of completion taking a DateTime object
Read-only fid File handler for XMass Analysis.
Definition: FidHandler.h:52
void setFileSize(float file_size)
sets the file size in MB
const ExperimentalSettings & getExperimentalSettings() const
returns the meta information of this experiment (const access)
Definition: MSExperiment.h:689
void setSoftware(const Software &software)
sets the software used for processing
void setMSLevel(UInt ms_level)
Sets the MS level.
Definition: MSSpectrum.h:265
void setPosition(const PositionType &position)
Mutable access to the position.
Definition: Peak2D.h:185
void clear(bool clear_meta_data)
Clears all data and meta data.
Definition: MSSpectrum.h:635
void setRT(double rt)
Sets the absolute retention time (is seconds)
Definition: MSSpectrum.h:249
void setNameOfFile(const String &name_of_file)
sets the file name
void setVersion(const String &version)
sets the software version
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:69
void setSourceFile(const SourceFile &source_file)
sets the source file
void setType(SpectrumType type)
sets the spectrum type
void store(const String &, const SpectrumType &)
Stores a spectrum in a XMass file (not available)
Definition: XMassFile.h:243
void setMethodOfCombination(const String &method_of_combination)
sets the method of combination
String prefix(SizeType length) const
returns the prefix of length length
void setDataProcessing(const std::vector< DataProcessing > &data_processing)
sets the description of the applied processing
DateTime Class.
Definition: DateTime.h:55
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
void setNativeID(const String &native_id)
sets the native identifier for the spectrum, used by the acquisition software.
Read-only acqus File handler for XMass Analysis.
Definition: AcqusHandler.h:53
void importExperimentalSettings(const String &filename, MSExperiment< PeakType > &exp)
Import settings from a XMass file.
Definition: XMassFile.h:182
static DateTime now()
Returns the current date and time.
void setName(const String &name)
sets the name of the software
void setModel(const String &model)
sets the instrument model
void setPathToFile(const String &path_path_to_file)
sets the file path
String suffix(SizeType length) const
returns the suffix of length length
Not implemented exception.
Definition: Exception.h:437
Description of the experimental settings.
Definition: ExperimentalSettings.h:59
bool hasPrefix(const String &string) const
true if String begins with string, false otherwise