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

Definition at line 38 of file GraphNode.hxx.

Public Member Functions

 GraphNode (const std::string_view &name)
 Creates a node with a name and a counter.
 
void AddDefinedColumns (const std::vector< std::string > &columns)
 Adds the column defined up to the node.
 
std::vector< std::string > GetDefinedColumns ()
 Gets the column defined up to the node.
 
bool GetIsNew ()
 
void SetAction (bool hasRun)
 Gives a different shape based on the node type.
 
void SetCounter (unsigned int counter)
 Manually sets the counter to a node.
 
void SetDefine ()
 Gives a different shape based on the node type.
 
void SetFilter ()
 Gives a different shape based on the node type.
 
void SetIsExplored (bool isExplored)
 Allows to stop the graph traversal when an explored node is encountered.
 
void SetIsNew (bool isNew)
 The node is considered just created.
 
void SetPrevNode (const std::shared_ptr< GraphNode > &node)
 Appends a node on the head of the current node.
 
void SetRange ()
 Gives a different shape based on the node type.
 
void SetRoot ()
 Gives a different shape based on the node type.
 

Static Public Member Functions

static void ClearCounter ()
 Resets the counter.
 

Static Private Member Functions

static unsigned intGetStaticGlobalCounter ()
 Returns a static variable to allow each node to retrieve its counter.
 

Private Attributes

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

Friends

class GraphCreatorHelper
 

#include <ROOT/RDF/GraphNode.hxx>

Constructor & Destructor Documentation

◆ GraphNode()

ROOT::Internal::RDF::GraphDrawing::GraphNode::GraphNode ( const std::string_view &  name)
inline

Creates a node with a name and a counter.

Definition at line 66 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 79 of file GraphNode.hxx.

◆ ClearCounter()

static void ROOT::Internal::RDF::GraphDrawing::GraphNode::ClearCounter ( )
inlinestatic

Resets the counter.

This is not strictly needed but guarantees that two consecutive request to the graph return the same result.

Definition at line 71 of file GraphNode.hxx.

◆ GetDefinedColumns()

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

Gets the column defined up to the node.

Definition at line 83 of file GraphNode.hxx.

◆ GetIsNew()

bool ROOT::Internal::RDF::GraphDrawing::GraphNode::GetIsNew ( )
inline

Definition at line 98 of file GraphNode.hxx.

◆ GetStaticGlobalCounter()

static unsigned int & ROOT::Internal::RDF::GraphDrawing::GraphNode::GetStaticGlobalCounter ( )
inlinestaticprivate

Returns a static variable to allow each node to retrieve its counter.

Definition at line 57 of file GraphNode.hxx.

◆ SetAction()

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

Gives a different shape based on the node type.

Definition at line 134 of file GraphNode.hxx.

◆ SetCounter()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetCounter ( unsigned int  counter)
inline

Manually sets the counter to a node.

It is used by the root node to set its counter to zero.

Definition at line 88 of file GraphNode.hxx.

◆ SetDefine()

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

Gives a different shape based on the node type.

Definition at line 118 of file GraphNode.hxx.

◆ SetFilter()

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

Gives a different shape based on the node type.

Definition at line 110 of file GraphNode.hxx.

◆ SetIsExplored()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetIsExplored ( bool  isExplored)
inline

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

Definition at line 92 of file GraphNode.hxx.

◆ SetIsNew()

void ROOT::Internal::RDF::GraphDrawing::GraphNode::SetIsNew ( bool  isNew)
inline

The node is considered just created.

Definition at line 96 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 75 of file GraphNode.hxx.

◆ SetRange()

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

Gives a different shape based on the node type.

Definition at line 126 of file GraphNode.hxx.

◆ SetRoot()

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

Gives a different shape based on the node type.

Definition at line 102 of file GraphNode.hxx.

Friends And Related Symbol Documentation

◆ GraphCreatorHelper

friend class GraphCreatorHelper
friend

Definition at line 39 of file GraphNode.hxx.

Member Data Documentation

◆ fColor

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

Definition at line 44 of file GraphNode.hxx.

◆ fCounter

unsigned int ROOT::Internal::RDF::GraphDrawing::GraphNode::fCounter
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 42 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 46 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 50 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 52 of file GraphNode.hxx.

◆ fName

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

Definition at line 44 of file GraphNode.hxx.

◆ fPrevNode

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

Definition at line 48 of file GraphNode.hxx.

◆ fShape

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

Definition at line 44 of file GraphNode.hxx.

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

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