Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RNTupleExporter.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleExporter.hxx
2/// \ingroup NTuple ROOT7
3/// \author Giacomo Parolini <giacomo.parolini@cern.ch>
4/// \date 2024-12-10
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_RNTupleExporter
17#define ROOT7_RNTupleExporter
18
19#include <ROOT/RNTupleTypes.hxx>
20
21#include <cstdint>
22#include <string>
23#include <vector>
24#include <unordered_set>
25
26namespace ROOT::Internal {
27class RPageSource;
28}
29
31
33public:
34 enum class EFilterType {
35 /// Don't export items contained in the filter's set
37 /// Export only items contained in the filter's set
39 };
40
41 template <typename T>
42 struct RFilter {
43 std::unordered_set<T> fSet;
45 };
46
49 kNone = 0x0,
51 /// If enabled, the exporter will report the current progress on the stderr
53 /// If enabled, uncompress (but don't unpack) the page (mutually exclusive with kIncludeChecksums)
55
57 };
58
59 std::string fOutputPath;
60 std::uint64_t fFlags;
61
62 /// Optional filter that determines which columns are included or excluded from being exported.
63 /// By default, export all columns. If you only want to include certain column types, add them
64 /// to `fColumnTypeFilter.fSet` and change `fColumnTypeFilter.fType` to kWhitelist.
66
68 };
69
70 struct RPagesResult {
71 std::vector<std::string> fExportedFileNames;
72 };
73
74 /// Given a page source, writes all its pages to individual files (1 per page).
75 /// If the source is not already attached, it will be attached by this process.
77};
78
79} // namespace ROOT::Experimental::Internal
80
81#endif
@ kWhitelist
Export only items contained in the filter's set.
@ kBlacklist
Don't export items contained in the filter's set.
static RPagesResult ExportPages(ROOT::Internal::RPageSource &source, const RPagesOptions &options={})
Given a page source, writes all its pages to individual files (1 per page).
Abstract interface to read data from an ntuple.
RFilter< ENTupleColumnType > fColumnTypeFilter
Optional filter that determines which columns are included or excluded from being exported.
@ kDecompress
If enabled, uncompress (but don't unpack) the page (mutually exclusive with kIncludeChecksums)
@ kShowProgressBar
If enabled, the exporter will report the current progress on the stderr.