9#ifndef ROOT_RNTupleProcessorDS
10#define ROOT_RNTupleProcessorDS
21#include <unordered_map>
50 std::vector<ROOT::Experimental::Internal::RDF::RNTupleProcessorColumnReader *>
fColumnReaders;
101 bool convertToRVec =
true);
111 void SetNSlots(
unsigned int nSlots) final;
115 bool HasColumn(std::string_view colName)
const final;
116 std::string
GetTypeName(std::string_view colName)
const final;
117 std::vector<std::pair<ULong64_t, ULong64_t>>
GetEntryRanges() final;
118 std::
string GetLabel() final {
return "RNTupleProcessorDS"; }
128 ROOT::RDF::RSampleInfo
130 const std::unordered_map<std::
string,
ROOT::RDF::Experimental::RSample *> &) const final;
139namespace
ROOT::Experimental::RDF {
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
std::string GetTypeName(std::string_view colName) const final
Type of a column as a string, e.g.
~RNTupleProcessorDS() final
std::unique_ptr< RNTupleProcessor > fProcessor
void Finalize() final
Convenience method called after concluding an event-loop.
bool HasColumn(std::string_view colName) const final
Checks if the dataset has a certain column.
std::vector< std::pair< ULong64_t, ULong64_t > > GetEntryRanges() final
Return ranges of entries to distribute to tasks.
void FinalizeSlot(unsigned int slot) final
Convenience method called at the end of the data processing associated to a 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
RNTupleProcessorDS(const RNTupleProcessorDS &)=delete
std::vector< std::string > fColumnNames
RNTupleProcessorDS(std::unique_ptr< ROOT::RNTupleProcessor > processor)
void Initialize() final
Convenience method called before starting an event-loop.
std::vector< ROOT::Experimental::Internal::RDF::RNTupleProcessorColumnReader * > fColumnReaders
RNTupleProcessorDS & operator=(RNTupleProcessorDS &&)=delete
std::unique_ptr< ROOT::Detail::RDF::RColumnReaderBase > GetColumnReaders(unsigned int slot, std::string_view name, const std::type_info &) final
If the other GetColumnReaders overload returns an empty vector, this overload will be called instead.
std::vector< std::string > fColumnTypes
std::vector< std::pair< ULong64_t, ULong64_t > > fCurrentRanges
void InitSlot(unsigned int slot, ULong64_t firstEntry) final
Convenience method called at the start of the data processing associated to a slot.
std::string GetLabel() final
Return a string representation of the datasource type.
void AddField(const ROOT::RFieldBase &field, std::string_view colName, ROOT::Internal::RNTupleProcessorProvenance procProvenance, std::deque< RFieldInfo > &fieldInfos, bool convertToRVec=true)
Provides the RDF column "colName" given the field.
bool SetEntry(unsigned int, ULong64_t) final
Advance the "cursors" returned by GetColumnReaders to the selected entry for a particular slot.
RNTupleProcessorDS & operator=(const RNTupleProcessorDS &)=delete
RNTupleProcessorDS(RNTupleProcessorDS &&)=delete
std::size_t GetNFiles() const final
Returns the number of files from which the dataset is constructed.
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.
RNTupleProcessor::REntryMapping fEntryMapping
Pure virtual base class for all column reader types.
std::uint64_t FieldIndex_t
RDataSource defines an API that RDataFrame can use to read arbitrary data formats.
friend ROOT::RDF::RSampleInfo ROOT::Internal::RDF::CreateSampleInfo(const ROOT::RDF::RDataSource &, unsigned int, const std::unordered_map< std::string, ROOT::RDF::Experimental::RSample * > &)
std::vector< void * > Record_t
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
A field translates read and write calls from/to underlying columns to/from tree values.
Maps a processor's global (outer) entry index to its inner ones.
RDataFrame FromRNTupleProcessor(std::unique_ptr< ROOT::RNTupleProcessor > processor)
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
Holds useful information about fields added to the RNTupleProcessorDS.
std::size_t fNRepetitions
RFieldInfo(ROOT::DescriptorId_t onDiskId, std::string_view fieldName, std::string_view typeName, std::size_t nRepetitions, ROOT::Internal::RNTupleProcessorEntry::FieldIndex_t entryFieldIdx)
ROOT::DescriptorId_t fOnDiskId
ROOT::Internal::RNTupleProcessorEntry::FieldIndex_t fEntryFieldIdx