28namespace Experimental {
31 : fNTuple(std::move(ntuple)), fEntry(fNTuple->GetModel()->CreateEntry()), fNSlots(1), fHasSeenAllRanges(false)
33 auto rootField =
fNTuple->GetModel()->GetRootField();
34 for (
auto&
f : *rootField) {
35 if (
f.GetParent() != rootField)
57 const auto index = std::distance(
62 std::vector<void*> ptrs;
76 std::vector<std::pair<ULong64_t, ULong64_t>> ranges;
79 auto nEntries =
fNTuple->GetNEntries();
80 const auto chunkSize = nEntries /
fNSlots;
87 ranges.emplace_back(start, end);
90 ranges.back().second += reminder;
98 const auto index = std::distance(
unsigned long long ULong64_t
typedef void((*Func_t)())
std::unique_ptr< ROOT::Experimental::REntry > fEntry
const std::vector< std::string > & GetColumnNames() const final
Returns a reference to the collection of the dataset's column names.
void SetNSlots(unsigned int nSlots) final
Inform RDataSource of the number of processing slots (i.e.
bool SetEntry(unsigned int slot, ULong64_t entry) final
Advance the "cursors" returned by GetColumnReaders to the selected entry for a particular slot.
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
std::unique_ptr< ROOT::Experimental::RNTupleReader > fNTuple
std::vector< std::string > fColumnNames
std::string GetTypeName(std::string_view colName) const final
Type of a column as a string, e.g.
std::vector< std::pair< ULong64_t, ULong64_t > > GetEntryRanges() final
Return ranges of entries to distribute to tasks.
RNTupleDS(std::unique_ptr< ROOT::Experimental::RNTupleReader > ntuple)
bool HasColumn(std::string_view colName) const final
Checks if the dataset has a certain column.
std::vector< std::string > fColumnTypes
std::vector< void * > fValuePtrs
void Initialise() final
Convenience method called before starting an event-loop.
static std::unique_ptr< RNTupleReader > Open(std::unique_ptr< RNTupleModel > model, std::string_view ntupleName, std::string_view storage)
std::vector< void * > Record_t
ROOT's RDataFrame offers a high level interface for analyses of data stored in TTrees,...
A pseudo container class which is a generator of indices.
basic_string_view< char > string_view
RDataFrame MakeNTupleDataFrame(std::string_view ntupleName, std::string_view fileName)
Namespace for new ROOT classes and functions.