85 return representations;
97 static_assert(std::is_integral_v<T>,
"T must be an integral type");
101 if constexpr (std::is_same_v<T, bool> || std::is_same_v<T, std::uint64_t>)
105 ". Please read the column with a larger-sized integral type."));
110 std::unique_ptr<ROOT::RFieldBase>
CloneImpl(std::string_view newName)
const final
112 return std::make_unique<RRDFCardinalityField>(newName);
137 *
static_cast<T *
>(to) =
size;
147 *
static_cast<T *
>(to) =
size;
161 std::unique_ptr<ROOT::RFieldBase>
CloneImpl(std::string_view newName)
const final
163 return std::make_unique<RArraySizeField>(newName,
fArrayLength);
192 void ConstructValue(
void *where) const final { *
static_cast<std::size_t *
>(where) = 0; }
194 std::size_t
GetAlignment() const final {
return alignof(std::size_t); }
205 std::unique_ptr<RFieldBase::RValue>
fValue;
232 auto iReal =
fField->begin();
233 for (; iReal !=
fField->end(); ++iProto, ++iReal) {
234 iReal->SetOnDiskId(descGuard->FindFieldId(
fDataSource->fFieldId2QualifiedName.at(iProto->GetOnDiskId())));
246 std::string msg =
"RNTupleDS: invalid type \"" +
fField->GetTypeName() +
"\" for column \"" +
247 fDataSource->fFieldId2QualifiedName[
fField->GetOnDiskId()] +
"\" with on-disk type \"" +
249 throw std::runtime_error(msg);
259 fValue = std::make_unique<RFieldBase::RValue>(
fField->CreateValue());
265 if (
fValue && keepValue) {
279 return fValue->GetPtr<
void>().get();
326 fieldInfos.emplace_back(fieldId, nRepetitions);
333 bool representableAsRVec =
334 convertToRVec && (fieldDesc.GetTypeName().substr(0, 19) ==
"ROOT::VecOps::RVec<" ||
335 fieldDesc.GetTypeName().substr(0, 12) ==
"std::vector<" || fieldDesc.GetTypeName() ==
"");
337 AddField(desc, colName,
f.GetId(), fieldInfos, representableAsRVec);
343 }
else if (nRepetitions > 0) {
346 AddField(desc, colName,
f.GetId(), fieldInfos);
351 auto innerName = colName.empty() ?
f.GetFieldName() : (std::string(colName) +
"." +
f.GetFieldName());
353 AddField(desc, innerName,
f.GetId(), fieldInfos);
360 if (!fieldOrException)
362 auto valueField = fieldOrException.Unwrap();
363 if (
const auto cardinalityField =
dynamic_cast<const ROOT::RCardinalityField *
>(valueField.get())) {
365 if (cardinalityField->As32Bit()) {
367 std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::uint32_t>>(fieldDesc.GetFieldName());
368 }
else if (cardinalityField->As64Bit()) {
370 std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::uint64_t>>(fieldDesc.GetFieldName());
372 R__ASSERT(
false &&
"cardinality field stored with an unexpected integer type");
375 valueField->SetOnDiskId(fieldId);
376 for (
auto &
f : *valueField) {
377 f.SetOnDiskId(desc.
FindFieldId(
f.GetFieldName(),
f.GetParent()->GetOnDiskId()));
379 std::unique_ptr<ROOT::RFieldBase> cardinalityField;
381 if (!fieldInfos.empty()) {
382 const auto &info = fieldInfos.back();
384 if (info.fNRepetitions > 0) {
385 cardinalityField = std::make_unique<ROOT::Internal::RDF::RArraySizeField>(
name, info.fNRepetitions);
387 cardinalityField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::size_t>>(
name);
389 cardinalityField->SetOnDiskId(info.fFieldId);
392 for (
auto i = fieldInfos.rbegin(); i != fieldInfos.rend(); ++i) {
393 const auto &fieldInfo = *i;
395 const auto valueFieldName = valueField->GetFieldName();
397 if (fieldInfo.fNRepetitions > 0) {
400 std::make_unique<ROOT::RArrayAsRVecField>(valueFieldName, valueField->Clone(
"_0"), fieldInfo.fNRepetitions);
405 valueField = std::make_unique<ROOT::RRVecField>(valueFieldName, valueField->Clone(
"_0"));
412 valueField->SetOnDiskId(fieldInfo.fFieldId);
416 if (i != fieldInfos.rbegin()) {
417 const auto cardinalityFieldName = cardinalityField->GetFieldName();
418 if (fieldInfo.fNRepetitions > 0) {
420 cardinalityField = std::make_unique<ROOT::RArrayAsRVecField>(
421 cardinalityFieldName, cardinalityField->Clone(
"_0"), fieldInfo.fNRepetitions);
424 cardinalityField = std::make_unique<ROOT::RRVecField>(cardinalityFieldName, cardinalityField->Clone(
"_0"));
427 cardinalityField->SetOnDiskId(fieldInfo.fFieldId);
431 if (cardinalityField) {
432 fColumnNames.emplace_back(
"R_rdf_sizeof_" + std::string(colName));
433 fColumnTypes.emplace_back(cardinalityField->GetTypeName());
437 fieldInfos.emplace_back(fieldId, nRepetitions);
445 pageSource->Attach();
450 std::vector<ROOT::RDF::RNTupleDS::RFieldInfo>());
453 const auto nTopLevelFields = std::distance(topLevelFields.begin(), topLevelFields.end());
455 for (
const auto &field : topLevelFields)
467 static std::once_flag flag;
468 std::call_once(flag, []() {
469 if (
auto env =
gSystem->Getenv(
"ROOT_RNTUPLE_CLUSTERBUNCHSIZE"); env !=
nullptr && strlen(env) > 0) {
470 std::string envStr{env};
471 auto envNum{std::stoul(envStr)};
472 envNum = envNum == 0 ? 1 : envNum;
479std::unique_ptr<ROOT::Internal::RPageSource> CreatePageSource(std::string_view ntupleName, std::string_view fileName)
486 :
RNTupleDS(CreatePageSource(ntupleName, fileName))
489 fFileNames = std::vector<std::string>{std::string{fileName}};
493 :
RNTupleDS(CreatePageSource(ntupleName, fileNames[0]))
501 const std::pair<ULong64_t, ULong64_t> &range)
536 if (
auto altProtoField = std::find_if(altProtoFields.begin(), altProtoFields.end(),
537 [&requestedType](
const std::unique_ptr<ROOT::RFieldBase> &fld) {
538 return fld->GetTypeName() == requestedType;
540 altProtoField != altProtoFields.end()) {
541 return altProtoField->get();
545 std::unique_ptr<RFieldBase> newAltProtoField;
546 const std::string strName = std::string(fieldName);
548 if (requestedType ==
"bool") {
549 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<bool>>(strName);
550 }
else if (requestedType ==
"char") {
551 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<char>>(strName);
552 }
else if (requestedType ==
"std::int8_t") {
553 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::int8_t>>(strName);
554 }
else if (requestedType ==
"std::uint8_t") {
555 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::uint8_t>>(strName);
556 }
else if (requestedType ==
"std::int16_t") {
557 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::int16_t>>(strName);
558 }
else if (requestedType ==
"std::uint16_t") {
559 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::uint16_t>>(strName);
560 }
else if (requestedType ==
"std::int32_t") {
561 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::int32_t>>(strName);
562 }
else if (requestedType ==
"std::uint32_t") {
563 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::uint32_t>>(strName);
564 }
else if (requestedType ==
"std::int64_t") {
565 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::int64_t>>(strName);
566 }
else if (requestedType ==
"std::uint64_t") {
567 newAltProtoField = std::make_unique<ROOT::Internal::RDF::RRDFCardinalityField<std::uint64_t>>(strName);
569 throw std::runtime_error(
"RNTupleDS: Could not create field with type \"" + requestedType +
570 "\" for column \"" + std::string(fieldName) +
"\"");
574 if (!newAltProtoFieldOrException) {
575 throw std::runtime_error(
"RNTupleDS: Could not create field with type \"" + requestedType +
576 "\" for column \"" + std::string(fieldName) +
"\"");
578 newAltProtoField = newAltProtoFieldOrException.Unwrap();
580 newAltProtoField->SetOnDiskId(
fProtoFields[index]->GetOnDiskId());
581 auto *newField = newAltProtoField.get();
582 altProtoFields.emplace_back(std::move(newAltProtoField));
590std::unique_ptr<ROOT::Detail::RDF::RColumnReaderBase>
594 assert(field !=
nullptr);
599 for (
const auto &s : *field) {
603 auto reader = std::make_unique<ROOT::Internal::RDF::RNTupleColumnReader>(
this, field);
609void ROOT::RDF::RNTupleDS::ExecStaging()
612 std::unique_lock lock(fMutexStaging);
613 fCvStaging.wait(lock, [
this] {
return fIsReadyForStaging || fStagingThreadShouldTerminate; });
614 if (fStagingThreadShouldTerminate)
617 assert(!fHasNextSources);
619 fHasNextSources =
true;
620 fIsReadyForStaging =
false;
623 fCvStaging.notify_one();
653 if (nRemainingFiles == 0)
672 auto nEntries = range.
fSource->GetNEntries();
685 unsigned int nSlotsPerFile =
fNSlots / nRemainingFiles;
687 std::unique_ptr<ROOT::Internal::RPageSource> source;
698 auto nEntries = source->GetNEntries();
703 if (i == (nRemainingFiles - 1))
706 const auto rangesByCluster = [&source]() {
708 const auto descGuard = source->GetSharedDescriptorGuard();
712 const unsigned int nRangesByCluster = rangesByCluster.size();
715 const auto nClustersPerSlot = nRangesByCluster / nSlotsPerFile;
716 const auto remainder = nRangesByCluster % nSlotsPerFile;
717 std::size_t iRange = 0;
718 unsigned int iSlot = 0;
719 const unsigned int N = std::min(nSlotsPerFile, nRangesByCluster);
720 for (; iSlot <
N; ++iSlot) {
721 auto start = rangesByCluster[iRange].fFirstEntry;
722 iRange += nClustersPerSlot +
static_cast<int>(iSlot < remainder);
724 auto end = rangesByCluster[iRange - 1].fLastEntryPlusOne;
729 if (iSlot ==
N - 1) {
730 range.
fSource = std::move(source);
732 range.
fSource = source->Clone();
744 std::vector<std::pair<ULong64_t, ULong64_t>> ranges;
754 r->Disconnect(
true );
804 nEntriesPerSource = 0;
810 nEntriesPerSource += end -
start;
842 std::optional<std::pair<ULong64_t, ULong64_t>> newvalues({end,
fGlobalEntryRange->second});
861 ranges.emplace_back(
start, end);
905 r->Disconnect(
true );
914 auto msg = std::string(
"RNTupleDS: There is no column with name \"") + std::string(colName) +
"\"";
915 throw std::runtime_error(msg);
918 const auto index = std::distance(
fColumnNames.begin(), colNamePos);
951 for (
unsigned int i = 0; i <
fNSlots; ++i) {
953 r->Disconnect(
false );
983 return ROOT::RDataFrame(std::make_unique<ROOT::RDF::RNTupleDS>(ntupleName, fileName));
988 return ROOT::RDataFrame(std::make_unique<ROOT::RDF::RNTupleDS>(ntupleName, fileNames));
992 unsigned int slot,
const std::unordered_map<std::string, ROOT::RDF::Experimental::RSample *> &sampleMap)
const
1005 const auto &ntupleName =
fCurrentRanges[rangeIdx].fSource->GetNTupleName();
1007 const auto ntupleID = std::string(ntuplePath) +
'/' + ntupleName;
1009 if (sampleMap.empty())
1014 if (sampleMap.find(ntupleID) == sampleMap.end())
1015 throw std::runtime_error(
"Full sample identifier '" + ntupleID +
"' cannot be found in the available samples.");
1024 const std::pair<ULong64_t, ULong64_t> &range)
1026 std::unique_ptr<ROOT::RDF::RNTupleDS> ds{
new ROOT::RDF::RNTupleDS(ntupleName, fileNames, range)};
1035 const auto descGuard = source->GetSharedDescriptorGuard();
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
long long Long64_t
Portable signed long integer 8 bytes.
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void GenerateColumns(const ROOT::RNTupleDescriptor &) final
Implementations in derived classes should create the backing columns corresponding to the field type ...
void ReadGlobalImpl(ROOT::NTupleSize_t, void *to) final
RArraySizeField(const RArraySizeField &other)=delete
RArraySizeField(RArraySizeField &&other)=default
RArraySizeField & operator=(RArraySizeField &&other)=default
RArraySizeField(std::string_view name, std::size_t arrayLength)
void ReadInClusterImpl(RNTupleLocalIndex, void *to) final
void ReconcileOnDiskField(const RNTupleDescriptor &) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
~RArraySizeField() final=default
RArraySizeField & operator=(const RArraySizeField &other)=delete
std::size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
std::unique_ptr< ROOT::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
ROOT::Internal::RPageSource RPageSource
void * GetImpl(Long64_t entry) final
void Connect(RPageSource &source, Long64_t entryOffset)
Connect the field and its subfields to the page source.
ROOT::RFieldBase RFieldBase
RNTupleColumnReader(RNTupleDS *ds, RFieldBase *protoField)
std::unique_ptr< RFieldBase::RValue > fValue
The memory location used to read from fField.
std::unique_ptr< RFieldBase > fField
The field backing the RDF column.
Long64_t fEntryOffset
For chains, the logical entry and the physical entry in any particular file can be different.
std::shared_ptr< void > fValuePtr
Used to reuse the object created by fValue when reconnecting sources.
RNTupleDS * fDataSource
The data source that owns this column reader.
~RNTupleColumnReader() override=default
RFieldBase * fProtoField
The prototype field from which fField is cloned.
Long64_t fLastEntry
Last entry number that was read.
void Disconnect(bool keepValue)
void ReconcileOnDiskField(const RNTupleDescriptor &) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
RRDFCardinalityFieldBase(std::string_view name, std::string_view type)
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void GenerateColumns(const ROOT::RNTupleDescriptor &desc) final
Implementations in derived classes should create the backing columns corresponding to the field type ...
~RRDFCardinalityFieldBase() override=default
RRDFCardinalityFieldBase(const RRDFCardinalityFieldBase &other)=delete
RRDFCardinalityFieldBase(RRDFCardinalityFieldBase &&other)=default
RRDFCardinalityFieldBase & operator=(const RRDFCardinalityFieldBase &other)=delete
RRDFCardinalityFieldBase & operator=(RRDFCardinalityFieldBase &&other)=default
RRDFCardinalityField(RRDFCardinalityField &&other)=default
void CheckSize(ROOT::NTupleSize_t size) const
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
RRDFCardinalityField & operator=(const RRDFCardinalityField &other)=delete
void ReadInClusterImpl(ROOT::RNTupleLocalIndex localIndex, void *to) final
Get the number of elements of the collection identified by clusterIndex.
std::size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
RRDFCardinalityField(const RRDFCardinalityField &other)=delete
RRDFCardinalityField & operator=(RRDFCardinalityField &&other)=default
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
Get the number of elements of the collection identified by globalIndex.
std::unique_ptr< ROOT::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
~RRDFCardinalityField() override=default
RRDFCardinalityField(std::string_view name)
std::size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
static void SetClusterBunchSize(RNTupleReadOptions &options, unsigned int val)
Abstract interface to read data from an ntuple.
const RSharedDescriptorGuard GetSharedDescriptorGuard() const
Takes the read lock for the descriptor.
static std::unique_ptr< RPageSource > Create(std::string_view ntupleName, std::string_view location, const ROOT::RNTupleReadOptions &options=ROOT::RNTupleReadOptions())
Guess the concrete derived page source from the file name (location).
std::vector< void * > Record_t
std::optional< std::pair< ULong64_t, ULong64_t > > fGlobalEntryRange
The RDataSource implementation for RNTuple.
bool fHasNextSources
Is true when the staging thread has populated the next batch of files to fStagingArea.
std::vector< std::pair< ULong64_t, ULong64_t > > GetEntryRanges() final
Return ranges of entries to distribute to tasks.
std::vector< REntryRangeDS > fNextRanges
Basis for the ranges populated by the PrepareNextRanges() call.
std::unordered_map< ULong64_t, std::size_t > fFirstEntry2RangeIdx
Maps the first entries from the ranges of the last GetEntryRanges() call to their corresponding index...
bool fStagingThreadShouldTerminate
Is true when the I/O thread should quit.
std::vector< std::vector< ROOT::Internal::RDF::RNTupleColumnReader * > > fActiveColumnReaders
List of column readers returned by GetColumnReaders() organized by slot.
std::vector< std::unique_ptr< ROOT::Internal::RPageSource > > fStagingArea
The staging area is relevant for chains of files, i.e.
std::vector< std::pair< ULong64_t, ULong64_t > > fOriginalRanges
std::unique_ptr< ROOT::Detail::RDF::RColumnReaderBase > GetColumnReaders(unsigned int, std::string_view, const std::type_info &) final
If the other GetColumnReaders overload returns an empty vector, this overload will be called instead.
std::vector< std::size_t > fSlotsToRangeIdxs
One element per slot, corresponding to the current range index for that slot, as filled by InitSlot.
std::vector< std::unique_ptr< ROOT::RFieldBase > > fProtoFields
We prepare a prototype field for every column.
void SetNSlots(unsigned int nSlots) final
Inform RDataSource of the number of processing slots (i.e.
ROOT::RFieldBase * GetFieldWithTypeChecks(std::string_view fieldName, const std::type_info &tid)
std::vector< std::string > fFileNames
bool fIsReadyForStaging
Is true when the staging thread should start working.
void InitSlot(unsigned int slot, ULong64_t firstEntry) final
Convenience method called at the start of the data processing associated to a slot.
ROOT::RNTupleDescriptor fPrincipalDescriptor
A clone of the first pages source's descriptor.
ULong64_t fSeenEntriesNoGlobalRange
The number of entries seen so far in GetEntryRanges().
std::vector< REntryRangeDS > fCurrentRanges
Basis for the ranges returned by the last GetEntryRanges() call.
std::vector< std::string > fTopLevelFieldNames
RNTupleDS(std::unique_ptr< ROOT::Internal::RPageSource > pageSource)
std::string GetTypeName(std::string_view colName) const final
Type of a column as a string, e.g.
std::size_t fNextFileIndex
Index into fFileNames to the next file to process.
std::unordered_map< ROOT::DescriptorId_t, std::string > fFieldId2QualifiedName
Connects the IDs of active proto fields and their subfields to their fully qualified name (a....
std::string fNTupleName
The data source may be constructed with an ntuple name and a list of files.
void PrepareNextRanges()
Populates fNextRanges with the next set of entry ranges.
void StageNextSources()
Provides the RDF column "colName" given the field identified by fieldID.
std::condition_variable fCvStaging
Signal for the state information of fIsReadyForStaging and fHasNextSources.
void Finalize() final
Convenience method called after concluding an event-loop.
std::thread fThreadStaging
The background thread that runs StageNextSources().
std::mutex fMutexStaging
Protects the shared state between the main thread and the I/O thread.
std::unordered_map< std::size_t, std::vector< std::unique_ptr< ROOT::RFieldBase > > > fAlternativeProtoFields
Columns may be requested with types other than with which they were initially added as proto fields.
std::vector< std::string > fColumnTypes
void Initialize() final
Convenience method called before starting an event-loop.
std::vector< std::string > fColumnNames
bool HasColumn(std::string_view colName) const final
Checks if the dataset has a certain column.
Record_t GetColumnReadersImpl(std::string_view name, const std::type_info &) final
type-erased vector of pointers to pointers to column values - one per slot
void FinalizeSlot(unsigned int slot) final
Convenience method called at the end of the data processing associated to a slot.
This type represents a sample identifier, to be used in conjunction with RDataFrame features such as ...
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
Base class for all ROOT issued exceptions.
The list of column representations a field can have.
A field translates read and write calls from/to underlying columns to/from tree values.
ROOT::Internal::RColumn * fPrincipalColumn
All fields that have columns have a distinct main column.
const std::string & GetFieldName() const
RFieldBase(std::string_view name, std::string_view type, ROOT::ENTupleStructure structure, bool isSimple, std::size_t nRepetitions=0)
The constructor creates the underlying column objects and connects them to either a sink or a source.
static RResult< std::unique_ptr< RFieldBase > > Create(const std::string &fieldName, const std::string &typeName, const ROOT::RCreateFieldOptions &options, const ROOT::RNTupleDescriptor *desc, ROOT::DescriptorId_t fieldId)
Factory method to resurrect a field from the stored on-disk type information.
ROOT::DescriptorId_t GetOnDiskId() const
void GenerateColumnsImpl()
For writing, use the currently set column representative.
std::uint64_t GetNRepetitions() const
const std::string & GetFieldName() const
const std::string & GetTypeName() const
The container field for an ntuple model, which itself has no physical representation.
std::vector< std::unique_ptr< RFieldBase > > ReleaseSubfields()
Moves all subfields into the returned vector.
void Attach(std::unique_ptr< RFieldBase > child)
A public version of the Attach method that allows piece-wise construction of the zero field.
The on-storage metadata of an RNTuple.
RFieldDescriptorIterable GetFieldIterable(const RFieldDescriptor &fieldDesc) const
const RFieldDescriptor & GetFieldDescriptor(ROOT::DescriptorId_t fieldId) const
ROOT::DescriptorId_t FindFieldId(std::string_view fieldName, ROOT::DescriptorId_t parentId) const
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
Common user-tunable settings for reading RNTuples.
std::string TypeID2TypeName(const std::type_info &id)
Returns the name of a type starting from its type_info An empty string is returned in case of failure...
ROOT::RDataFrame FromRNTuple(std::string_view ntupleName, const std::vector< std::string > &fileNames, const std::pair< ULong64_t, ULong64_t > &range)
Internal overload of the function that allows passing a range of entries.
std::pair< std::vector< ROOT::Internal::RNTupleClusterBoundaries >, ROOT::NTupleSize_t > GetClustersAndEntries(std::string_view ntupleName, std::string_view location)
Retrieves the cluster boundaries and the number of entries for the input RNTuple.
constexpr std::size_t CacheLineStep()
Stepping through CacheLineStep<T> values in a vector<T> brings you to a new cache line.
void SetAllowFieldSubstitutions(RFieldZero &fieldZero, bool val)
void CallConnectPageSourceOnField(RFieldBase &, ROOT::Internal::RPageSource &)
std::vector< ROOT::Internal::RNTupleClusterBoundaries > GetClusterBoundaries(const RNTupleDescriptor &desc)
Return the cluster boundaries for each cluster in this RNTuple.
std::string GetRenormalizedTypeName(const std::string &metaNormalizedName)
Given a type name normalized by ROOT meta, renormalize it for RNTuple. E.g., insert std::prefix.
RDataFrame FromRNTuple(std::string_view ntupleName, std::string_view fileName)
std::vector< std::string > ColumnNames_t
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
ENTupleStructure
The fields in the RNTuple data model tree can carry different structural information about the type s...
Tag to let data sources use the native data type when creating a column reader.
The PrepareNextRanges() method populates the fNextRanges list with REntryRangeDS records.
std::string_view fFileName
Storage location of the current RNTuple.
ULong64_t fLastEntry
End entry index in fSource, e.g. the number of entries in the range is fLastEntry - fFirstEntry.
std::unique_ptr< ROOT::Internal::RPageSource > fSource
ULong64_t fFirstEntry
First entry index in fSource.