| 671 | } |
| 672 | |
| 673 | void TOPPASToolVertex::executionFinished(int ec, QProcess::ExitStatus es) |
| 674 | { |
| 675 | __DEBUG_BEGIN_METHOD__ |
| 676 | |
| 677 | TOPPASScene* ts = getScene_(); |
| 678 | QProcess* p = qobject_cast<QProcess*>(QObject::sender()); |
| 679 | |
| 680 | RAIICleanup clean([&]() { |
| 681 | // clean up at end |
| 682 | if (p) |
| 683 | { |
| 684 | delete p; |
| 685 | } |
| 686 | |
| 687 | ts->processFinished(); |
| 688 | }); |
| 689 | |
| 690 | //** ERROR handling |
| 691 | if (es != QProcess::NormalExit) |
| 692 | { |
| 693 | emit toolCrashed(); |
| 694 | } |
| 695 | else if (ec != 0) |
| 696 | { |
| 697 | emit toolFailed(); |
| 698 | } |
| 699 | else |
| 700 | { |
| 701 | //** no error ... proceed |
| 702 | ++round_counter_; |
| 703 | //std::cout << (String("Increased iteration_nr_ to ") + round_counter_ + " / " + round_total_ ) << " for " << this->name_ << std::endl; |
| 704 | |
| 705 | if (round_counter_ == round_total_) // all iterations performed --> proceed in pipeline |
| 706 | { |
| 707 | debugOut_("All iterations finished!"); |
| 708 | |
| 709 | if (finished_) |
| 710 | { |
| 711 | OPENMS_LOG_ERROR << "SOMETHING is very fishy. The vertex is already set to finished, yet there was still a thread spawning..." << std::endl; |
| 712 | throw Exception::IllegalSelfOperation(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION); |
| 713 | } |
| 714 | if (!ts->isDryRun()) |
| 715 | { |
| 716 | renameOutput_(); // rename generated files by content |
| 717 | emit toolFinished(); |
| 718 | } |
| 719 | finished_ = true; |
| 720 | |
| 721 | if (!breakpoint_set_) |
| 722 | { |
| 723 | // call all children, proceed in pipeline |
| 724 | for (ConstEdgeIterator it = outEdgesBegin(); it != outEdgesEnd(); ++it) |
| 725 | { |
| 726 | TOPPASVertex* tv = (*it)->getTargetVertex(); |
| 727 | debugOut_(String("Starting child ") + tv->getTopoNr()); |
| 728 | tv->run(); |
| 729 | } |
| 730 | debugOut_("All children started!"); |
nothing calls this directly
no test coverage detected