|
ROOT
Reference Guide |
|
Go to the documentation of this file.
11 #ifndef ROOT_GRAPHUTILS
12 #define ROOT_GRAPHUTILS
19 #include <type_traits>
39 namespace GraphDrawing {
40 std::shared_ptr<GraphNode>
52 const std::vector<std::string> &prevNodeDefines);
67 using DefinesNodesMap_t = std::map<const ROOT::Detail::RDF::RDefineBase *, std::weak_ptr<GraphNode>>;
68 using FiltersNodesMap_t = std::map<const ROOT::Detail::RDF::RFilterBase *, std::weak_ptr<GraphNode>>;
69 using RangesNodesMap_t = std::map<const ROOT::Detail::RDF::RRangeBase *, std::weak_ptr<GraphNode>>;
97 friend std::shared_ptr<GraphNode>
126 template <
typename Proxied,
typename DataSource>
129 auto loopManager = rInterface.GetLoopManager();
137 template <
typename T>
142 throw std::runtime_error(
"Something went wrong");
144 if (std::is_same<
T, RInterface<RLoopManager, void>>::value) {
158 template <
typename NodeType>
friend std::shared_ptr< GraphNode > CreateFilterNode(const ROOT::Detail::RDF::RFilterBase *filterPtr)
Invoked by the RNodes to create a Filter graph node.
std::shared_ptr< GraphNode > CreateDefineNode(const std::string &columnName, const ROOT::Detail::RDF::RDefineBase *columnPtr)
RDFDetail::RLoopManager * fLoopManager
Non-owning pointer to the RLoopManager at the root of this computation graph.
std::string FromGraphLeafToDot(std::shared_ptr< GraphNode > leaf)
Starting from any leaf (Action, Filter, Range) it draws the dot representation of the branch.
static void ClearCounter()
Resets the counter.
std::string RepresentGraph(RInterface< Proxied, DataSource > &rInterface)
Starting from a Filter or Range, prints the branch it belongs to.
static FiltersNodesMap_t & GetStaticFiltersMap()
Stores the filters defined and which node in the graph defined them.
friend std::shared_ptr< GraphNode > CreateDefineNode(const std::string &columnName, const ROOT::Detail::RDF::RDefineBase *columnPtr)
Invoked by the RNodes to create a define graph node.
Encapsulates the columns defined by the user.
std::shared_ptr< RDFInternal::RActionBase > fActionPtr
Owning pointer to the action that will produce this result.
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
Smart pointer for the return type of actions.
std::map< const ROOT::Detail::RDF::RDefineBase *, std::weak_ptr< GraphNode > > DefinesNodesMap_t
std::string operator()(NodeType &node)
Functor.
std::shared_ptr< GraphNode > CreateFilterNode(const ROOT::Detail::RDF::RFilterBase *filterPtr)
std::shared_ptr< GraphNode > AddDefinesToGraph(std::shared_ptr< GraphNode > node, const RDFInternal::RBookedDefines &defines, const std::vector< std::string > &prevNodeDefines)
Add the Defines that have been added between this node and the previous to the graph.
static RangesNodesMap_t & GetStaticRangesMap()
Stores the ranges defined and which node in the graph defined them.
std::shared_ptr< GraphNode > CreateRangeNode(const ROOT::Detail::RDF::RRangeBase *rangePtr)
static DefinesNodesMap_t & GetStaticColumnsMap()
Stores the columns defined and which node in the graph defined them.
friend std::shared_ptr< GraphNode > CreateRangeNode(const ROOT::Detail::RDF::RRangeBase *rangePtr)
Invoked by the RNodes to create a Range graph node.
std::string FromGraphActionsToDot(std::vector< std::shared_ptr< GraphNode >> leaves)
Starting by an array of leaves, it draws the entire graph.
std::map< const ROOT::Detail::RDF::RRangeBase *, std::weak_ptr< GraphNode > > RangesNodesMap_t
std::string RepresentGraph(const RResultPtr< T > &resultPtr)
Starting from an action, prints the branch it belongs to.
std::map< const ROOT::Detail::RDF::RFilterBase *, std::weak_ptr< GraphNode > > FiltersNodesMap_t
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
The head node of a RDF computation graph.
std::string RepresentGraph(ROOT::RDataFrame &rDataFrame)
Starting from the root node, prints the entire graph.