37 reader.enterContainer();
38 qDebug() << txt_value;
39 while(reader.hasNext() && (!reader.isInvalid()))
45 qDebug() << txt_value;
46 if(txt_value ==
"cvParam")
66 reader.leaveContainer();
77 QObject::tr(
"isolation window target m/z MS:1000827 not found in cvParam map"));
80 return it->second.valueDouble;
93 QObject::tr(
"isolation window lower offset MS:1000828 not found in cvParam map"));
96 return mz - it->second.valueDouble;
102 QJsonObject isolationWindow;
103 isolationWindow.insert(
"cvParam",
cvParamMap.toJsonArray());
104 return isolationWindow;
109 QJsonObject precursor;
127 QObject::tr(
"isolation window upper offset MS:1000829 not found in cvParam map"));
130 return mz + it->second.valueDouble;
137 reader.enterContainer();
138 qDebug() << txt_value;
139 while(reader.hasNext() && (!reader.isInvalid()))
141 if(reader.isString())
145 qDebug() << txt_value;
146 if(txt_value ==
"cvParam")
166 reader.leaveContainer();
180 QObject::tr(
"Charge state not found in SelectedIon cvParam map"));
182 qDebug() << it->first <<
" " << it->second.valueInt;
183 return it->second.valueInt;
201 qDebug() << it->first <<
" " << it->second.valueDouble;
202 double intensity = it->second.valueDouble;
204 if(std::isnan(intensity))
206 return it->second.valueInt;
223 qDebug() << it->first <<
" " << it->second.valueDouble;
224 return it->second.valueDouble;
233 reader.enterContainer();
234 qDebug() << txt_value;
235 while(reader.hasNext() && (!reader.isInvalid()))
237 if(reader.isString())
241 qDebug() << txt_value;
242 if(txt_value ==
"cvParam")
247 else if(txt_value ==
"isolationWindow")
251 else if(txt_value ==
"selectedIonList")
254 reader.enterContainer();
256 while(reader.hasNext() && (!reader.isInvalid()))
258 if(reader.isString())
262 qDebug() << txt_value;
263 if(txt_value ==
"cvParam")
267 else if(txt_value ==
"selectedIon")
270 reader.enterContainer();
272 while(reader.hasNext() && (!reader.isInvalid()))
278 reader.leaveContainer();
295 reader.leaveContainer();
297 else if(txt_value ==
"activation")
303 else if(txt_value ==
"spectrumRef")
306 qDebug() << txt_value;
324 reader.leaveContainer();
simple override of the raw QCborStreamReader This adds convenient functions to put CBOR data into C++...
bool decodeString(QString &the_str)
decode the current cbor value as a string the point to the next value the current value is decoded as...
PSI precursor object for mzML/mzCBOR.
double getUpperMz() const
compute isolation window upper m/z given cvParam informations
double getLowerMz() const
compute isolation window lower m/z given cvParam informations
double getTargetMz() const
get isolation window target m/z given cvParam informations
QJsonObject toJsonObject() const
write the structure to a JSON object
void fromCbor(CborStreamReader &reader)
IsolationWindow isolationWindow
QJsonObject toJsonObject() const
write the structure to a JSON object
std::vector< SelectedIon > selectedIonList
CvParamMap selectedIonListCvParamMap
void fromCbor(CborStreamReader &reader)
int getChargeState() const
void fromCbor(CborStreamReader &reader)
double getIntensity(bool *isok) const