Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
RLoopManager.hxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, Danilo Piparo CERN 03/2017
2
3/*************************************************************************
4 * Copyright (C) 1995-2022, 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_RLOOPMANAGER
12#define ROOT_RLOOPMANAGER
13
14#include "ROOT/InternalTreeUtils.hxx" // RNoCleanupNotifier
15#include "ROOT/RDataSource.hxx"
21#include "ROOT/RDF/Utils.hxx"
22
23#include <functional>
24#include <limits>
25#include <map>
26#include <memory>
27#include <set>
28#include <string>
29#include <string_view>
30#include <unordered_map>
31#include <unordered_set>
32#include <vector>
33#include <any>
34
35// forward declarations
36class TTree;
37class TTreeReader;
38class TDirectory;
39
40namespace ROOT {
41namespace RDF {
42class RCutFlowReport;
43class RDataSource;
44} // ns RDF
45
46namespace Internal {
47class RSlotStack;
48namespace RDF {
49std::vector<std::string> GetBranchNames(TTree &t, bool allowDuplicates = true);
50
51class GraphNode;
52class RActionBase;
53class RVariationBase;
54class RDefinesWithReaders;
55class RVariationsWithReaders;
56
57namespace GraphDrawing {
59} // ns GraphDrawing
60
61using Callback_t = std::function<void(unsigned int)>;
62
63class RCallback {
66 std::vector<ULong64_t> fCounters;
67
68public:
70 : fFun(std::move(f)), fEveryN(everyN), fCounters(nSlots, 0ull)
71 {
72 }
73
74 void operator()(unsigned int slot)
75 {
76 auto &c = fCounters[slot];
77 ++c;
78 if (c == fEveryN) {
79 c = 0ull;
80 fFun(slot);
81 }
82 }
83};
84
87 std::vector<int> fHasBeenCalled; // std::vector<bool> is thread-unsafe for our purposes (and generally evil)
88
89public:
91
92 void operator()(unsigned int slot)
93 {
94 if (fHasBeenCalled[slot] == 1)
95 return;
96 fFun(slot);
98 }
99};
100
101struct RDSRangeRAII;
102
103} // namespace RDF
104} // namespace Internal
105} // namespace ROOT
106
107namespace ROOT {
108namespace Detail {
109namespace RDF {
111
112class RFilterBase;
113class RRangeBase;
114class RDefineBase;
116
117/// The head node of a RDF computation graph.
118/// This class is responsible of running the event loop.
119class RLoopManager : public RNodeBase {
120 using ColumnNames_t = std::vector<std::string>;
121 enum class ELoopType {
122 kInvalid,
125 kNoFiles,
129 };
130
131 friend struct RCallCleanUpTask;
133
134 std::vector<RDFInternal::RActionBase *> fBookedActions; ///< Non-owning pointers to actions to be run
135 std::vector<RDFInternal::RActionBase *> fRunActions; ///< Non-owning pointers to actions already run
136 std::vector<RFilterBase *> fBookedFilters;
137 std::vector<RFilterBase *> fBookedNamedFilters; ///< Contains a subset of fBookedFilters, i.e. only the named filters
138 std::vector<RRangeBase *> fBookedRanges;
139 std::vector<RDefineBase *> fBookedDefines;
140 std::vector<RDFInternal::RVariationBase *> fBookedVariations;
141
142 /// Shared pointer to the input TTree. It does not delete the pointee if the TTree/TChain was passed directly as an
143 /// argument to RDataFrame's ctor (in which case we let users retain ownership).
144 std::shared_ptr<TTree> fTree{nullptr};
146 Long64_t fEndEntry{std::numeric_limits<Long64_t>::max()};
147
148 /// Keys are `fname + "/" + treename` as RSampleInfo::fID; Values are pointers to the corresponding sample
149 std::unordered_map<std::string, ROOT::RDF::Experimental::RSample *> fSampleMap;
150 /// Samples need to survive throughout the whole event loop, hence stored as an attribute
151 std::vector<ROOT::RDF::Experimental::RSample> fSamples;
152
153 /// Friends of the fTree. Only used if we constructed fTree ourselves.
154 std::vector<std::unique_ptr<TChain>> fFriends;
156 /// Range of entries created when no data source is specified.
157 std::pair<ULong64_t, ULong64_t> fEmptyEntryRange{};
158 unsigned int fNSlots{1};
160 /// The kind of event loop that is going to be run (e.g. on ROOT files, on no files)
162 std::unique_ptr<RDataSource> fDataSource{}; ///< Owning pointer to a data-source object. Null if no data-source
163 /// Registered callbacks to be executed every N events.
164 /// The registration happens via the RegisterCallback method.
165 std::vector<RDFInternal::RCallback> fCallbacksEveryNEvents;
166 /// Registered callbacks to invoke just once before running the loop.
167 /// The registration happens via the RegisterCallback method.
168 std::vector<RDFInternal::ROneTimeCallback> fCallbacksOnce;
169 /// Registered callbacks to call at the beginning of each "data block".
170 /// The key is the pointer of the corresponding node in the computation graph (a RDefinePerSample or a RAction).
171 std::unordered_map<void *, ROOT::RDF::SampleCallback_t> fSampleCallbacks;
173 std::vector<ROOT::RDF::RSampleInfo> fSampleInfos;
174 unsigned int fNRuns{0}; ///< Number of event loops run
175
176 /// Readers for TTree/RDataSource columns (one per slot), shared by all nodes in the computation graph.
177 std::vector<std::unordered_map<std::string, std::unique_ptr<RColumnReaderBase>>> fDatasetColumnReaders;
178
179 /// Cache of the tree/chain branch names. Never access directy, always use GetBranchNames().
181
183
184 void RunEmptySourceMT();
185 void RunEmptySource();
186 void RunTreeProcessorMT();
187 void RunTreeReader();
188 void RunDataSourceMT();
189 void RunDataSource();
190 void RunAndCheckFilters(unsigned int slot, Long64_t entry);
191 void InitNodeSlots(TTreeReader *r, unsigned int slot);
192 void InitNodes();
193 void CleanUpNodes();
194 void CleanUpTask(TTreeReader *r, unsigned int slot);
195 void EvalChildrenCounts();
196 void SetupSampleCallbacks(TTreeReader *r, unsigned int slot);
197 void UpdateSampleInfo(unsigned int slot, const std::pair<ULong64_t, ULong64_t> &range);
198 void UpdateSampleInfo(unsigned int slot, TTreeReader &r);
199
200 // List of branches for which we want to suppress the printed error about
201 // missing branch when switching to a new tree. This is modified by readers,
202 // so must be declared before them in this class.
203 std::set<std::string> fSuppressErrorsForMissingBranches{};
205 std::set<std::pair<std::string_view, std::unique_ptr<ROOT::Internal::RDF::RDefinesWithReaders>>>
207 std::set<std::pair<std::string_view, std::unique_ptr<ROOT::Internal::RDF::RVariationsWithReaders>>>
209
210 /// A wrapped reference to a TTree dataset that can be shared by many computation graphs. Ensures lifetime
211 /// management.
212 std::any fTTreeLifeline{};
213
214public:
216 RLoopManager(TTree *tree, const ColumnNames_t &defaultBranches);
218 RLoopManager(std::unique_ptr<RDataSource> ds, const ColumnNames_t &defaultBranches);
220
221 // Rule of five
222
223 RLoopManager(const RLoopManager &) = delete;
227 ~RLoopManager() override;
228
229 void Jit();
231 void Run(bool jit = true);
232 const ColumnNames_t &GetDefaultColumnNames() const;
233 TTree *GetTree() const;
235 RDataSource *GetDataSource() const { return fDataSource.get(); }
246 bool CheckFilters(unsigned int, Long64_t) final;
247 unsigned int GetNSlots() const { return fNSlots; }
248 void Report(ROOT::RDF::RCutFlowReport &rep) const final;
249 /// End of recursive chain of calls, does nothing
251 void SetTree(std::shared_ptr<TTree> tree);
254 void ToJitExec(const std::string &) const;
255 void RegisterCallback(ULong64_t everyNEvents, std::function<void(unsigned int)> &&f);
256 unsigned int GetNRuns() const { return fNRuns; }
257 bool HasDataSourceColumnReaders(std::string_view col, const std::type_info &ti) const;
258 void AddDataSourceColumnReaders(std::string_view col, std::vector<std::unique_ptr<RColumnReaderBase>> &&readers,
259 const std::type_info &ti);
260 RColumnReaderBase *AddTreeColumnReader(unsigned int slot, std::string_view col,
261 std::unique_ptr<RColumnReaderBase> &&reader, const std::type_info &ti);
262 RColumnReaderBase *GetDatasetColumnReader(unsigned int slot, std::string_view col, const std::type_info &ti) const;
263 RColumnReaderBase *AddDataSourceColumnReader(unsigned int slot, std::string_view col, const std::type_info &ti,
265
266 /// End of recursive chain of calls, does nothing
267 void AddFilterName(std::vector<std::string> &) final {}
268 /// For each booked filter, returns either the name or "Unnamed Filter"
269 std::vector<std::string> GetFiltersNames();
270
271 /// Return all graph edges known to RLoopManager
272 /// This includes Filters and Ranges but not Defines.
273 std::vector<RNodeBase *> GetGraphEdges() const;
274
275 /// Return all actions, either booked or already run
276 std::vector<RDFInternal::RActionBase *> GetAllActions() const;
277
278 std::shared_ptr<ROOT::Internal::RDF::GraphDrawing::GraphNode>
279 GetGraph(std::unordered_map<void *, std::shared_ptr<ROOT::Internal::RDF::GraphDrawing::GraphNode>> &visitedMap) final;
280
281 const ColumnNames_t &GetBranchNames();
282
284
285 void SetEmptyEntryRange(std::pair<ULong64_t, ULong64_t> &&newRange);
288
290 std::set<std::pair<std::string_view, std::unique_ptr<ROOT::Internal::RDF::RDefinesWithReaders>>> &
295 std::set<std::pair<std::string_view, std::unique_ptr<ROOT::Internal::RDF::RVariationsWithReaders>>> &
300
301 void SetTTreeLifeline(std::any lifeline);
302
303 void SetDataSource(std::unique_ptr<ROOT::RDF::RDataSource> dataSource);
304
313 const std::set<std::string> &GetSuppressErrorsForMissingBranches() const
314 {
316 }
317
318 /// The task run by every thread on the input entry range, for the generic RDataSource.
319 void DataSourceThreadTask(const std::pair<ULong64_t, ULong64_t> &entryRange, ROOT::Internal::RSlotStack &slotStack,
320 std::atomic<ULong64_t> &entryCount);
321 /// The task run by every thread on an entry range (known by the input TTreeReader), for the TTree data source.
322 void
324};
325
326/// \brief Create an RLoopManager that reads a TChain.
327/// \param[in] datasetName Name of the TChain
328/// \param[in] fileNameGlob File name (or glob) in which the TChain is stored.
329/// \param[in] defaultColumns List of default columns, see
330/// \param[in] checkFile file validator boolean
331/// \ref https://root.cern/doc/master/classROOT_1_1RDataFrame.html#default-branches "Default column lists"
332/// \return the RLoopManager instance.
333std::shared_ptr<ROOT::Detail::RDF::RLoopManager>
334CreateLMFromTTree(std::string_view datasetName, std::string_view fileNameGlob,
335 const std::vector<std::string> &defaultColumns, bool checkFile = true);
336
337/// \brief Create an RLoopManager that reads a TChain.
338/// \param[in] datasetName Name of the TChain
339/// \param[in] fileNameGlobs List of file names (potentially globs).
340/// \param[in] defaultColumns List of default columns, see
341/// \param[in] checkFile file validator boolean
342/// \ref https://root.cern/doc/master/classROOT_1_1RDataFrame.html#default-branches "Default column lists"
343/// \return the RLoopManager instance.
344std::shared_ptr<ROOT::Detail::RDF::RLoopManager>
345CreateLMFromTTree(std::string_view datasetName, const std::vector<std::string> &fileNameGlobs,
346 const std::vector<std::string> &defaultColumns, bool checkFile = true);
347
348#ifdef R__HAS_ROOT7
349/// \brief Create an RLoopManager that reads an RNTuple.
350/// \param[in] datasetName Name of the RNTuple
351/// \param[in] fileNameGlob File name (or glob) in which the RNTuple is stored.
352/// \param[in] defaultColumns List of default columns, see
353/// \ref https://root.cern/doc/master/classROOT_1_1RDataFrame.html#default-branches "Default column lists"
354/// \return the RLoopManager instance.
355std::shared_ptr<ROOT::Detail::RDF::RLoopManager> CreateLMFromRNTuple(std::string_view datasetName,
356 std::string_view fileNameGlob,
357 const std::vector<std::string> &defaultColumns);
358
359/// \brief Create an RLoopManager that reads multiple RNTuples chained vertically.
360/// \param[in] datasetName Name of the RNTuple
361/// \param[in] fileNameGlobs List of file names (potentially globs).
362/// \param[in] defaultColumns List of default columns, see
363/// \ref https://root.cern/doc/master/classROOT_1_1RDataFrame.html#default-branches "Default column lists"
364/// \return the RLoopManager instance.
365std::shared_ptr<ROOT::Detail::RDF::RLoopManager> CreateLMFromRNTuple(std::string_view datasetName,
366 const std::vector<std::string> &fileNameGlobs,
367 const std::vector<std::string> &defaultColumns);
368
369/// \brief Create an RLoopManager opening a file and checking the data format of the dataset.
370/// \param[in] datasetName Name of the dataset in the file.
371/// \param[in] fileNameGlob File name (or glob) in which the dataset is stored.
372/// \param[in] defaultColumns List of default columns, see
373/// \ref https://root.cern/doc/master/classROOT_1_1RDataFrame.html#default-branches "Default column lists"
374/// \throws std::invalid_argument if the file could not be opened.
375/// \return an RLoopManager of the appropriate data source.
376std::shared_ptr<ROOT::Detail::RDF::RLoopManager> CreateLMFromFile(std::string_view datasetName,
377 std::string_view fileNameGlob,
378 const std::vector<std::string> &defaultColumns);
379
380/// \brief Create an RLoopManager that reads many files. The first is opened to infer the data source type.
381/// \param[in] datasetName Name of the dataset.
382/// \param[in] fileNameGlobs List of file names (potentially globs).
383/// \param[in] defaultColumns List of default columns, see
384/// \ref https://root.cern/doc/master/classROOT_1_1RDataFrame.html#default-branches "Default column lists"
385/// \throws std::invalid_argument if the file could not be opened.
386/// \return an RLoopManager of the appropriate data source.
387std::shared_ptr<ROOT::Detail::RDF::RLoopManager> CreateLMFromFile(std::string_view datasetName,
388 const std::vector<std::string> &fileNameGlobs,
389 const std::vector<std::string> &defaultColumns);
390#endif
391
392} // namespace RDF
393} // namespace Detail
394} // namespace ROOT
395
396#endif
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
long long Long64_t
Definition RtypesCore.h:69
unsigned long long ULong64_t
Definition RtypesCore.h:70
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
The head node of a RDF computation graph.
RColumnReaderBase * AddDataSourceColumnReader(unsigned int slot, std::string_view col, const std::type_info &ti, TTreeReader *treeReader)
void UpdateSampleInfo(unsigned int slot, const std::pair< ULong64_t, ULong64_t > &range)
unsigned int fNRuns
Number of event loops run.
bool CheckFilters(unsigned int, Long64_t) final
std::any fTTreeLifeline
A wrapped reference to a TTree dataset that can be shared by many computation graphs.
void EvalChildrenCounts()
Trigger counting of number of children nodes for each node of the functional graph.
void CleanUpNodes()
Perform clean-up operations. To be called at the end of each event loop.
void RunEmptySource()
Run event loop with no source files, in sequence.
const std::set< std::string > & GetSuppressErrorsForMissingBranches() const
void SetEmptyEntryRange(std::pair< ULong64_t, ULong64_t > &&newRange)
void Report(ROOT::RDF::RCutFlowReport &rep) const final
Call FillReport on all booked filters.
void AddSampleCallback(void *nodePtr, ROOT::RDF::SampleCallback_t &&callback)
std::vector< RFilterBase * > fBookedNamedFilters
Contains a subset of fBookedFilters, i.e. only the named filters.
void RunEmptySourceMT()
Run event loop with no source files, in parallel.
RLoopManager & operator=(RLoopManager &&)=delete
std::unordered_map< std::string, ROOT::RDF::Experimental::RSample * > fSampleMap
Keys are fname + "/" + treename as RSampleInfo::fID; Values are pointers to the corresponding sample.
void AddDataSourceColumnReaders(std::string_view col, std::vector< std::unique_ptr< RColumnReaderBase > > &&readers, const std::type_info &ti)
std::shared_ptr< ROOT::Internal::RDF::GraphDrawing::GraphNode > GetGraph(std::unordered_map< void *, std::shared_ptr< ROOT::Internal::RDF::GraphDrawing::GraphNode > > &visitedMap) final
RLoopManager & operator=(const RLoopManager &)=delete
const ColumnNames_t & GetBranchNames()
Return all valid TTree::Branch names (caching results for subsequent calls).
void ToJitExec(const std::string &) const
std::vector< RDFInternal::RActionBase * > GetAllActions() const
Return all actions, either booked or already run.
std::vector< ROOT::RDF::RSampleInfo > fSampleInfos
std::set< std::string > fSuppressErrorsForMissingBranches
void ChangeSpec(ROOT::RDF::Experimental::RDatasetSpec &&spec)
Changes the internal TTree held by the RLoopManager.
void SetTree(std::shared_ptr< TTree > tree)
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RVariationsWithReaders > > > & GetUniqueVariationsWithReaders()
std::shared_ptr< TTree > fTree
Shared pointer to the input TTree.
std::vector< RDefineBase * > fBookedDefines
void RunTreeReader()
Run event loop over one or multiple ROOT files, in sequence.
void TTreeThreadTask(TTreeReader &treeReader, ROOT::Internal::RSlotStack &slotStack, std::atomic< ULong64_t > &entryCount)
The task run by every thread on an entry range (known by the input TTreeReader), for the TTree data s...
void InsertSuppressErrorsForMissingBranch(const std::string &branchName)
ROOT::Internal::TreeUtils::RNoCleanupNotifier fNoCleanupNotifier
RColumnReaderBase * AddTreeColumnReader(unsigned int slot, std::string_view col, std::unique_ptr< RColumnReaderBase > &&reader, const std::type_info &ti)
Register a new RTreeColumnReader with this RLoopManager.
std::vector< RDFInternal::RActionBase * > fRunActions
Non-owning pointers to actions already run.
RLoopManager(const ColumnNames_t &defaultColumns={})
void AddFilterName(std::vector< std::string > &) final
End of recursive chain of calls, does nothing.
std::vector< RRangeBase * > fBookedRanges
std::vector< ROOT::RDF::Experimental::RSample > fSamples
Samples need to survive throughout the whole event loop, hence stored as an attribute.
std::vector< std::string > ColumnNames_t
void RunAndCheckFilters(unsigned int slot, Long64_t entry)
Execute actions and make sure named filters are called for each event.
void ChangeBeginAndEndEntries(Long64_t begin, Long64_t end)
std::vector< RFilterBase * > fBookedFilters
void Run(bool jit=true)
Start the event loop with a different mechanism depending on IMT/no IMT, data source/no data source.
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RVariationsWithReaders > > > fUniqueVariationsWithReaders
std::unordered_map< void *, ROOT::RDF::SampleCallback_t > fSampleCallbacks
Registered callbacks to call at the beginning of each "data block".
std::vector< RDFInternal::RActionBase * > fBookedActions
Non-owning pointers to actions to be run.
RLoopManager(RLoopManager &&)=delete
void SetupSampleCallbacks(TTreeReader *r, unsigned int slot)
ColumnNames_t fValidBranchNames
Cache of the tree/chain branch names. Never access directy, always use GetBranchNames().
void CleanUpTask(TTreeReader *r, unsigned int slot)
Perform clean-up operations. To be called at the end of each task execution.
std::vector< RDFInternal::RCallback > fCallbacksEveryNEvents
Registered callbacks to be executed every N events.
std::vector< std::unordered_map< std::string, std::unique_ptr< RColumnReaderBase > > > fDatasetColumnReaders
Readers for TTree/RDataSource columns (one per slot), shared by all nodes in the computation graph.
void Register(RDFInternal::RActionBase *actionPtr)
const ColumnNames_t & GetDefaultColumnNames() const
Return the list of default columns – empty if none was provided when constructing the RDataFrame.
std::vector< RDFInternal::RVariationBase * > fBookedVariations
std::vector< RNodeBase * > GetGraphEdges() const
Return all graph edges known to RLoopManager This includes Filters and Ranges but not Defines.
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RDefinesWithReaders > > > & GetUniqueDefinesWithReaders()
void EraseSuppressErrorsForMissingBranch(const std::string &branchName)
RDataSource * GetDataSource() const
void RunDataSourceMT()
Run event loop over data accessed through a DataSource, in parallel.
void PartialReport(ROOT::RDF::RCutFlowReport &) const final
End of recursive chain of calls, does nothing.
std::vector< std::string > GetFiltersNames()
For each booked filter, returns either the name or "Unnamed Filter".
RLoopManager(const RLoopManager &)=delete
RDFInternal::RNewSampleNotifier fNewSampleNotifier
std::pair< ULong64_t, ULong64_t > fEmptyEntryRange
Range of entries created when no data source is specified.
std::set< std::pair< std::string_view, std::unique_ptr< ROOT::Internal::RDF::RDefinesWithReaders > > > fUniqueDefinesWithReaders
ROOT::Internal::RDF::RStringCache fCachedColNames
ROOT::Internal::RDF::RStringCache & GetColumnNamesCache()
std::unique_ptr< RDataSource > fDataSource
Owning pointer to a data-source object.
void DataSourceThreadTask(const std::pair< ULong64_t, ULong64_t > &entryRange, ROOT::Internal::RSlotStack &slotStack, std::atomic< ULong64_t > &entryCount)
The task run by every thread on the input entry range, for the generic RDataSource.
void InitNodeSlots(TTreeReader *r, unsigned int slot)
Build TTreeReaderValues for all nodes This method loops over all filters, actions and other booked ob...
std::vector< RDFInternal::ROneTimeCallback > fCallbacksOnce
Registered callbacks to invoke just once before running the loop.
void SetDataSource(std::unique_ptr< ROOT::RDF::RDataSource > dataSource)
void RegisterCallback(ULong64_t everyNEvents, std::function< void(unsigned int)> &&f)
void SetTTreeLifeline(std::any lifeline)
void RunDataSource()
Run event loop over data accessed through a DataSource, in sequence.
void Jit()
Add RDF nodes that require just-in-time compilation to the computation graph.
RColumnReaderBase * GetDatasetColumnReader(unsigned int slot, std::string_view col, const std::type_info &ti) const
void RunTreeProcessorMT()
Run event loop over one or multiple ROOT files, in parallel.
void Deregister(RDFInternal::RActionBase *actionPtr)
ELoopType fLoopType
The kind of event loop that is going to be run (e.g. on ROOT files, on no files)
void InitNodes()
Initialize all nodes of the functional graph before running the event loop.
bool HasDataSourceColumnReaders(std::string_view col, const std::type_info &ti) const
Return true if AddDataSourceColumnReaders was called for column name col.
RLoopManager * GetLoopManagerUnchecked() final
std::vector< std::unique_ptr< TChain > > fFriends
Friends of the fTree. Only used if we constructed fTree ourselves.
Base class for non-leaf nodes of the computational graph.
Definition RNodeBase.hxx:43
unsigned int fNStopsReceived
Number of times that a children node signaled to stop processing entries.
Definition RNodeBase.hxx:47
unsigned int fNChildren
Number of nodes of the functional graph hanging from this object.
Definition RNodeBase.hxx:46
Helper class that provides the operation graph nodes.
RCallback(ULong64_t everyN, Callback_t &&f, unsigned int nSlots)
std::vector< ULong64_t > fCounters
void operator()(unsigned int slot)
ROneTimeCallback(Callback_t &&f, unsigned int nSlots)
A Thread-safe cache for strings.
Definition Utils.hxx:288
This type includes all parts of RVariation that do not depend on the callable signature.
A thread-safe stack of N indexes (0 to size - 1).
The dataset specification for RDataFrame.
RDataSource defines an API that RDataFrame can use to read arbitrary data formats.
Describe directory structure in memory.
Definition TDirectory.h:45
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition TTreeReader.h:46
A TTree represents a columnar dataset.
Definition TTree.h:79
std::shared_ptr< ROOT::Detail::RDF::RLoopManager > CreateLMFromTTree(std::string_view datasetName, std::string_view fileNameGlob, const std::vector< std::string > &defaultColumns, bool checkFile=true)
Create an RLoopManager that reads a TChain.
std::vector< std::string > GetBranchNames(TTree &t, bool allowDuplicates=true)
Get all the branches names, including the ones of the friend trees.
std::function< void(unsigned int)> Callback_t
std::function< void(unsigned int, const ROOT::RDF::RSampleInfo &)> SampleCallback_t
The type of a data-block callback, registered with an RDataFrame computation graph via e....
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
A RAII object that calls RLoopManager::CleanUpTask at destruction.