Logo ROOT  
Reference Guide
RNTuple.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTuple.hxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2018-10-04
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-2019, 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_RNTuple
17#define ROOT7_RNTuple
18
19#include <ROOT/RConfig.hxx> // for R__unlikely
20#include <ROOT/RError.hxx>
22#include <ROOT/RNTupleModel.hxx>
24#include <ROOT/RNTupleUtil.hxx>
25#include <ROOT/RNTupleView.hxx>
26#include <ROOT/RPageStorage.hxx>
27#include <ROOT/RSpan.hxx>
28#include <ROOT/RStringView.hxx>
29
30#include <iterator>
31#include <memory>
32#include <sstream>
33#include <utility>
34
35class TFile;
36
37namespace ROOT {
38namespace Experimental {
39
40class REntry;
41class RNTupleModel;
42
43namespace Detail {
44class RPageSink;
45class RPageSource;
46}
47
48
49/**
50 * Listing of the different options that can be printed by RNTupleReader::GetInfo()
51 */
52enum class ENTupleInfo {
53 kSummary, // The ntuple name, description, number of entries
54 kStorageDetails, // size on storage, page sizes, compression factor, etc.
55 kMetrics, // internals performance counters, requires that EnableMetrics() was called
56};
57
58/**
59 * Listing of the different entry output formats of RNTupleReader::Show()
60 */
62 kCurrentModelJSON, // prints a single entry/row with the current active model in JSON format.
63 kCompleteJSON, // prints a single entry/row with all the fields in JSON format.
64};
65
66
67#ifdef R__USE_IMT
68class TTaskGroup;
70private:
71 std::unique_ptr<TTaskGroup> fTaskGroup;
72public:
74 virtual ~RNTupleImtTaskScheduler() = default;
75 void Reset() final;
76 void AddTask(const std::function<void(void)> &taskFunc) final;
77 void Wait() final;
78};
79#endif
80
81// clang-format off
82/**
83\class ROOT::Experimental::RNTupleReader
84\ingroup NTuple
85\brief An RNTuple that is used to read data from storage
86
87An input ntuple provides data from storage as C++ objects. The ntuple model can be created from the data on storage
88or it can be imposed by the user. The latter case allows users to read into a specialized ntuple model that covers
89only a subset of the fields in the ntuple. The ntuple model is used when reading complete entries.
90Individual fields can be read as well by instantiating a tree view.
91
92~~~ {.cpp}
93#include <ROOT/RNTuple.hxx>
94using ROOT::Experimental::RNTupleReader;
95
96#include <iostream>
97
98auto ntuple = RNTupleReader::Open("myNTuple", "some/file.root");
99std::cout << "myNTuple has " << ntuple->GetNEntries() << " entries\n";
100~~~
101*/
102// clang-format on
104private:
105 /// Set as the page source's scheduler for parallel page decompression if IMT is on
106 /// Needs to be destructed after the pages source is destructed (an thus be declared before)
107 std::unique_ptr<Detail::RPageStorage::RTaskScheduler> fUnzipTasks;
108
109 std::unique_ptr<Detail::RPageSource> fSource;
110 /// Needs to be destructed before fSource
111 std::unique_ptr<RNTupleModel> fModel;
112 /// We use a dedicated on-demand reader for Show() and Scan(). Printing data uses all the fields
113 /// from the full model even if the analysis code uses only a subset of fields. The display reader
114 /// is a clone of the original reader.
115 std::unique_ptr<RNTupleReader> fDisplayReader;
116 /// The ntuple descriptor in the page source is protected by a read-write lock. We don't expose that to the
117 /// users of RNTupleReader::GetDescriptor(). Instead, if descriptor information is needed, we clone the
118 /// descriptor. Using the descriptor's generation number, we know if the cached descriptor is stale.
119 /// Retrieving descriptor data from an RNTupleReader is supposed to be for testing and information purposes,
120 /// not on a hot code path.
121 std::unique_ptr<RNTupleDescriptor> fCachedDescriptor;
123
124 void ConnectModel(const RNTupleModel &model);
125 RNTupleReader *GetDisplayReader();
126 void InitPageSource();
127
128public:
129 // Browse through the entries
130 class RIterator {
131 private:
133 public:
135 using iterator_category = std::forward_iterator_tag;
140
141 RIterator() = default;
142 explicit RIterator(NTupleSize_t index) : fIndex(index) {}
143 ~RIterator() = default;
144
145 iterator operator++(int) /* postfix */ { auto r = *this; fIndex++; return r; }
146 iterator& operator++() /* prefix */ { ++fIndex; return *this; }
147 reference operator* () { return fIndex; }
148 pointer operator->() { return &fIndex; }
149 bool operator==(const iterator& rh) const { return fIndex == rh.fIndex; }
150 bool operator!=(const iterator& rh) const { return fIndex != rh.fIndex; }
151 };
152
153 /// Used to specify the underlying RNTuples in OpenFriends()
154 struct ROpenSpec {
155 std::string fNTupleName;
156 std::string fStorage;
158
159 ROpenSpec() = default;
160 ROpenSpec(std::string_view n, std::string_view s) : fNTupleName(n), fStorage(s) {}
161 };
162
163 /// Throws an exception if the model is null.
164 static std::unique_ptr<RNTupleReader> Open(std::unique_ptr<RNTupleModel> model,
165 std::string_view ntupleName,
166 std::string_view storage,
167 const RNTupleReadOptions &options = RNTupleReadOptions());
168 /// Open an RNTuple for reading.
169 ///
170 /// Throws an RException if there is no RNTuple with the given name.
171 ///
172 /// **Example: open an RNTuple and print the number of entries**
173 /// ~~~ {.cpp}
174 /// #include <ROOT/RNTuple.hxx>
175 /// using ROOT::Experimental::RNTupleReader;
176 ///
177 /// #include <iostream>
178 ///
179 /// auto ntuple = RNTupleReader::Open("myNTuple", "some/file.root");
180 /// std::cout << "myNTuple has " << ntuple->GetNEntries() << " entries\n";
181 /// ~~~
182 static std::unique_ptr<RNTupleReader> Open(std::string_view ntupleName,
183 std::string_view storage,
184 const RNTupleReadOptions &options = RNTupleReadOptions());
185 /// Open RNTuples as one virtual, horizontally combined ntuple. The underlying RNTuples must
186 /// have an identical number of entries. Fields in the combined RNTuple are named with the ntuple name
187 /// as a prefix, e.g. myNTuple1.px and myNTuple2.pt (see tutorial ntpl006_friends)
188 static std::unique_ptr<RNTupleReader> OpenFriends(std::span<ROpenSpec> ntuples);
189
190 /// The user imposes an ntuple model, which must be compatible with the model found in the data on
191 /// storage.
192 ///
193 /// Throws an exception if the model or the source is null.
194 RNTupleReader(std::unique_ptr<RNTupleModel> model, std::unique_ptr<Detail::RPageSource> source);
195 /// The model is generated from the ntuple metadata on storage
196 ///
197 /// Throws an exception if the source is null.
198 explicit RNTupleReader(std::unique_ptr<Detail::RPageSource> source);
199 std::unique_ptr<RNTupleReader> Clone() { return std::make_unique<RNTupleReader>(fSource->Clone()); }
201
202 RNTupleModel *GetModel();
203 NTupleSize_t GetNEntries() const { return fSource->GetNEntries(); }
204
205 /// Returns a cached copy of the page source descriptor. The returned pointer remains valid until the next call
206 /// to LoadEntry or to any of the views returned from the reader.
207 const RNTupleDescriptor *GetDescriptor();
208
209 /// Prints a detailed summary of the ntuple, including a list of fields.
210 ///
211 /// **Example: print summary information to stdout**
212 /// ~~~ {.cpp}
213 /// #include <ROOT/RNTuple.hxx>
214 /// using ROOT::Experimental::ENTupleInfo;
215 /// using ROOT::Experimental::RNTupleReader;
216 ///
217 /// #include <iostream>
218 ///
219 /// auto ntuple = RNTupleReader::Open("myNTuple", "some/file.root");
220 /// ntuple->PrintInfo();
221 /// // or, equivalently:
222 /// ntuple->PrintInfo(ENTupleInfo::kSummary, std::cout);
223 /// ~~~
224 /// **Example: print detailed column storage data to stderr**
225 /// ~~~ {.cpp}
226 /// #include <ROOT/RNTuple.hxx>
227 /// using ROOT::Experimental::ENTupleInfo;
228 /// using ROOT::Experimental::RNTupleReader;
229 ///
230 /// #include <iostream>
231 ///
232 /// auto ntuple = RNTupleReader::Open("myNTuple", "some/file.root");
233 /// ntuple->PrintInfo(ENTupleInfo::kStorageDetails, std::cerr);
234 /// ~~~
235 ///
236 /// For use of ENTupleInfo::kMetrics, see #EnableMetrics.
237 void PrintInfo(const ENTupleInfo what = ENTupleInfo::kSummary, std::ostream &output = std::cout);
238
239 /// Shows the values of the i-th entry/row, starting with 0 for the first entry. By default,
240 /// prints the output in JSON format.
241 /// Uses the visitor pattern to traverse through each field of the given entry.
243 std::ostream &output = std::cout);
244
245 /// Analogous to Fill(), fills the default entry of the model. Returns false at the end of the ntuple.
246 /// On I/O errors, raises an exception.
248 // TODO(jblomer): can be templated depending on the factory method / constructor
249 if (R__unlikely(!fModel)) {
250 fModel = fSource->GetSharedDescriptorGuard()->GenerateModel();
251 ConnectModel(*fModel);
252 }
253 LoadEntry(index, *fModel->GetDefaultEntry());
254 }
255 /// Fills a user provided entry after checking that the entry has been instantiated from the ntuple model
257 for (auto& value : entry) {
258 value.GetField()->Read(index, &value);
259 }
260 }
261
262 /// Returns an iterator over the entry indices of the RNTuple.
263 ///
264 /// **Example: iterate over all entries and print each entry in JSON format**
265 /// ~~~ {.cpp}
266 /// #include <ROOT/RNTuple.hxx>
267 /// using ROOT::Experimental::ENTupleShowFormat;
268 /// using ROOT::Experimental::RNTupleReader;
269 ///
270 /// #include <iostream>
271 ///
272 /// auto ntuple = RNTupleReader::Open("myNTuple", "some/file.root");
273 /// for (auto i : ntuple->GetEntryRange()) {
274 /// ntuple->Show(i, ENTupleShowFormat::kCompleteJSON);
275 /// }
276 /// ~~~
278
279 /// Provides access to an individual field that can contain either a scalar value or a collection, e.g.
280 /// GetView<double>("particles.pt") or GetView<std::vector<double>>("particle"). It can as well be the index
281 /// field of a collection itself, like GetView<NTupleSize_t>("particle").
282 ///
283 /// Raises an exception if there is no field with the given name.
284 ///
285 /// **Example: iterate over a field named "pt" of type `float`**
286 /// ~~~ {.cpp}
287 /// #include <ROOT/RNTuple.hxx>
288 /// using ROOT::Experimental::RNTupleReader;
289 ///
290 /// #include <iostream>
291 ///
292 /// auto ntuple = RNTupleReader::Open("myNTuple", "some/file.root");
293 /// auto pt = ntuple->GetView<float>("pt");
294 ///
295 /// for (auto i : ntuple->GetEntryRange()) {
296 /// std::cout << i << ": " << pt(i) << "\n";
297 /// }
298 /// ~~~
299 template <typename T>
301 auto fieldId = fSource->GetSharedDescriptorGuard()->FindFieldId(fieldName);
302 if (fieldId == kInvalidDescriptorId) {
303 throw RException(R__FAIL("no field named '" + std::string(fieldName) + "' in RNTuple '" +
304 fSource->GetSharedDescriptorGuard()->GetName() + "'"));
305 }
306 return RNTupleView<T>(fieldId, fSource.get());
307 }
308
309 /// Raises an exception if:
310 /// * there is no field with the given name or,
311 /// * the field is not a collection
313 auto fieldId = fSource->GetSharedDescriptorGuard()->FindFieldId(fieldName);
314 if (fieldId == kInvalidDescriptorId) {
315 throw RException(R__FAIL("no field named '" + std::string(fieldName) + "' in RNTuple '" +
316 fSource->GetSharedDescriptorGuard()->GetName() + "'"));
317 }
318 return RNTupleViewCollection(fieldId, fSource.get());
319 }
320
321 RIterator begin() { return RIterator(0); }
322 RIterator end() { return RIterator(GetNEntries()); }
323
324 /// Enable performance measurements (decompression time, bytes read from storage, etc.)
325 ///
326 /// **Example: inspect the reader metrics after loading every entry**
327 /// ~~~ {.cpp}
328 /// #include <ROOT/RNTuple.hxx>
329 /// using ROOT::Experimental::ENTupleInfo;
330 /// using ROOT::Experimental::RNTupleReader;
331 ///
332 /// #include <iostream>
333 ///
334 /// auto ntuple = RNTupleReader::Open("myNTuple", "some/file.root");
335 /// // metrics must be turned on beforehand
336 /// ntuple->EnableMetrics();
337 ///
338 /// for (auto i : ntuple->GetEntryRange()) {
339 /// ntuple->LoadEntry(i);
340 /// }
341 /// ntuple->PrintInfo(ENTupleInfo::kMetrics);
342 /// ~~~
343 void EnableMetrics() { fMetrics.Enable(); }
344 const Detail::RNTupleMetrics &GetMetrics() const { return fMetrics; }
345};
346
347// clang-format off
348/**
349\class ROOT::Experimental::RNTupleWriter
350\ingroup NTuple
351\brief An RNTuple that gets filled with entries (data) and writes them to storage
352
353An output ntuple can be filled with entries. The caller has to make sure that the data that gets filled into an ntuple
354is not modified for the time of the Fill() call. The fill call serializes the C++ object into the column format and
355writes data into the corresponding column page buffers. Writing of the buffers to storage is deferred and can be
356triggered by Flush() or by destructing the ntuple. On I/O errors, an exception is thrown.
357*/
358// clang-format on
360private:
361 /// The page sink's parallel page compression scheduler if IMT is on.
362 /// Needs to be destructed after the page sink is destructed and so declared before.
363 std::unique_ptr<Detail::RPageStorage::RTaskScheduler> fZipTasks;
364 std::unique_ptr<Detail::RPageSink> fSink;
365 /// Needs to be destructed before fSink
366 std::unique_ptr<RNTupleModel> fModel;
368 NTupleSize_t fLastCommitted = 0;
369 NTupleSize_t fLastCommittedClusterGroup = 0;
370 NTupleSize_t fNEntries = 0;
371 /// Keeps track of the number of bytes written into the current cluster
372 std::size_t fUnzippedClusterSize = 0;
373 /// The total number of bytes written to storage (i.e., after compression)
374 std::uint64_t fNBytesCommitted = 0;
375 /// The total number of bytes filled into all the so far committed clusters,
376 /// i.e. the uncompressed size of the written clusters
377 std::uint64_t fNBytesFilled = 0;
378 /// Limit for committing cluster no matter the other tunables
380 /// Estimator of uncompressed cluster size, taking into account the estimated compression ratio
382
383 // Helper function that is called from CommitCluster() when necessary
384 void CommitClusterGroup();
385
386public:
387 /// Throws an exception if the model is null.
388 static std::unique_ptr<RNTupleWriter> Recreate(std::unique_ptr<RNTupleModel> model,
389 std::string_view ntupleName,
390 std::string_view storage,
391 const RNTupleWriteOptions &options = RNTupleWriteOptions());
392 /// Throws an exception if the model is null.
393 static std::unique_ptr<RNTupleWriter> Append(std::unique_ptr<RNTupleModel> model,
394 std::string_view ntupleName,
395 TFile &file,
396 const RNTupleWriteOptions &options = RNTupleWriteOptions());
397 /// Throws an exception if the model or the sink is null.
398 RNTupleWriter(std::unique_ptr<RNTupleModel> model, std::unique_ptr<Detail::RPageSink> sink);
399 RNTupleWriter(const RNTupleWriter&) = delete;
402
403 /// The simplest user interface if the default entry that comes with the ntuple model is used
404 void Fill() { Fill(*fModel->GetDefaultEntry()); }
405 /// Multiple entries can have been instantiated from the ntuple model. This method will perform
406 /// a light check whether the entry comes from the ntuple's own model
407 void Fill(REntry &entry) {
408 if (R__unlikely(entry.GetModelId() != fModel->GetModelId()))
409 throw RException(R__FAIL("mismatch between entry and model"));
410
411 for (auto& value : entry) {
412 fUnzippedClusterSize += value.GetField()->Append(value);
413 }
414 fNEntries++;
415 if ((fUnzippedClusterSize >= fMaxUnzippedClusterSize) || (fUnzippedClusterSize >= fUnzippedClusterSizeEst))
416 CommitCluster();
417 }
418 /// Ensure that the data from the so far seen Fill calls has been written to storage
419 void CommitCluster(bool commitClusterGroup = false);
420
421 std::unique_ptr<REntry> CreateEntry() { return fModel->CreateEntry(); }
422
423 void EnableMetrics() { fMetrics.Enable(); }
424 const Detail::RNTupleMetrics &GetMetrics() const { return fMetrics; }
425
426 const RNTupleModel *GetModel() const { return fModel.get(); }
427};
428
429// clang-format off
430/**
431\class ROOT::Experimental::RCollectionNTuple
432\ingroup NTuple
433\brief A virtual ntuple used for writing untyped collections that can be used to some extent like an RNTupleWriter
434*
435* This class is between a field and a ntuple. It carries the offset column for the collection and the default entry
436* taken from the collection model. It does not, however, own an ntuple model because the collection model has been
437* merged into the larger ntuple model.
438*/
439// clang-format on
441private:
443 std::unique_ptr<REntry> fDefaultEntry;
444public:
445 explicit RCollectionNTupleWriter(std::unique_ptr<REntry> defaultEntry);
449
450 void Fill() { Fill(fDefaultEntry.get()); }
451 void Fill(REntry *entry) {
452 for (auto &value : *entry) {
453 value.GetField()->Append(value);
454 }
455 fOffset++;
456 }
457
458 ClusterSize_t *GetOffsetPtr() { return &fOffset; }
459};
460
461} // namespace Experimental
462} // namespace ROOT
463
464#endif
#define R__unlikely(expr)
Definition: RConfig.hxx:595
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
Definition: RError.hxx:291
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
A collection of Counter objects with a name, a unit, and a description.
The interface of a task scheduler to schedule page (de)compression tasks.
RCollectionNTupleWriter(const RCollectionNTupleWriter &)=delete
RCollectionNTupleWriter & operator=(const RCollectionNTupleWriter &)=delete
std::unique_ptr< REntry > fDefaultEntry
Definition: RNTuple.hxx:443
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
Definition: REntry.hxx:43
std::uint64_t GetModelId() const
Definition: REntry.hxx:108
Base class for all ROOT issued exceptions.
Definition: RError.hxx:114
The on-storage meta-data of an ntuple.
Used to loop over indexes (entries or collections) between start and end.
Definition: RNTupleView.hxx:40
void Reset() final
Start a new set of tasks.
Definition: RNTuple.cxx:48
std::unique_ptr< TTaskGroup > fTaskGroup
Definition: RNTuple.hxx:71
void AddTask(const std::function< void(void)> &taskFunc) final
Take a callable that represents a task.
Definition: RNTuple.cxx:54
void Wait() final
Blocks until all scheduled tasks finished.
Definition: RNTuple.cxx:60
The RNTupleModel encapulates the schema of an ntuple.
Common user-tunable settings for reading ntuples.
bool operator!=(const iterator &rh) const
Definition: RNTuple.hxx:150
bool operator==(const iterator &rh) const
Definition: RNTuple.hxx:149
std::forward_iterator_tag iterator_category
Definition: RNTuple.hxx:135
An RNTuple that is used to read data from storage.
Definition: RNTuple.hxx:103
std::unique_ptr< RNTupleReader > Clone()
Definition: RNTuple.hxx:199
Detail::RNTupleMetrics fMetrics
Definition: RNTuple.hxx:122
std::unique_ptr< Detail::RPageStorage::RTaskScheduler > fUnzipTasks
Set as the page source's scheduler for parallel page decompression if IMT is on Needs to be destructe...
Definition: RNTuple.hxx:107
std::unique_ptr< RNTupleReader > fDisplayReader
We use a dedicated on-demand reader for Show() and Scan().
Definition: RNTuple.hxx:115
void EnableMetrics()
Enable performance measurements (decompression time, bytes read from storage, etc....
Definition: RNTuple.hxx:343
const Detail::RNTupleMetrics & GetMetrics() const
Definition: RNTuple.hxx:344
RNTupleView< T > GetView(std::string_view fieldName)
Provides access to an individual field that can contain either a scalar value or a collection,...
Definition: RNTuple.hxx:300
NTupleSize_t GetNEntries() const
Definition: RNTuple.hxx:203
std::unique_ptr< RNTupleDescriptor > fCachedDescriptor
The ntuple descriptor in the page source is protected by a read-write lock.
Definition: RNTuple.hxx:121
std::unique_ptr< Detail::RPageSource > fSource
Definition: RNTuple.hxx:109
RNTupleGlobalRange GetEntryRange()
Returns an iterator over the entry indices of the RNTuple.
Definition: RNTuple.hxx:277
RNTupleViewCollection GetViewCollection(std::string_view fieldName)
Raises an exception if:
Definition: RNTuple.hxx:312
void LoadEntry(NTupleSize_t index)
Analogous to Fill(), fills the default entry of the model.
Definition: RNTuple.hxx:247
std::unique_ptr< RNTupleModel > fModel
Needs to be destructed before fSource.
Definition: RNTuple.hxx:111
void LoadEntry(NTupleSize_t index, REntry &entry)
Fills a user provided entry after checking that the entry has been instantiated from the ntuple model...
Definition: RNTuple.hxx:256
A view for a collection, that can itself generate new ntuple views for its nested fields.
An RNTupleView provides read-only access to a single field of the ntuple.
Common user-tunable settings for storing ntuples.
An RNTuple that gets filled with entries (data) and writes them to storage.
Definition: RNTuple.hxx:359
NTupleSize_t fUnzippedClusterSizeEst
Estimator of uncompressed cluster size, taking into account the estimated compression ratio.
Definition: RNTuple.hxx:381
std::size_t fMaxUnzippedClusterSize
Limit for committing cluster no matter the other tunables.
Definition: RNTuple.hxx:379
const Detail::RNTupleMetrics & GetMetrics() const
Definition: RNTuple.hxx:424
std::unique_ptr< REntry > CreateEntry()
Definition: RNTuple.hxx:421
std::unique_ptr< RNTupleModel > fModel
Needs to be destructed before fSink.
Definition: RNTuple.hxx:366
RNTupleWriter(const RNTupleWriter &)=delete
Detail::RNTupleMetrics fMetrics
Definition: RNTuple.hxx:367
RNTupleWriter & operator=(const RNTupleWriter &)=delete
std::unique_ptr< Detail::RPageSink > fSink
Definition: RNTuple.hxx:364
void Fill()
The simplest user interface if the default entry that comes with the ntuple model is used.
Definition: RNTuple.hxx:404
const RNTupleModel * GetModel() const
Definition: RNTuple.hxx:426
std::unique_ptr< Detail::RPageStorage::RTaskScheduler > fZipTasks
The page sink's parallel page compression scheduler if IMT is on.
Definition: RNTuple.hxx:363
void Fill(REntry &entry)
Multiple entries can have been instantiated from the ntuple model.
Definition: RNTuple.hxx:407
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
const Int_t n
Definition: legend1.C:16
basic_string_view< char > string_view
ENTupleInfo
Listing of the different options that can be printed by RNTupleReader::GetInfo()
Definition: RNTuple.hxx:52
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Definition: RNTupleUtil.hxx:55
constexpr NTupleSize_t kInvalidNTupleIndex
Definition: RNTupleUtil.hxx:56
REveVectorT< TT > operator*(const REveVectorT< TT > &a, TT b)
Definition: REveVector.hxx:218
ENTupleShowFormat
Listing of the different entry output formats of RNTupleReader::Show()
Definition: RNTuple.hxx:61
constexpr DescriptorId_t kInvalidDescriptorId
Definition: RNTupleUtil.hxx:92
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:167
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
static constexpr double s
Definition: file.py:1
static const char * what
Definition: stlLoader.cc:6
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...
Definition: RNTupleUtil.hxx:58
Used to specify the underlying RNTuples in OpenFriends()
Definition: RNTuple.hxx:154
ROpenSpec(std::string_view n, std::string_view s)
Definition: RNTuple.hxx:160
static void output()