ProteoWizard
Functions | Variables
Pep2MzIdentTest.cpp File Reference
#include "Pep2MzIdent.hpp"
#include "Serializer_mzid.hpp"
#include <iostream>
#include <string>

Go to the source code of this file.

Functions

void test ()
 
int main (int argc, char **argv)
 

Variables

ostream * os_ = NULL
 
const char * samplePepXML
 

Function Documentation

void test ( )

Definition at line 89 of file Pep2MzIdentTest.cpp.

References os_, pwiz::data::pepxml::MSMSPipelineAnalysis::read(), samplePepXML, pwiz::identdata::Pep2MzIdent::translate(), and pwiz::identdata::Serializer_mzIdentML::write().

90 {
91  istringstream iss(samplePepXML);
93  mspa.read(iss);
94 
95  Pep2MzIdent translator(mspa);
96  IdentDataPtr result(translator.translate());
97 
98  Serializer_mzIdentML serializer;
99  ostringstream oss;
100  serializer.write(oss, *result);
101 
102  if (os_)
103  *os_ << oss.str() << endl;
104 
105 }
int main ( int  argc,
char **  argv 
)

Definition at line 107 of file Pep2MzIdentTest.cpp.

References os_, and test().

108 {
109  if (argc>1 && !strcmp(argv[1],"-v")) os_ = &cout;
110 
111  cout << "\ntesting Pep2MzIdent ... \n" << endl;
112  test();
113  return 0;
114 }

Variable Documentation

ostream* os_ = NULL

Definition at line 31 of file Pep2MzIdentTest.cpp.

const char* samplePepXML

Definition at line 33 of file Pep2MzIdentTest.cpp.