35 : mcsp_massSpectrum(mass_spectrum_csp), mp_parent(parent_p)
41 : mcsp_massSpectrum(other.mcsp_massSpectrum), mp_parent(other.mp_parent)
120 ++cumulative_node_count;
127 node->size(cumulative_node_count);
156 if(iterNode !=
nullptr)
190 if(iterNode !=
nullptr)
204 bool with_descendants)
209 nodes.push_back(
this);
217 node->flattenedView(nodes, with_descendants);
228 std::vector<MsRunDataSetTreeNode *> &nodes,
bool with_descendants)
234 node->flattenedView(nodes, with_descendants);
240 std::size_t ms_level,
242 std::vector<MsRunDataSetTreeNode *> &nodes,
243 bool with_descendants)
246 if(ms_level == (
depth + 1))
254 else if(ms_level > (
depth + 1))
261 node->flattenedViewMsLevelNodes(
262 ms_level,
depth + 1, nodes, with_descendants);
268 std::vector<MsRunDataSetTreeNode *>
272 std::vector<MsRunDataSetTreeNode *> &nodes)
274 if(precision_ptr ==
nullptr)
276 "Fatal error at %s@%d -- %s(). "
277 "precision_ptr cannot be nullptr."
288 if(
mz != std::numeric_limits<double>::max())
294 precursor_mz - (precision_ptr->delta(precursor_mz) / 2);
296 precursor_mz + (precision_ptr->delta(precursor_mz) / 2);
298 if(
mz >= lower_mz &&
mz <= upper_mz)
303 nodes.push_back(
this);
311 node->productNodesByPrecursorMz(precursor_mz, precision_ptr, nodes);
318 std::vector<MsRunDataSetTreeNode *>
322 std::vector<MsRunDataSetTreeNode *> &nodes)
324 if(precision_ptr ==
nullptr)
326 "Fatal error at %s@%d -- %s(). "
327 "precision_ptr cannot be nullptr."
336 precursor_mz - (precision_ptr->delta(precursor_mz) / 2);
338 precursor_mz + (precision_ptr->delta(precursor_mz) / 2);
344 if(
mz != std::numeric_limits<double>::max())
346 if(
mz >= lower_mz &&
mz <= upper_mz)
353 std::size_t precursor_spectrum_index =
358 if(precursor_spectrum_index !=
362 "Fatal error at %s@%d -- %s(). "
369 nodes.push_back(found_node);
377 node->precursorIonNodesByPrecursorMz(precursor_mz, precision_ptr, nodes);
389 visitor.
visit(*
this);
396 node->accept(visitor);
424 std::size_t local_depth =
depth + 1;
426 std::size_t tmp_depth = 0;
427 std::size_t greatest_depth = 0;
433 tmp_depth = node->depth(local_depth);
437 if(tmp_depth > greatest_depth)
438 greatest_depth = tmp_depth;
443 return greatest_depth;
450 return QString(
"mcsp_massSpectrum: %1 ; to string: %2 ; children: %3\n")