MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / endElement

Method endElement

src/openms/source/FORMAT/HANDLERS/MzXMLHandler.cpp:514–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512 }
513
514 void MzXMLHandler::endElement(const XMLCh* const /*uri*/, const XMLCh* const /*local_name*/, const XMLCh* const qname)
515 {
516 OPENMS_PRECONDITION(nesting_level_ >= 0, "Nesting level needs to be zero or more")
517
518 //std::cout << " -- End -- " << sm_.convert(qname) << " -- " << "\n";
519
520 static const XMLCh* s_mzxml = xercesc::XMLString::transcode("mzXML");
521 static const XMLCh* s_scan = xercesc::XMLString::transcode("scan");
522
523 open_tags_.pop_back();
524
525 if (equal_(qname, s_mzxml))
526 {
527 // Flush the remaining data
528 populateSpectraWithData_();
529
530 // End of mzXML
531 logger_.endProgress();
532 }
533 else if (equal_(qname, s_scan))
534 {
535 // End of scan: go up one nesting level
536 // Check whether to populate spectra when on highest nesting level
537 nesting_level_--;
538 OPENMS_PRECONDITION(nesting_level_ >= 0, "Nesting level needs to be zero or more")
539
540 if (nesting_level_ == 0 && spectrum_data_.size() >= options_.getMaxDataPoolSize())
541 {
542 populateSpectraWithData_();
543 }
544 }
545 //std::cout << " -- End -- " << "\n";
546 }
547
548 void MzXMLHandler::characters(const XMLCh* const chars, const XMLSize_t length)
549 {

Callers

nothing calls this directly

Calls 5

equal_Function · 0.85
getMaxDataPoolSizeMethod · 0.80
pop_backMethod · 0.45
endProgressMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected