Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
15#include "RtypesCore.h"
16
17#include <unordered_map>
18
19namespace ROOT {
20namespace Internal {
21namespace RDF {
22namespace GraphDrawing {
23class GraphNode;
24}
25} // namespace RDF
26} // namespace Internal
27
28namespace Detail {
29namespace RDF {
31
32class RLoopManager;
33
34class RRangeBase : public RNodeBase {
35protected:
36 unsigned int fStart;
37 unsigned int fStop;
38 unsigned int fStride;
40 bool fLastResult{true};
42 bool fHasStopped{false}; ///< True if the end of the range has been reached
43 const unsigned int fNSlots; ///< Number of thread slots used by this node, inherited from parent node.
44 std::unordered_map<std::string, std::shared_ptr<RRangeBase>> fVariedRanges;
45
46 void ResetCounters();
47
48public:
49 RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride,
50 const unsigned int nSlots, const std::vector<std::string> &prevVariations);
51
52 RRangeBase &operator=(const RRangeBase &) = delete;
53 ~RRangeBase() override;
54
55 void InitNode() { ResetCounters(); }
56};
57
58} // ns RDF
59} // ns Detail
60} // namespace ROOT
61
62#endif // ROOT_RRANGEBASE
long long Long64_t
Definition RtypesCore.h:80
unsigned long long ULong64_t
Definition RtypesCore.h:81
The head node of a RDF computation graph.
Base class for non-leaf nodes of the computational graph.
Definition RNodeBase.hxx:43
RRangeBase & operator=(const RRangeBase &)=delete
std::unordered_map< std::string, std::shared_ptr< RRangeBase > > fVariedRanges
const unsigned int fNSlots
Number of thread slots used by this node, inherited from parent node.
bool fHasStopped
True if the end of the range has been reached.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.