42 if (
os_) *
os_ <<
"test(): indexed=\"" << boolalpha << indexed <<
"\"\n";
52 serializer.write(oss, tiny);
54 if (
os_) *
os_ <<
"oss:\n" << oss.str() << endl;
56 shared_ptr<istream> is(
new istringstream(oss.str()));
66 pg1->id =
"CommonMS1SpectrumParams";
71 pg2->id =
"CommonMS2SpectrumParams";
87 IndexList indexList = sl->findNameValue(
"scan",
"19");
88 unit_assert(indexList.size()==1 && indexList[0]==0);
90 indexList = sl->findNameValue(
"scan",
"20");
91 unit_assert(indexList.size()==1 && indexList[0]==1);
93 indexList = sl->findNameValue(
"scan",
"21");
94 unit_assert(indexList.size()==1 && indexList[0]==2);
95 unit_assert(sl->find(
"sample=1 period=1 cycle=23 experiment=1") == 4);
96 indexList = sl->findNameValue(
"sample",
"1");
97 unit_assert(indexList.size()==1 && indexList[0]==4);
98 indexList = sl->findNameValue(
"period",
"1");
99 unit_assert(indexList.size()==1 && indexList[0]==4);
100 indexList = sl->findNameValue(
"cycle",
"23");
101 unit_assert(indexList.size()==1 && indexList[0]==4);
102 indexList = sl->findNameValue(
"experiment",
"1");
103 unit_assert(indexList.size()==1 && indexList[0]==4);
106 IndexList spotIndexList = sl->findSpotID(
"A1,42x42,4242x4242");
121 unit_assert(sl->spectrumIdentity(0).id ==
"scan=19");
122 unit_assert(sl->spectrumIdentity(0).spotID.empty());
124 s = sl->spectrum(0,
true);
126 vector<MZIntensityPair> pairs;
127 s->getMZIntensityPairs(pairs);
129 for (
int i=0; i<15; i++)
134 unit_assert(s->paramGroupPtrs.back()->id ==
"CommonMS1SpectrumParams");
135 unit_assert(s->paramGroupPtrs.back()->cvParams.size() == 1);
139 s = sl->spectrum(1,
true);
146 unit_assert(sl->spectrumIdentity(1).id ==
"scan=20");
147 unit_assert(sl->spectrumIdentity(1).spotID.empty());
150 s->getMZIntensityPairs(pairs);
152 for (
int i=0; i<10; i++)
153 unit_assert(pairs[i].
mz==2*i && pairs[i].intensity==(10-i)*2);
157 unit_assert(s->paramGroupPtrs.back()->id ==
"CommonMS2SpectrumParams");
158 unit_assert(s->paramGroupPtrs.back()->cvParams.size() == 1);
161 s = sl->spectrum(4,
true);
163 unit_assert(s->id ==
"sample=1 period=1 cycle=23 experiment=1");
168 unit_assert(sl->spectrumIdentity(4).id ==
"sample=1 period=1 cycle=23 experiment=1");
169 unit_assert(sl->spectrumIdentity(4).spotID ==
"A1,42x42,4242x4242");
std::vector< SourceFilePtr > sourceFilePtrs
list and descriptions of the source files this mzML document was generated or derived from...
Description of the way in which a particular software was used.
MSData <-> mzML stream serialization.
boost::shared_ptr< Index_mzML > Index_mzML_Ptr
boost::shared_ptr< ParamGroup > ParamGroupPtr
Description of the source file, including location and type.
std::vector< InstrumentConfigurationPtr > instrumentConfigurationPtrs
list and descriptions of instrument configurations.
boost::shared_ptr< Spectrum > SpectrumPtr
MS_positive_scan
positive scan: Polarity of the scan is positive.
boost::shared_ptr< DataProcessing > DataProcessingPtr
FileDescription fileDescription
information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is sto...
MS_ms_level
ms level: Stages of ms achieved in a multi stage mass spectrometry experiment.
boost::shared_ptr< SpectrumList > SpectrumListPtr
double mz(double neutralMass, int protonDelta, int electronDelta=0, int neutronDelta=0)
A collection of CVParam and UserParam elements that can be referenced from elsewhere in this mzML doc...
Description of a particular hardware configuration of a mass spectrometer. Each configuration MUST ha...
boost::shared_ptr< InstrumentConfiguration > InstrumentConfigurationPtr
std::vector< ParamGroupPtr > paramGroupPtrs
container for a list of referenceableParamGroups
PWIZ_API_DECL void initializeTiny(IdentData &mzid)
Serializer_mzML configuration.
std::vector< DataProcessingPtr > dataProcessingPtrs
list and descriptions of data processing applied to this data.
bool indexed
(indexed==true): read/write with <indexedmzML> wrapper
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
boost::shared_ptr< SourceFile > SourceFilePtr
Description of the source file, including location and type.