OpenMS
|
A special vertex that allows to merge several inputs. More...
#include <OpenMS/VISUAL/TOPPASMergerVertex.h>
Signals | |
void | mergeFailed (const QString message) |
Emitted when merging upstream data failed. More... | |
Signals inherited from TOPPASVertex | |
void | clicked () |
Emitted when this item is clicked. More... | |
void | released () |
Emitted when this item is released. More... | |
void | hoveringEdgePosChanged (const QPointF &new_pos) |
Emitted when the position of the hovering edge changes. More... | |
void | newHoveringEdge (const QPointF &pos) |
Emitted when a new out edge is supposed to be created. More... | |
void | finishHoveringEdge () |
Emitted when the mouse is released after having dragged a new edge somewhere. More... | |
void | somethingHasChanged () |
Emitted when something has changed. More... | |
void | itemDragged (qreal dx, qreal dy) |
Emitted when the item is dragged. More... | |
void | parameterChanged (const bool invalidates_running_pipeline) |
Public Member Functions | |
TOPPASMergerVertex ()=default | |
Default constructor. More... | |
TOPPASMergerVertex (bool round_based) | |
Constructor. More... | |
TOPPASMergerVertex (const TOPPASMergerVertex &rhs)=default | |
Copy constructor. More... | |
~TOPPASMergerVertex () override=default | |
Destructor. More... | |
TOPPASMergerVertex & | operator= (const TOPPASMergerVertex &rhs)=default |
Assignment operator. More... | |
virtual std::unique_ptr< TOPPASVertex > | clone () const override |
Make a copy of this vertex on the heap and return a pointer to it (useful for copying nodes) More... | |
String | getName () const override |
returns "MergerVertex" More... | |
void | run () override |
check if upstream nodes are finished and call downstream nodes More... | |
bool | roundBasedMode () const |
Determines whether this merger is merging round based or merging all inputs into one list. More... | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
QRectF | boundingRect () const override |
Returns the bounding rectangle of this item. More... | |
void | markUnreachable () override |
Marks this node (and everything further downstream) as unreachable. Overridden behavior in mergers. More... | |
Public Member Functions inherited from TOPPASVertex | |
TOPPASVertex () | |
Default Constructor. More... | |
TOPPASVertex (const TOPPASVertex &rhs) | |
Copy constructor. More... | |
~TOPPASVertex () override=default | |
Destructor. More... | |
TOPPASVertex & | operator= (const TOPPASVertex &rhs) |
Assignment operator. More... | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *, bool round_shape=true) |
base paint method for all derived classes. should be called first in child-class paint More... | |
bool | buildRoundPackages (RoundPackages &pkg, String &error_msg) |
bool | isUpstreamFinished () const |
check if all upstream nodes are ready to go ( 'finished_' is true) More... | |
QPainterPath | shape () const final |
Returns a more precise shape. More... | |
ConstEdgeIterator | outEdgesBegin () const |
Returns begin() iterator of outgoing edges. More... | |
ConstEdgeIterator | outEdgesEnd () const |
Returns end() iterator of outgoing edges. More... | |
ConstEdgeIterator | inEdgesBegin () const |
Returns begin() iterator of incoming edges. More... | |
ConstEdgeIterator | inEdgesEnd () const |
Returns end() iterator of incoming edges. More... | |
Size | incomingEdgesCount () |
Returns the number of incoming edges. More... | |
Size | outgoingEdgesCount () |
Returns the number of outgoing edges. More... | |
void | addInEdge (TOPPASEdge *edge) |
Adds an incoming edge. More... | |
void | addOutEdge (TOPPASEdge *edge) |
Adds an outgoing edge. More... | |
void | removeInEdge (TOPPASEdge *edge) |
Removes an incoming edge. More... | |
void | removeOutEdge (TOPPASEdge *edge) |
Removes an outgoing edge. More... | |
DFS_COLOR | getDFSColor () |
Returns the DFS color of this node. More... | |
void | setDFSColor (DFS_COLOR color) |
Sets the DFS color of this node. More... | |
TOPPASVertex::SUBSTREESTATUS | getSubtreeStatus () const |
Checks if all tools in the subtree below this node are finished. More... | |
bool | isTopoSortMarked () const |
Returns whether the vertex has been marked already (during topological sort) More... | |
void | setTopoSortMarked (bool b) |
(Un)marks the vertex (during topological sort) More... | |
UInt | getTopoNr () const |
Returns the topological sort number. More... | |
virtual void | setTopoNr (UInt nr) |
Sets the topological sort number (overridden in tool and output vertices) More... | |
virtual void | reset (bool reset_all_files=false) |
bool | isReachable () const |
Returns whether this node is reachable. More... | |
bool | isFinished () const |
Returns whether this node has already been processed during the current pipeline execution. More... | |
virtual bool | invertRecylingMode () |
invert status of recycling More... | |
bool | isRecyclingEnabled () const |
get status of recycling More... | |
void | setRecycling (const bool is_enabled) |
set status of recycling More... | |
QStringList | getFileNames (int param_index, int round) const |
gets filenames for a certain output parameter (from this vertex), for a certain TOPPAS round More... | |
QStringList | getFileNames () const |
get all output files for all parameters for all rounds More... | |
const RoundPackages & | getOutputFiles () const |
bool | allInputsReady () const |
check if all upstream nodes are finished More... | |
Protected Attributes | |
bool | round_based_mode_ {true} |
Stores whether this merger is merging round based or merging all inputs into one list. More... | |
Protected Attributes inherited from TOPPASVertex | |
EdgeContainer | in_edges_ |
The list of incoming edges. More... | |
EdgeContainer | out_edges_ |
The list of outgoing edges. More... | |
bool | edge_being_created_ {false} |
Indicates whether a new out edge is currently being created. More... | |
QColor | pen_color_ {Qt::black} |
The color of the pen. More... | |
QColor | brush_color_ { Qt::lightGray} |
The color of the brush. More... | |
DFS_COLOR | dfs_color_ {DFS_WHITE} |
The DFS color of this node. More... | |
bool | topo_sort_marked_ {false} |
"marked" flag for topological sort More... | |
UInt | topo_nr_ |
The number in a topological sort of the entire graph. More... | |
RoundPackages | output_files_ |
Stores the current output file names for each output parameter. More... | |
int | round_total_ {-1} |
number of rounds this node will do ('Merge All' nodes will pass everything, thus do only one round) More... | |
int | round_counter_ {0} |
currently finished number of rounds (TODO: do we need that?) More... | |
bool | finished_ {false} |
Stores whether this node has already been processed during the current pipeline execution. More... | |
bool | reachable_ {true} |
Indicates whether this node is reachable (i.e. there is an input node somewhere further upstream) More... | |
bool | allow_output_recycling_ {false} |
shall subsequent tools be allowed to recycle the output of this node to match the number of rounds imposed by other parent nodes? More... | |
Additional Inherited Members | |
Public Types inherited from TOPPASVertex | |
enum | DFS_COLOR { DFS_WHITE , DFS_GRAY , DFS_BLACK } |
The color of a vertex during depth-first search. More... | |
enum | SUBSTREESTATUS { TV_ALLFINISHED , TV_UNFINISHED , TV_UNFINISHED_INBRANCH } |
The color of a vertex during depth-first search. More... | |
typedef QList< TOPPASEdge * > | EdgeContainer |
The container for in/out edges. More... | |
typedef EdgeContainer::iterator | EdgeIterator |
A mutable iterator for in/out edges. More... | |
typedef EdgeContainer::const_iterator | ConstEdgeIterator |
A const iterator for in/out edges. More... | |
using | RoundPackage = std::map< Int, VertexRoundPackage > |
using | RoundPackageConstIt = RoundPackage::const_iterator |
using | RoundPackageIt = RoundPackage::iterator |
using | RoundPackages = std::vector< RoundPackage > |
all information a node needs to process all rounds More... | |
Public Slots inherited from TOPPASVertex | |
virtual void | inEdgeHasChanged () |
Called by an incoming edge when it has changed. More... | |
virtual void | outEdgeHasChanged () |
Called by an outgoing edge when it has changed. More... | |
Protected Member Functions inherited from TOPPASVertex | |
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *e) override |
void | mousePressEvent (QGraphicsSceneMouseEvent *e) override |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *e) override |
void | mouseMoveEvent (QGraphicsSceneMouseEvent *e) override |
void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event) override |
virtual void | moveNewEdgeTo_ (const QPointF &pos) |
Moves the target pos of the edge which is just being created to pos . More... | |
String | get3CharsNumber_ (UInt number) const |
Returns a three character string (i.e. 001 instead of 1) for the given number . More... | |
void | debugOut_ (const String &) const |
Displays the debug output message , if TOPPAS_DEBUG is defined. More... | |
A special vertex that allows to merge several inputs.
A special vertex that allows to merge several inputs. Mergers have two modes: The normal, round-based merging mode and a "wait & merge all" mode. In round-based mode, a merger first takes the first files of each incoming file list and merges them into a list (which has as many elements as the merger has incoming edges).
In "wait & merge all" mode, the merger first waits for all upstream mergers to finish all their merging rounds and then merges all collected files from all merging rounds for all incoming edges into one single list and calls the next tool with this list of files as input.
|
default |
Default constructor.
TOPPASMergerVertex | ( | bool | round_based | ) |
Constructor.
|
default |
Copy constructor.
|
overridedefault |
Destructor.
|
overridevirtual |
Returns the bounding rectangle of this item.
Implements TOPPASVertex.
|
overridevirtual |
Make a copy of this vertex on the heap and return a pointer to it (useful for copying nodes)
Implements TOPPASVertex.
|
overridevirtual |
returns "MergerVertex"
Implements TOPPASVertex.
|
overridevirtual |
Marks this node (and everything further downstream) as unreachable. Overridden behavior in mergers.
Reimplemented from TOPPASVertex.
|
signal |
Emitted when merging upstream data failed.
|
default |
Assignment operator.
|
override |
bool roundBasedMode | ( | ) | const |
Determines whether this merger is merging round based or merging all inputs into one list.
|
overridevirtual |
check if upstream nodes are finished and call downstream nodes
Reimplemented from TOPPASVertex.
|
protected |
Stores whether this merger is merging round based or merging all inputs into one list.