The meta informations about an HPLC-MS experiment are stored in ExperimentalSettings and SpectrumSettings. All information that is not covered by these classes can be stored in the type-name-value data structure MetaInfo. All classes described in this section can be found in the METADATA folder.
DataValue is a data structure that can store any numerical or string information. It also supports casting of the stored value back to its original type.
MetaInfo is used to easily store information of any type, that does not fit into the other classes. It implements type-name-value triplets. The main data structure is an associative container that stores DataValue instances as values associated to string keys. Internally, the string keys are converted to integer keys for performance reasons i.e. a map<UInt,DataValue> is used.
The MetaInfoRegistry associates the string keys used in MetaValue with the integer values that are used for internal storage. The MetaInfoRegistry is a singleton.
If you want a class to have a MetaInfo member, simply derive it from MetaInfoInterface. This class provides a MetaInfo member and the interface to access it.
The following example (Tutorial_MetaInfo.cpp) shows how to use Metadata. We can simply set values for the string keys, and setMetaValue registers these names automatically. In order to access the values, we can either use the registered name or the index of the name. The getMetaValue method returns a DataValue, which has to be casted to the right type. If you do not know the type, you can use the DataValue::valueType() method.
This class holds meta information about the experiment that is valid for the whole experiment:
This class contains meta information about settings specific to one spectrum:
If you want to annotate the peaks or raw data points in your spectra with meta information, there are three different ways to do this with different advantages and disadvantages.
If each peak is annotated with the same type of information (e.g. width of a peak):
If you need to annotate only a small subset of the peaks with meta information:
OpenMS / TOPP release 2.3.0 | Documentation generated on Tue Jan 9 2018 18:22:05 using doxygen 1.8.13 |