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();
76 auto it = cvParamMap.find(
"MS:1000041");
77 if(it == cvParamMap.end())
80 QObject::tr(
"Charge state not found in SelectedIon cvParam map"));
82 qDebug() << it->first <<
" " << it->second.valueInt;
83 return it->second.valueInt;
93 auto it = cvParamMap.find(
"MS:1000042");
94 if(it == cvParamMap.end())
97 QObject::tr(
"Intensity not found in SelectedIon cvParam map"));
99 qDebug() << it->first <<
" " << it->second.valueInt;
100 return it->second.valueInt;
110 auto it = cvParamMap.find(
"MS:1000744");
111 if(it == cvParamMap.end())
115 qDebug() << it->first <<
" " << it->second.valueDouble;
116 return it->second.valueDouble;
125 reader.enterContainer();
126 qDebug() << txt_value;
127 while(reader.hasNext() && (!reader.isInvalid()))
129 if(reader.isString())
133 qDebug() << txt_value;
134 if(txt_value ==
"cvParam")
139 else if(txt_value ==
"isolationWindow")
143 else if(txt_value ==
"selectedIonList")
146 reader.enterContainer();
148 while(reader.hasNext() && (!reader.isInvalid()))
150 if(reader.isString())
154 qDebug() << txt_value;
155 if(txt_value ==
"cvParam")
157 selectedIonListCvParamMap =
160 else if(txt_value ==
"selectedIon")
163 reader.enterContainer();
165 while(reader.hasNext() && (!reader.isInvalid()))
169 selectedIonList.emplace_back(selected_ion);
171 reader.leaveContainer();
188 reader.leaveContainer();
190 else if(txt_value ==
"activation")
196 else if(txt_value ==
"spectrumRef")
199 qDebug() << txt_value;
200 spectrumRef = txt_value;
217 reader.leaveContainer();
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.
static std::map< QString, pappso::cbor::mzcbor::CvParam > getCvParamsMapFromCbor(CborStreamReader &reader)
void fromCbor(CborStreamReader &reader)
std::map< QString, pappso::cbor::mzcbor::CvParam > cvParamMap
int getChargeState() const
qint64 getIntensity() const
void fromCbor(CborStreamReader &reader)