68{
70
71 const size_t spectrumCount = 10;
72 for (size_t i=0; i<spectrumCount; i++)
73 {
75 Spectrum& s = *simple->spectra.back();
77 s.
id =
"scan=" + lexical_cast<string>(i);
78 }
79
80
81
82 shared_ptr<MyWrapper> wrapper(
new MyWrapper(simple));
83
84 wrapper->verifySize(10);
86 for (size_t i=0; i<spectrumCount; i++)
87 {
88 string id = "scan=" + lexical_cast<string>(i);
89
91 IndexList indexList = wrapper->findNameValue(
"scan", lexical_cast<string>(i));
92 unit_assert(indexList.size()==1 && indexList[0]==i);
93
96
99 }
100
101
102
103 shared_ptr<FilterWrapper> filterWrapper(
new FilterWrapper(simple));
104
106
107 for (size_t i=0; i<filterWrapper->size(); i++)
108 {
109 string id = "scan=" + lexical_cast<string>(i*2);
110 string scanNumber = lexical_cast<string>(i*2);
111
113 IndexList indexList = filterWrapper->findNameValue(
"scan", scanNumber);
114 unit_assert(indexList.size()==1 && indexList[0]==i);
115
118
121 }
122}
boost::shared_ptr< Spectrum > SpectrumPtr
boost::shared_ptr< SpectrumListSimple > SpectrumListSimplePtr
The structure that captures the generation of a peak list (including the underlying acquisitions)
Identifying information for a spectrum.
std::string id
a unique identifier for this spectrum. It should be expected that external files may use this identif...
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
Simple writeable in-memory implementation of SpectrumList.