Logo ROOT  
Reference Guide
RNodeBase.hxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, Danilo Piparo CERN 09/2018
2
3/*************************************************************************
4 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_RDFNODEBASE
12#define ROOT_RDFNODEBASE
13
14#include "RtypesCore.h"
15
16#include <memory>
17#include <string>
18#include <vector>
19
20namespace ROOT {
21namespace RDF {
22class RCutFlowReport;
23}
24
25namespace Internal {
26namespace RDF {
27namespace GraphDrawing {
28class GraphNode;
29}
30}
31}
32
33namespace Detail {
34namespace RDF {
35
36class RLoopManager;
37
38/// Base class for non-leaf nodes of the computational graph.
39/// It only exposes the bare minimum interface required to work as a generic part of the computation graph.
40/// RDataFrames and results of transformations can be cast to this type via ROOT::RDF::ToCommonNodeType.
41class RNodeBase {
42protected:
44 unsigned int fNChildren{0}; ///< Number of nodes of the functional graph hanging from this object
45 unsigned int fNStopsReceived{0}; ///< Number of times that a children node signaled to stop processing entries.
46
47public:
48 RNodeBase(RLoopManager *lm = nullptr) : fLoopManager(lm) {}
49 virtual ~RNodeBase() {}
50 virtual bool CheckFilters(unsigned int, Long64_t) = 0;
51 virtual void Report(ROOT::RDF::RCutFlowReport &) const = 0;
52 virtual void PartialReport(ROOT::RDF::RCutFlowReport &) const = 0;
53 virtual void IncrChildrenCount() = 0;
54 virtual void StopProcessing() = 0;
55 virtual void AddFilterName(std::vector<std::string> &filters) = 0;
56 virtual std::shared_ptr<ROOT::Internal::RDF::GraphDrawing::GraphNode> GetGraph() = 0;
57
58 virtual void ResetChildrenCount()
59 {
60 fNChildren = 0;
62 }
63
65};
66} // ns RDF
67} // ns Detail
68} // ns ROOT
69
70#endif
long long Long64_t
Definition: RtypesCore.h:71
const char * filters[]
The head node of a RDF computation graph.
Base class for non-leaf nodes of the computational graph.
Definition: RNodeBase.hxx:41
RNodeBase(RLoopManager *lm=nullptr)
Definition: RNodeBase.hxx:48
virtual void AddFilterName(std::vector< std::string > &filters)=0
virtual void StopProcessing()=0
virtual RLoopManager * GetLoopManagerUnchecked()
Definition: RNodeBase.hxx:64
virtual bool CheckFilters(unsigned int, Long64_t)=0
virtual std::shared_ptr< ROOT::Internal::RDF::GraphDrawing::GraphNode > GetGraph()=0
virtual void IncrChildrenCount()=0
unsigned int fNStopsReceived
Number of times that a children node signaled to stop processing entries.
Definition: RNodeBase.hxx:45
virtual void Report(ROOT::RDF::RCutFlowReport &) const =0
unsigned int fNChildren
Number of nodes of the functional graph hanging from this object.
Definition: RNodeBase.hxx:44
virtual void PartialReport(ROOT::RDF::RCutFlowReport &) const =0
virtual void ResetChildrenCount()
Definition: RNodeBase.hxx:58
RLoopManager * fLoopManager
Definition: RNodeBase.hxx:43
Class used to create the operation graph to be printed in the dot representation.
Definition: GraphNode.hxx:26
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21