30 static RLogChannel
sLog(
"ROOT.RNTupleExporter");
34struct RColumnExportInfo {
39 RColumnExportInfo(
const RNTupleDescriptor &desc,
const RColumnDescriptor &
colDesc,
const RFieldDescriptor &
fieldDesc)
49struct RAddColumnsResult {
68 const RFieldDescriptor &
fieldDesc,
const RNTupleExporter::RPagesOptions &options)
73 RAddColumnsResult res{};
92int CountPages(
const RNTupleDescriptor &desc, std::span<const RColumnExportInfo>
columns)
95 DescriptorId_t
clusterId = desc.FindClusterId(0, 0);
116 auto desc =
source.GetSharedDescriptorGuard();
149 <<
"exporting column \"" <<
colInfo.fQualifiedName <<
"\" (" <<
pages.fPageInfos.size() <<
" pages)";
163 std::ostringstream
ss{options.
fOutputPath, std::ios_base::ate};
166 <<
"_elems_" <<
pageInfo.fNElements <<
"_comp_" << *
colRange.fCompressionSettings <<
".page";
171 R__FAIL(std::string(
"output path ") + options.
fOutputPath +
" does not exist or is not writable!"));
194 std::ostringstream
ss;
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__LOG_DEBUG(DEBUGLEVEL,...)
const RColumnDescriptor * fColDesc
const RFieldDescriptor * fFieldDesc
std::string fQualifiedName
static void AddColumnsFromField(std::vector< RColumnMergeInfo > &columns, const RNTupleDescriptor &srcDesc, RNTupleMergeData &mergeData, const RFieldDescriptor &srcFieldDesc, const RFieldDescriptor &dstFieldDesc, const std::string &prefix="")
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
std::string & operator+=(std::string &left, const TString &right)
Managed a set of clusters containing compressed and packed pages.
An in-memory subset of the packed and compressed pages of a cluster.
std::unordered_set< DescriptorId_t > ColumnSet_t
@ 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).
A page as being stored on disk, that is packed and compressed.
Abstract interface to read data from an ntuple.
Base class for all ROOT issued exceptions.
A log configuration for a channel, e.g.
const_iterator end() const
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
constexpr DescriptorId_t kInvalidDescriptorId
std::unordered_set< T > fSet
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.
std::vector< std::string > fExportedFileNames
On-disk pages within a page source are identified by the column and page number.