9#ifndef ROOT_RNTupleProcessorDS
10#define ROOT_RNTupleProcessorDS
21#include <unordered_map>
50 std::vector<ROOT::Experimental::Internal::RDF::RNTupleProcessorColumnReader *>
fColumnReaders;
63 std::size_t nRepetitions)
96 bool convertToRVec =
true);
106 void SetNSlots(
unsigned int nSlots) final;
110 bool HasColumn(std::string_view colName)
const final;
111 std::string
GetTypeName(std::string_view colName)
const final;
112 std::vector<std::pair<ULong64_t, ULong64_t>>
GetEntryRanges() final;
113 std::
string GetLabel() final {
return "RNTupleProcessorDS"; }
123 ROOT::RDF::RSampleInfo
125 const std::unordered_map<std::
string,
ROOT::RDF::Experimental::RSample *> &) const final;
134namespace
ROOT::Experimental::RDF {
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
RNTupleProcessorDS(std::unique_ptr< ROOT::Experimental::RNTupleProcessor > processor)
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
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.
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
void AddField(const ROOT::RFieldBase &field, std::string_view colName, Internal::RNTupleProcessorProvenance procProvenance, std::deque< RFieldInfo > &fieldInfos, bool convertToRVec=true)
Provides the RDF column "colName" given the field.
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
Maps a processor's global (outer) entry index to its inner ones.
Pure virtual base class for all column reader types.
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.
RDataFrame FromRNTupleProcessor(std::unique_ptr< ROOT::Experimental::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.
ROOT::DescriptorId_t fFieldId
std::size_t fNRepetitions
RFieldInfo(ROOT::DescriptorId_t fieldId, std::string_view fieldName, std::string_view typeName, std::size_t nRepetitions)