Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RDF::GraphDrawing::GraphNode Class Reference

Class used to create the operation graph to be printed in the dot representation.

This represent a single node of the overall graph. Each node maps the real RNode keeping just the name and the columns defined up to that point.

Definition at line 47 of file GraphNode.hxx.

Public Member Functions

 GraphNode (std::string_view name, unsigned int id, ENodeType t)
 Creates a node with a name.
 
void AddDefinedColumns (const std::vector< std::string > &columns)
 Adds the column defined up to the node.
 
std::string GetColor () const
 
const std::vector< std::string > & GetDefinedColumns () const
 Gets the column defined up to the node.
 
unsigned int GetID () const
 
std::string GetName () const
 
GraphNodeGetPrevNode () const
 
std::string GetShape () const
 
bool IsExplored () const
 
bool IsNew () const
 
void SetExplored ()
 Allows to stop the graph traversal when an explored node is encountered.
 
void SetNotNew ()
 Mark this node as "not newly created".
 
void SetPrevNode (const std::shared_ptr< GraphNode > &node)
 Appends a node on the head of the current node.
 

Private Member Functions

void SetAction (bool hasRun)
 Gives a different shape based on the node type.
 
void SetDefine ()
 Gives a different shape based on the node type.
 
void SetFilter ()
 Gives a different shape based on the node type.
 
void SetRange ()
 Gives a different shape based on the node type.
 
void SetRoot ()
 Gives a different shape based on the node type.
 

Private Attributes

std::string fColor
 
std::vector< std::string > fDefinedColumns
 Columns defined up to this node.
 
unsigned int fID
 Nodes may share the same name (e.g.
 
bool fIsExplored = false
 When the graph is reconstructed, the first time this node has been explored this flag is set and it won't be explored anymore.
 
bool fIsNew = true
 A just created node.
 
std::string fName
 
std::shared_ptr< GraphNodefPrevNode
 
std::string fShape
 

#include <ROOT/RDF/GraphNode.hxx>

Constructor & Destructor Documentation

◆ GraphNode()

ROOT::Internal::RDF::GraphDrawing::GraphNode::GraphNode ( std::string_view  name,
unsigned int  id,
ENodeType  t 
)
inline

Creates a node with a name.

Definition at line 116 of file GraphNode.hxx.

Member Function Documentation

◆ AddDefinedColumns()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::AddDefinedColumns ( const std::vector< std::string > &  columns)
inline

Adds the column defined up to the node.

Definition at line 134 of file GraphNode.hxx.

◆ GetColor()

std::string ROOT::Internal::RDF::GraphDrawing::GraphNode::GetColor ( ) const
inline

Definition at line 136 of file GraphNode.hxx.

◆ GetDefinedColumns()

const std::vector< std::string > & ROOT::Internal::RDF::GraphDrawing::GraphNode::GetDefinedColumns ( ) const
inline

Gets the column defined up to the node.

Definition at line 144 of file GraphNode.hxx.

◆ GetID()

unsigned int ROOT::Internal::RDF::GraphDrawing::GraphNode::GetID ( ) const
inline

Definition at line 137 of file GraphNode.hxx.

◆ GetName()

std::string ROOT::Internal::RDF::GraphDrawing::GraphNode::GetName ( ) const
inline

Definition at line 138 of file GraphNode.hxx.

◆ GetPrevNode()

GraphNode * ROOT::Internal::RDF::GraphDrawing::GraphNode::GetPrevNode ( ) const
inline

Definition at line 140 of file GraphNode.hxx.

◆ GetShape()

std::string ROOT::Internal::RDF::GraphDrawing::GraphNode::GetShape ( ) const
inline

Definition at line 139 of file GraphNode.hxx.

◆ IsExplored()

bool ROOT::Internal::RDF::GraphDrawing::GraphNode::IsExplored ( ) const
inline

Definition at line 146 of file GraphNode.hxx.

◆ IsNew()

bool ROOT::Internal::RDF::GraphDrawing::GraphNode::IsNew ( ) const
inline

Definition at line 147 of file GraphNode.hxx.

◆ SetAction()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetAction ( bool  hasRun)
inlineprivate

Gives a different shape based on the node type.

Definition at line 102 of file GraphNode.hxx.

◆ SetDefine()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetDefine ( )
inlineprivate

Gives a different shape based on the node type.

Definition at line 86 of file GraphNode.hxx.

◆ SetExplored()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetExplored ( )
inline

Allows to stop the graph traversal when an explored node is encountered.

Definition at line 151 of file GraphNode.hxx.

◆ SetFilter()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetFilter ( )
inlineprivate

Gives a different shape based on the node type.

Definition at line 78 of file GraphNode.hxx.

◆ SetNotNew()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetNotNew ( )
inline

Mark this node as "not newly created".

Definition at line 155 of file GraphNode.hxx.

◆ SetPrevNode()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetPrevNode ( const std::shared_ptr< GraphNode > &  node)
inline

Appends a node on the head of the current node.

Definition at line 130 of file GraphNode.hxx.

◆ SetRange()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetRange ( )
inlineprivate

Gives a different shape based on the node type.

Definition at line 94 of file GraphNode.hxx.

◆ SetRoot()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetRoot ( )
inlineprivate

Gives a different shape based on the node type.

Definition at line 70 of file GraphNode.hxx.

Member Data Documentation

◆ fColor

std::string ROOT::Internal::RDF::GraphDrawing::GraphNode::fColor
private

Definition at line 52 of file GraphNode.hxx.

◆ fDefinedColumns

std::vector<std::string> ROOT::Internal::RDF::GraphDrawing::GraphNode::fDefinedColumns
private

Columns defined up to this node.

By checking the defined columns between two consecutive nodes, it is possible to know if there was some Define in between.

Definition at line 56 of file GraphNode.hxx.

◆ fID

unsigned int ROOT::Internal::RDF::GraphDrawing::GraphNode::fID
private

Nodes may share the same name (e.g.

Filter). To manage this situation in dot, each node is represented by an unique id.

Definition at line 50 of file GraphNode.hxx.

◆ fIsExplored

bool ROOT::Internal::RDF::GraphDrawing::GraphNode::fIsExplored = false
private

When the graph is reconstructed, the first time this node has been explored this flag is set and it won't be explored anymore.

Definition at line 62 of file GraphNode.hxx.

◆ fIsNew

bool ROOT::Internal::RDF::GraphDrawing::GraphNode::fIsNew = true
private

A just created node.

This means that in no other exploration the node was already created (this is needed because branches may share some common node).

Definition at line 66 of file GraphNode.hxx.

◆ fName

std::string ROOT::Internal::RDF::GraphDrawing::GraphNode::fName
private

Definition at line 52 of file GraphNode.hxx.

◆ fPrevNode

std::shared_ptr<GraphNode> ROOT::Internal::RDF::GraphDrawing::GraphNode::fPrevNode
private

Definition at line 58 of file GraphNode.hxx.

◆ fShape

std::string ROOT::Internal::RDF::GraphDrawing::GraphNode::fShape
private

Definition at line 52 of file GraphNode.hxx.

Libraries for ROOT::Internal::RDF::GraphDrawing::GraphNode:

The documentation for this class was generated from the following file: