The following example (Tutorial_FileIO.C) demonstrates the use of MzDataFile and MzXMLFile to convert one format into another using MSExperiment to hold the temporary data:
Int main() { MzXMLFile mzxml; MzDataFile mzdata; // temporary data storage MSExperiment<RawDataPoint1D> map; // convert MzXML to MzData mzxml.load("Tutorial_FileIO.mzXML",map); mzdata.store("Tutorial_FileIO.mzData",map); return 0; } //end of main
MSExperiment<> in;
FileHandler handler();
handler.loadExperiment("input.mzData",in);
The following example (Tutorial_Param.C) shows how a file description is given.
Int main() { Param param; param.setValue("file:name","test.xml"); param.setValue("file:size(MB)",572.3); param.setValue("file:data:min_int",0); param.setValue("file:data:max_int",16459); cout << "Name : " << (String)(param.getValue("file:name")) << endl; cout << "Size : " << (Real)(param.getValue("file:size(MB)")) << endl; cout << "Min int: " << (UInt)(param.getValue("file:data:min_int")) << endl; cout << "Max int: " << (UInt)(param.getValue("file:data:max_int")) << endl; return 0; } //end of main
Generated Tue Apr 1 15:36:40 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |