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";
72 pg2->id =
"CommonMS2SpectrumParams";
89 IndexList indexList = sl->findNameValue(
"scan",
"19");
90 unit_assert(indexList.size()==1 && indexList[0]==0);
92 indexList = sl->findNameValue(
"scan",
"20");
93 unit_assert(indexList.size()==1 && indexList[0]==1);
95 indexList = sl->findNameValue(
"scan",
"21");
96 unit_assert(indexList.size()==1 && indexList[0]==2);
97 unit_assert(sl->find(
"sample=1 period=1 cycle=23 experiment=1") == 4);
98 indexList = sl->findNameValue(
"sample",
"1");
99 unit_assert(indexList.size()==1 && indexList[0]==4);
100 indexList = sl->findNameValue(
"period",
"1");
101 unit_assert(indexList.size()==1 && indexList[0]==4);
102 indexList = sl->findNameValue(
"cycle",
"23");
103 unit_assert(indexList.size()==1 && indexList[0]==4);
104 indexList = sl->findNameValue(
"experiment",
"1");
105 unit_assert(indexList.size()==1 && indexList[0]==4);
108 IndexList spotIndexList = sl->findSpotID(
"A1,42x42,4242x4242");
123 unit_assert(sl->spectrumIdentity(0).id ==
"scan=19");
124 unit_assert(sl->spectrumIdentity(0).spotID.empty());
126 s = sl->spectrum(0,
true);
128 vector<MZIntensityPair> pairs;
129 s->getMZIntensityPairs(pairs);
131 for (
int i=0; i<15; i++)
136 unit_assert(s->paramGroupPtrs.back()->id ==
"CommonMS1SpectrumParams");
137 unit_assert(s->paramGroupPtrs.back()->cvParams.size() == 2);
141 s = sl->spectrum(1,
true);
148 unit_assert(sl->spectrumIdentity(1).id ==
"scan=20");
149 unit_assert(sl->spectrumIdentity(1).spotID.empty());
152 s->getMZIntensityPairs(pairs);
154 for (
int i=0; i<10; i++)
155 unit_assert(pairs[i].
mz==2*i && pairs[i].intensity==(10-i)*2);
159 unit_assert(s->paramGroupPtrs.back()->id ==
"CommonMS2SpectrumParams");
160 unit_assert(s->paramGroupPtrs.back()->cvParams.size() == 2);
163 s = sl->spectrum(4,
true);
165 unit_assert(s->id ==
"sample=1 period=1 cycle=23 experiment=1");
170 unit_assert(sl->spectrumIdentity(4).id ==
"sample=1 period=1 cycle=23 experiment=1");
171 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.
MS_full_scan
full scan: Feature of the ion trap mass spectrometer where MS data is acquired over a mass range...
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.