30 #include "boost/iostreams/positioning.hpp"
35 using namespace pwiz::util;
37 using namespace pwiz::data;
38 using namespace pwiz::msdata;
46 if (
os_) *
os_ <<
"testWriteRead() " << config << endl;
51 mzxmlSerializer.
write(oss, msd);
53 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
55 shared_ptr<istringstream> iss(
new istringstream(oss.str()));
57 mzxmlSerializer.
read(iss, msd2);
64 if (
os_ && diff) *
os_ << diff << endl;
103 int main(
int argc,
char* argv[])
109 if (argc>1 && !strcmp(argv[1],
"-v"))
os_ = &cout;
PWIZ_API_DECL const CV & cv(const std::string &prefix)
returns a CV object for the specified namespace (prefix); currently supported namespaces are: MS UO ...
void write(std::ostream &os, const MSData &msd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0) const
write MSData object to ostream as mzML; iterationListenerRegistry may be used to receive progress upd...
MSData <-> mzML stream serialization.
bool ignoreMetadata
ignore all file level metadata, and most scan level metadata, i.e.
void testWriteRead(const MSData &msd)
Calculate diffs of objects in a ProteoWizard data model hierarchy.
BinaryDataEncoder::Config binaryDataEncoderConfig
configuration for binary data encoding in write() note: byteOrder is ignored (mzXML always big endian...
void diff(const string &filename1, const string &filename2)
void write(std::ostream &os, const MSData &msd, const pwiz::util::IterationListenerRegistry *iterationListenerRegistry=0) const
write MSData object to ostream as mzXML; iterationListenerRegistry may be used to receive progress up...
Run run
a run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument...
PWIZ_API_DECL void write(minimxml::XMLWriter &writer, const CV &cv)
configuration struct for diffing MSData types
void read(boost::shared_ptr< std::istream > is, MSData &msd) const
read in MSData object from an mzXML istream note: istream may be managed by MSData's SpectrumList...
SpectrumListPtr spectrumListPtr
all mass spectra and the acquisitions underlying them are described and attached here. Subsidiary data arrays are also both described and attached here.
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
MSData <-> mzXML stream serialization.
Serializer_mzXML configuration.
#define TEST_PROLOG(argc, argv)
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Simple writeable in-memory implementation of SpectrumList.
bool indexed
(indexed==true): read/write with <index>