Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleReadOptions.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleReadOptions.hxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2024-02-22
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2024, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#ifndef ROOT7_RNTupleReadOptions
17#define ROOT7_RNTupleReadOptions
18
19namespace ROOT {
20namespace Experimental {
21
22class RNTupleReadOptions;
23
24namespace Internal {
25
27public:
28 static unsigned int GetClusterBunchSize(const RNTupleReadOptions &options);
29 static void SetClusterBunchSize(RNTupleReadOptions &options, unsigned int val);
30};
31
32} // namespace Internal
33
34// clang-format off
35/**
36\class ROOT::Experimental::RNTupleReadOptions
37\ingroup NTuple
38\brief Common user-tunable settings for reading ntuples
39
40All page source classes need to support the common options.
41*/
42// clang-format on
45
46public:
47 /// Controls if the prefetcher (including the prefetcher thread) is used
48 enum class EClusterCache {
49 kOff,
50 kOn,
51 kDefault = kOn,
52 };
53
54 /// Allows to disable parallel page compression and decompression even if ROOT uses implicit MT.
55 /// This is useful, e.g., in the context of RDataFrame where the threads are fully managed by RDataFrame.
56 enum class EImplicitMT {
57 kOff,
59 };
60
61private:
63 /// The number of cluster to be prefetched in a single batch; this option is transitional and will be replaced
64 /// by an option that allows to control the amount of memory that the prefetcher uses.
65 unsigned int fClusterBunchSize = 1;
67 /// If true, the RNTupleReader will track metrics straight from its construction, as
68 /// if calling `RNTupleReader::EnableMetrics()` before having created the object.
69 bool fEnableMetrics = false;
70
71public:
74
77
78 bool GetEnableMetrics() const { return fEnableMetrics; }
79 void SetEnableMetrics(bool val) { fEnableMetrics = val; }
80}; // class RNTupleReadOptions
81
82namespace Internal {
83
85{
86 return options.fClusterBunchSize;
87}
88
90{
91 options.fClusterBunchSize = val;
92}
93
94} // namespace Internal
95
96} // namespace Experimental
97} // namespace ROOT
98
99#endif
static unsigned int GetClusterBunchSize(const RNTupleReadOptions &options)
static void SetClusterBunchSize(RNTupleReadOptions &options, unsigned int val)
Common user-tunable settings for reading ntuples.
EImplicitMT
Allows to disable parallel page compression and decompression even if ROOT uses implicit MT.
unsigned int fClusterBunchSize
The number of cluster to be prefetched in a single batch; this option is transitional and will be rep...
bool fEnableMetrics
If true, the RNTupleReader will track metrics straight from its construction, as if calling RNTupleRe...
EClusterCache
Controls if the prefetcher (including the prefetcher thread) is used.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...