Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 <cstdint>
20#include <string>
21#include <vector>
22#include <unordered_set>
23
24#include <ROOT/RNTupleUtil.hxx>
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
55 };
56
57 std::string fOutputPath;
58 std::uint64_t fFlags;
59
60 /// Optional filter that determines which columns are included or excluded from being exported.
61 /// By default, export all columns. If you only want to include certain column types, add them
62 /// to `fColumnTypeFilter.fSet` and change `fColumnTypeFilter.fType` to kWhitelist.
64
66 };
67
68 struct RPagesResult {
69 std::vector<std::string> fExportedFileNames;
70 };
71
72 /// Given a page source, writes all its pages to individual files (1 per page).
73 /// If the source is not already attached, it will be attached by this process.
75};
76
77} // namespace ROOT::Experimental::Internal
78
79#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.
@ kShowProgressBar
If enabled, the exporter will report the current progress on the stderr.