libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::cbor::mzcbor::Precursor Struct Reference

#include <precursor.h>

Public Member Functions

void fromCbor (CborStreamReader &reader)

Public Attributes

QString spectrumRef
std::map< QString, pappso::cbor::mzcbor::CvParamselectedIonListCvParamMap
std::vector< SelectedIonselectedIonList

Detailed Description

Todo
write docs

Definition at line 54 of file precursor.h.

Member Function Documentation

◆ fromCbor()

void pappso::cbor::mzcbor::Precursor::fromCbor ( CborStreamReader & reader)

Definition at line 121 of file precursor.cpp.

122{
123
124 QString txt_value;
125 reader.enterContainer();
126 qDebug() << txt_value;
127 while(reader.hasNext() && (!reader.isInvalid()))
128 {
129 if(reader.isString())
130 {
131 if(reader.decodeString(txt_value))
132 {
133 qDebug() << txt_value;
134 if(txt_value == "cvParam")
135 {
136 // precursorListCvParamMap = CvParam::getCvParamsMapFromCbor(reader);
137 reader.next();
138 }
139 else if(txt_value == "isolationWindow")
140 {
141 reader.next();
142 }
143 else if(txt_value == "selectedIonList")
144 {
145
146 reader.enterContainer();
147
148 while(reader.hasNext() && (!reader.isInvalid()))
149 {
150 if(reader.isString())
151 {
152 if(reader.decodeString(txt_value))
153 {
154 qDebug() << txt_value;
155 if(txt_value == "cvParam")
156 {
159 }
160 else if(txt_value == "selectedIon")
161 {
162
163 reader.enterContainer(); // array
164
165 while(reader.hasNext() && (!reader.isInvalid()))
166 {
167 SelectedIon selected_ion;
168 selected_ion.fromCbor(reader);
169 selectedIonList.emplace_back(selected_ion);
170 }
171 reader.leaveContainer(); // array
172 }
173 else
174 {
175 reader.next();
176 }
177 }
178 else
179 {
180 reader.next();
181 }
182 }
183 else
184 {
185 reader.next();
186 }
187 }
188 reader.leaveContainer();
189 }
190 else if(txt_value == "activation")
191 {
192 qDebug();
193 reader.next();
194 }
195
196 else if(txt_value == "spectrumRef")
197 {
198 reader.decodeString(txt_value);
199 qDebug() << txt_value;
200 spectrumRef = txt_value;
201 }
202 else
203 {
204 reader.next();
205 }
206 }
207 else
208 {
209 reader.next();
210 }
211 }
212 else
213 {
214 reader.next();
215 }
216 }
217 reader.leaveContainer();
218}
static std::map< QString, pappso::cbor::mzcbor::CvParam > getCvParamsMapFromCbor(CborStreamReader &reader)
Definition cvparam.cpp:182
std::vector< SelectedIon > selectedIonList
Definition precursor.h:62
std::map< QString, pappso::cbor::mzcbor::CvParam > selectedIonListCvParamMap
Definition precursor.h:60

References pappso::cbor::CborStreamReader::decodeString(), pappso::cbor::mzcbor::SelectedIon::fromCbor(), pappso::cbor::mzcbor::CvParam::getCvParamsMapFromCbor(), selectedIonList, selectedIonListCvParamMap, and spectrumRef.

Referenced by pappso::cbor::mzcbor::Spectrum::fromCbor().

Member Data Documentation

◆ selectedIonList

std::vector<SelectedIon> pappso::cbor::mzcbor::Precursor::selectedIonList

Definition at line 62 of file precursor.h.

Referenced by fromCbor().

◆ selectedIonListCvParamMap

std::map<QString, pappso::cbor::mzcbor::CvParam> pappso::cbor::mzcbor::Precursor::selectedIonListCvParamMap

Definition at line 60 of file precursor.h.

Referenced by fromCbor().

◆ spectrumRef

QString pappso::cbor::mzcbor::Precursor::spectrumRef

Definition at line 58 of file precursor.h.

Referenced by fromCbor().


The documentation for this struct was generated from the following files: