16#ifndef ROOT7_RNTupleProcessor
17#define ROOT7_RNTupleProcessor
33namespace Experimental {
253 static std::unique_ptr<RNTupleProcessor>
254 CreateChain(
const std::vector<RNTupleOpenSpec> &ntuples, std::unique_ptr<RNTupleModel> model =
nullptr);
272 static std::unique_ptr<RNTupleProcessor>
CreateJoin(
const std::vector<RNTupleOpenSpec> &ntuples,
273 const std::vector<std::string> &joinFields,
274 std::vector<std::unique_ptr<RNTupleModel>> models = {});
335 RNTupleChainProcessor(
const std::vector<RNTupleOpenSpec> &ntuples, std::unique_ptr<RNTupleModel> model =
nullptr);
391 for (
const auto &fieldName : joinFields) {
404 fieldContext.ResetConcreteField();
Abstract interface to read data from an ntuple.
The field token identifies a (sub)field in this entry.
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
A field translates read and write calls from/to underlying columns to/from tree values.
Processor specializiation for vertically concatenated RNTuples (chains).
void LoadEntry() final
Fill the entry with values belonging to the current entry number.
NTupleSize_t Advance() final
Advance the processor to the next available entry.
NTupleSize_t ConnectNTuple(const RNTupleOpenSpec &ntuple)
Connect an RNTuple for processing.
Processor specializiation for horizontally concatenated RNTuples (joins).
RNTupleJoinProcessor(const RNTupleJoinProcessor &)=delete
RNTupleJoinProcessor(RNTupleJoinProcessor &&)=delete
void SetJoinFieldTokens(const std::vector< std::string > &joinFields)
Populate fJoinFieldTokens with tokens for join fields belonging to the main RNTuple in the join model...
std::vector< std::unique_ptr< Internal::RPageSource > > fAuxiliaryPageSources
std::unique_ptr< RNTupleModel > fJoinModel
void AddAuxiliary(const RNTupleOpenSpec &auxNTuple, const std::vector< std::string > &joinFields, std::unique_ptr< RNTupleModel > model=nullptr)
Add an auxiliary RNTuple to the processor.
~RNTupleJoinProcessor() override
NTupleSize_t Advance() final
Advance the processor to the next available entry.
void LoadEntry() final
Fill the entry with values belonging to the current entry number of the primary RNTuple.
std::vector< std::unique_ptr< Internal::RNTupleIndex > > fJoinIndices
bool IsUsingIndex() const
RNTupleJoinProcessor operator=(const RNTupleJoinProcessor &)=delete
RNTupleJoinProcessor operator=(RNTupleJoinProcessor &&)=delete
std::vector< REntry::RFieldToken > fJoinFieldTokens
Tokens representing the join fields present in the main RNTuple.
The RNTupleModel encapulates the schema of an ntuple.
Manager for a field as part of the RNTupleProcessor.
RFieldContext(std::unique_ptr< RFieldBase > protoField, REntry::RFieldToken token, std::size_t ntupleIdx=0)
std::unique_ptr< RFieldBase > fConcreteField
void ResetConcreteField()
Concrete pages need to be reset explicitly before the page source they belong to is destroyed.
std::unique_ptr< RFieldBase > fProtoField
REntry::RFieldToken fToken
const RFieldBase & GetProtoField() const
Iterator over the entries of an RNTuple, or vertical concatenation thereof.
RNTupleProcessor & fProcessor
std::forward_iterator_tag iterator_category
RIterator(RNTupleProcessor &processor, NTupleSize_t entryNumber)
std::ptrdiff_t difference_type
NTupleSize_t fCurrentEntryNumber
friend bool operator==(const iterator &lh, const iterator &rh)
friend bool operator!=(const iterator &lh, const iterator &rh)
Interface for iterating over entries of RNTuples and vertically concatenated RNTuples (chains).
const REntry & GetEntry() const
Returns a reference to the entry used by the processor.
NTupleSize_t fNEntriesProcessed
RNTupleProcessor(const std::vector< RNTupleOpenSpec > &ntuples)
virtual void LoadEntry()=0
Fill the entry with values belonging to the current entry number.
std::size_t fCurrentNTupleNumber
NTupleSize_t GetNEntriesProcessed() const
Get the total number of entries processed so far.
virtual ~RNTupleProcessor()=default
RNTupleProcessor(RNTupleProcessor &&)=delete
std::size_t GetCurrentNTupleNumber() const
Get the index to the RNTuple currently being processed, according to the sources specified upon creat...
static std::unique_ptr< RNTupleProcessor > CreateChain(const std::vector< RNTupleOpenSpec > &ntuples, std::unique_ptr< RNTupleModel > model=nullptr)
Create a new RNTuple processor chain for vertical concatenation of RNTuples.
std::unordered_map< std::string, RFieldContext > fFieldContexts
void SetLocalEntryNumber(NTupleSize_t entryNumber)
Set the local (i.e.
static std::unique_ptr< RNTupleProcessor > CreateJoin(const std::vector< RNTupleOpenSpec > &ntuples, const std::vector< std::string > &joinFields, std::vector< std::unique_ptr< RNTupleModel > > models={})
Create a new RNTuple processor for horizontallly concatenated RNTuples.
NTupleSize_t fLocalEntryNumber
static std::unique_ptr< RNTupleProcessor > Create(const RNTupleOpenSpec &ntuple)
std::unique_ptr< REntry > fEntry
RNTupleProcessor(const RNTupleProcessor &)=delete
RNTupleProcessor & operator=(RNTupleProcessor &&)=delete
void ConnectField(RFieldContext &fieldContext, Internal::RPageSource &pageSource, REntry &entry)
Creates and connects a concrete field to the current page source, based on its proto field.
virtual NTupleSize_t Advance()=0
Advance the processor to the next available entry.
std::unique_ptr< Internal::RPageSource > fPageSource
NTupleSize_t GetLocalEntryNumber() const
Get the entry number local to the RNTuple that is currently being processed.
std::vector< RNTupleOpenSpec > fNTuples
RNTupleProcessor & operator=(const RNTupleProcessor &)=delete
Processor specializiation for processing a single RNTuple.
void LoadEntry()
Fill the entry with values belonging to the current entry number.
NTupleSize_t Advance() final
Advance the processor to the next available entry.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr NTupleSize_t kInvalidNTupleIndex
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Used to specify the underlying RNTuples in RNTupleProcessor.