#include <OpenMS/FORMAT/HANDLERS/MzDataHandler.h>
MapType has to be a MSExperiment or have the same interface. Do not use this class. It is only needed in MzDataFile.
Public Member Functions | |
virtual void | endElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname) |
Parsing method for closing tags. | |
virtual void | startElement (const XMLCh *const , const XMLCh *const , const XMLCh *const qname, const xercesc::Attributes &attributes) |
Parsing method for opening tags. | |
virtual void | characters (const XMLCh *const chars, const unsigned int length) |
Parsing method for character data. | |
void | writeTo (std::ostream &os) |
Writes the contents to a stream. | |
void | setOptions (const PeakFileOptions &opt) |
template<> | |
void | writeDerivedPeakSupplementalData_ (std::ostream &os, DPeakArray< PickedPeak1D > const &container) |
template<> | |
void | readPeakSupplementalData_ (PickedPeak1D &peak, UInt n) |
Constructors and destructor | |
MzDataHandler (MapType &exp, const String &filename, const String &version, ProgressLogger &logger) | |
Constructor for a write-only handler. | |
MzDataHandler (const MapType &exp, const String &filename, const String &version, const ProgressLogger &logger) | |
Constructor for a read-only handler. | |
virtual | ~MzDataHandler () |
Destructor. | |
Protected Types | |
typedef MapType::PeakType | PeakType |
Peak type. | |
typedef MSSpectrum< PeakType, std::allocator< PeakType > > | SpectrumType |
Spectrum type. | |
Protected Member Functions | |
void | fillData_ () |
fills the experiment with peaks | |
void | cvParam_ (const String &name, const String &value) |
read attributes of MzData's cvParamType | |
void | writeBinary_ (std::ostream &os, UInt size, const String &tag, const String &desc="", int id=-1) |
write binary data to stream (first one) | |
template<typename ContainerType> | |
void | writeDerivedPeakSupplementalData_ (std::ostream &, ContainerType const &) |
Write supplemental data for derived classes of DPeak, e.g. for picked peaks. Default is to do nothing. | |
template<typename PeakType> | |
void | readPeakSupplementalData_ (PeakType &, UInt) |
Read supplemental data for derived classes of DPeak, e.g. for picked peaks. Default is to do nothing. | |
double | getDecodedValue_ (UInt lindex, UInt vindex) |
Returns value with the index vindex of the decoded array with the index lindex . | |
Protected Attributes | |
MapType * | exp_ |
map pointer for reading | |
const MapType * | cexp_ |
map pointer for writing | |
PeakFileOptions | options_ |
Options that can be set for loading/storing. | |
Base64 | decoder_ |
Decoder/Encoder for Base64-data in MzData. | |
UInt | spec_write_counter_ |
spectrum counter (needed because spectra without peaks are not written) | |
bool | in_description_ |
Flag that indicates that of the parser is in a description. | |
bool | skip_spectrum_ |
Flag that indicates wether this spectrum should be skipped (due to options). | |
const ProgressLogger & | logger_ |
Progress logger. | |
temporary datastructures to hold parsed data | |
UInt | peak_count_ |
SpectrumType | spec_ |
String | meta_id_ |
std::vector< String > | data_to_decode_ |
encoded data which is read and has to be decoded | |
std::vector< Real > | data_to_encode_ |
floating point numbers which have to be encoded and written | |
std::vector< std::vector< Real > > | decoded_list_ |
std::vector< std::vector < DoubleReal > > | decoded_double_list_ |
std::vector< String > | array_name_ |
std::vector< String > | precisions_ |
std::vector< String > | endians_ |
std::stringstream | exp_sett_ |
stream to collect experimental settings | |
Private Member Functions | |
MzDataHandler () | |
Not impelmented. |
typedef MapType::PeakType PeakType [protected] |
Peak type.
typedef MSSpectrum<PeakType, std::allocator<PeakType> > SpectrumType [protected] |
Spectrum type.
MzDataHandler | ( | MapType & | exp, | |
const String & | filename, | |||
const String & | version, | |||
ProgressLogger & | logger | |||
) | [inline] |
Constructor for a write-only handler.
MzDataHandler | ( | const MapType & | exp, | |
const String & | filename, | |||
const String & | version, | |||
const ProgressLogger & | logger | |||
) | [inline] |
Constructor for a read-only handler.
virtual ~MzDataHandler | ( | ) | [inline, virtual] |
Destructor.
MzDataHandler | ( | ) | [private] |
Not impelmented.
void endElement | ( | const XMLCh * | uri, | |
const XMLCh * | localname, | |||
const XMLCh *const | qname | |||
) | [inline, virtual] |
void startElement | ( | const XMLCh * | uri, | |
const XMLCh * | localname, | |||
const XMLCh *const | qname, | |||
const xercesc::Attributes & | attrs | |||
) | [inline, virtual] |
void characters | ( | const XMLCh *const | chars, | |
const unsigned int | length | |||
) | [inline, virtual] |
void writeTo | ( | std::ostream & | os | ) | [inline, virtual] |
void setOptions | ( | const PeakFileOptions & | opt | ) | [inline] |
void fillData_ | ( | ) | [inline, protected] |
fills the experiment with peaks
read attributes of MzData's cvParamType
Example: <cvParam cvLabel="psi" accession="PSI:1000001" name="name"
value="value"/>
name
and sometimes value
are defined in the MzData ontology.
void writeBinary_ | ( | std::ostream & | os, | |
UInt | size, | |||
const String & | tag, | |||
const String & | desc = "" , |
|||
int | id = -1 | |||
) | [inline, protected] |
write binary data to stream (first one)
void writeDerivedPeakSupplementalData_ | ( | std::ostream & | , | |
ContainerType const & | ||||
) | [inline, protected] |
Write supplemental data for derived classes of DPeak, e.g. for picked peaks. Default is to do nothing.
Read supplemental data for derived classes of DPeak, e.g. for picked peaks. Default is to do nothing.
Returns value with the index vindex
of the decoded array with the index lindex
.
void writeDerivedPeakSupplementalData_< DPeakArray< PickedPeak1D > > | ( | std::ostream & | os, | |
DPeakArray< PickedPeak1D > const & | container | |||
) | [inline] |
void readPeakSupplementalData_< PickedPeak1D > | ( | PickedPeak1D & | peak, | |
UInt | n | |||
) | [inline] |
MapType* exp_ [protected] |
map pointer for reading
const MapType* cexp_ [protected] |
map pointer for writing
PeakFileOptions options_ [protected] |
Options that can be set for loading/storing.
UInt peak_count_ [protected] |
SpectrumType spec_ [protected] |
std::vector<String> data_to_decode_ [protected] |
encoded data which is read and has to be decoded
std::vector<Real> data_to_encode_ [protected] |
floating point numbers which have to be encoded and written
std::vector<std::vector<Real> > decoded_list_ [protected] |
std::vector<std::vector<DoubleReal> > decoded_double_list_ [protected] |
std::vector<String> array_name_ [protected] |
std::vector<String> precisions_ [protected] |
std::stringstream exp_sett_ [protected] |
stream to collect experimental settings
UInt spec_write_counter_ [protected] |
spectrum counter (needed because spectra without peaks are not written)
bool in_description_ [protected] |
Flag that indicates that of the parser is in a description.
bool skip_spectrum_ [protected] |
Flag that indicates wether this spectrum should be skipped (due to options).
const ProgressLogger& logger_ [protected] |
Progress logger.
Generated Tue Apr 1 15:36:49 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |