Logo ROOT  
Reference Guide
RRangeBase.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_RRANGEBASE
12 #define ROOT_RRANGEBASE
13 
14 #include "ROOT/RDF/RNodeBase.hxx"
15 #include "RtypesCore.h"
16 
17 namespace ROOT {
18 
19 // fwd decl
20 namespace Internal {
21 namespace RDF {
22 class GraphNode;
23 } // ns RDF
24 } // ns Internal
25 
26 namespace Detail {
27 namespace RDF {
29 
30 class RLoopManager;
31 
32 class RRangeBase : public RNodeBase {
33 protected:
34  unsigned int fStart;
35  unsigned int fStop;
36  unsigned int fStride;
38  bool fLastResult{true};
40  bool fHasStopped{false}; ///< True if the end of the range has been reached
41  const unsigned int fNSlots; ///< Number of thread slots used by this node, inherited from parent node.
42 
43  void ResetCounters();
44 
45 public:
46  RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride,
47  const unsigned int nSlots);
48 
49  RRangeBase &operator=(const RRangeBase &) = delete;
50  virtual ~RRangeBase();
51 
52  void InitNode() { ResetCounters(); }
53  virtual std::shared_ptr<RDFGraphDrawing::GraphNode> GetGraph() = 0;
54 };
55 
56 } // ns RDF
57 } // ns Detail
58 } // ns ROOT
59 
60 #endif // ROOT_RRANGEBASE
ROOT::Detail::RDF::RRangeBase::RRangeBase
RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride, const unsigned int nSlots)
Definition: RRangeBase.cxx:16
ROOT::Detail::RDF::RRangeBase::fStart
unsigned int fStart
Definition: RRangeBase.hxx:40
ROOT::Detail::RDF::RRangeBase::~RRangeBase
virtual ~RRangeBase()
Definition: RRangeBase.cxx:28
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
ROOT::Detail::RDF::RRangeBase
Definition: RRangeBase.hxx:38
GraphNode
Class used to create the operation graph to be printed in the dot representation.
Definition: GraphNode.hxx:50
ROOT::Detail::RDF::RRangeBase::ResetCounters
void ResetCounters()
Definition: RRangeBase.cxx:20
ROOT::Detail::RDF::RRangeBase::operator=
RRangeBase & operator=(const RRangeBase &)=delete
ROOT::Detail::RDF::RRangeBase::fLastCheckedEntry
Long64_t fLastCheckedEntry
Definition: RRangeBase.hxx:43
ROOT::Internal::RDF::GraphDrawing
Definition: GraphNode.hxx:42
ROOT::Detail::RDF::RRangeBase::fStop
unsigned int fStop
Definition: RRangeBase.hxx:41
ROOT::Detail::RDF::RRangeBase::fStride
unsigned int fStride
Definition: RRangeBase.hxx:42
ROOT::Detail::RDF::RRangeBase::fNProcessedEntries
ULong64_t fNProcessedEntries
Definition: RRangeBase.hxx:45
RNodeBase.hxx
ULong64_t
unsigned long long ULong64_t
Definition: RtypesCore.h:74
RtypesCore.h
ROOT::Detail::RDF::RRangeBase::GetGraph
virtual std::shared_ptr< RDFGraphDrawing::GraphNode > GetGraph()=0
ROOT::Detail::RDF::RRangeBase::fHasStopped
bool fHasStopped
True if the end of the range has been reached.
Definition: RRangeBase.hxx:46
ROOT::Detail::RDF::RRangeBase::InitNode
void InitNode()
Definition: RRangeBase.hxx:58
ROOT::Detail::RDF::RRangeBase::fNSlots
const unsigned int fNSlots
Number of thread slots used by this node, inherited from parent node.
Definition: RRangeBase.hxx:47
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Detail::RDF::RRangeBase::fLastResult
bool fLastResult
Definition: RRangeBase.hxx:44
ROOT::Detail::RDF::RLoopManager
The head node of a RDF computation graph.
Definition: RLoopManager.hxx:56