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 <cstdint>
20#include <string>
21#include <vector>
22#include <unordered_set>
23
24#include <ROOT/RNTupleUtil.hxx>
25
27
28class RPageSource;
29
31public:
32 enum class EFilterType {
33 /// Don't export items contained in the filter's set
35 /// Export only items contained in the filter's set
37 };
38
39 template <typename T>
40 struct RFilter {
41 std::unordered_set<T> fSet;
43 };
44
47 kNone = 0x0,
49 /// If enabled, the exporter will report the current progress on the stderr
51
53 };
54
55 std::string fOutputPath;
56 std::uint64_t fFlags;
57
58 /// Optional filter that determines which columns are included or excluded from being exported.
59 /// By default, export all columns. If you only want to include certain column types, add them
60 /// to `fColumnTypeFilter.fSet` and change `fColumnTypeFilter.fType` to kWhitelist.
62
64 };
65
66 struct RPagesResult {
67 std::vector<std::string> fExportedFileNames;
68 };
69
70 /// Given a page source, writes all its pages to individual files (1 per page).
71 /// If the source is not already attached, it will be attached by this process.
72 static RPagesResult ExportPages(RPageSource &source, const RPagesOptions &options = {});
73};
74
75} // namespace ROOT::Experimental::Internal
76
77#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(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< EColumnType > 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.