Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RNTupleJoinProcessor Class Reference

Processor specialization for horizontally combined (joined) RNTuples.

Definition at line 529 of file RNTupleProcessor.hxx.

Public Member Functions

 RNTupleJoinProcessor (const RNTupleJoinProcessor &)=delete
 
 RNTupleJoinProcessor (RNTupleJoinProcessor &&)=delete
 
 ~RNTupleJoinProcessor () override
 
RNTupleJoinProcessor operator= (const RNTupleJoinProcessor &)=delete
 
RNTupleJoinProcessor operator= (RNTupleJoinProcessor &&)=delete
 
- Public Member Functions inherited from ROOT::Experimental::RNTupleProcessor
 RNTupleProcessor (const RNTupleProcessor &)=delete
 
 RNTupleProcessor (RNTupleProcessor &&)=delete
 
virtual ~RNTupleProcessor ()=default
 
RIterator begin ()
 
RIterator end ()
 
ROOT::NTupleSize_t GetCurrentEntryNumber () const
 Get the entry number that is currently being processed.
 
std::size_t GetCurrentProcessorNumber () const
 Get the number of the inner processor currently being read.
 
const ROOT::REntryGetEntry () const
 Get a reference to the entry used by the processor.
 
const ROOT::RNTupleModelGetModel () const
 Get the model used by the processor.
 
ROOT::NTupleSize_t GetNEntriesProcessed () const
 Get the total number of entries processed so far.
 
const std::string & GetProcessorName () const
 Get the name of the processor.
 
RNTupleProcessoroperator= (const RNTupleProcessor &)=delete
 
RNTupleProcessoroperator= (RNTupleProcessor &&)=delete
 

Private Member Functions

 RNTupleJoinProcessor (const RNTupleOpenSpec &mainNTuple, const std::vector< RNTupleOpenSpec > &auxNTuples, const std::vector< std::string > &joinFields, std::string_view processorName, std::unique_ptr< ROOT::RNTupleModel > primaryModel=nullptr, std::vector< std::unique_ptr< ROOT::RNTupleModel > > auxModels={})
 Construct a new RNTupleJoinProcessor.
 
void ConnectFields ()
 Connect all fields, once the primary and all auxiliary RNTuples have been added.
 
ROOT::NTupleSize_t GetNEntries () final
 Get the total number of entries in this processor.
 
bool HasJoinTable () const
 
ROOT::NTupleSize_t LoadEntry (ROOT::NTupleSize_t entryNumber) final
 Load the entry identified by the provided entry number of the primary RNTuple.
 
void SetEntryPointers (const ROOT::REntry &) final
 
void SetJoinFieldTokens (const std::vector< std::string > &joinFields)
 Populate fJoinFieldTokens with tokens for join fields belonging to the main RNTuple in the join model.
 
void SetModel (std::unique_ptr< ROOT::RNTupleModel > primaryModel, std::vector< std::unique_ptr< ROOT::RNTupleModel > > auxModels)
 Set fModel by combining the primary and auxiliary models.
 

Private Attributes

std::vector< std::unique_ptr< ROOT::Internal::RPageSource > > fAuxiliaryPageSources
 
std::vector< ROOT::RFieldTokenfJoinFieldTokens
 Tokens representing the join fields present in the main RNTuple.
 
std::vector< std::unique_ptr< Internal::RNTupleJoinTable > > fJoinTables
 
bool fJoinTablesAreBuilt = false
 

Friends

class RNTupleProcessor
 

Additional Inherited Members

- Static Public Member Functions inherited from ROOT::Experimental::RNTupleProcessor
static std::unique_ptr< RNTupleProcessorCreate (RNTupleOpenSpec ntuple, std::string_view processorName, std::unique_ptr< ROOT::RNTupleModel > model=nullptr)
 Create an RNTupleProcessor for a single RNTuple.
 
static std::unique_ptr< RNTupleProcessorCreate (RNTupleOpenSpec ntuple, std::unique_ptr< ROOT::RNTupleModel > model=nullptr)
 Create an RNTupleProcessor for a single RNTuple.
 
static std::unique_ptr< RNTupleProcessorCreateChain (std::vector< RNTupleOpenSpec > ntuples, std::string_view processorName, std::unique_ptr< ROOT::RNTupleModel > model=nullptr)
 Create an RNTupleProcessor for a chain (i.e., a vertical combination) of RNTuples.
 
static std::unique_ptr< RNTupleProcessorCreateChain (std::vector< RNTupleOpenSpec > ntuples, std::unique_ptr< ROOT::RNTupleModel > model=nullptr)
 Create an RNTupleProcessor for a chain (i.e., a vertical combination) of RNTuples.
 
static std::unique_ptr< RNTupleProcessorCreateChain (std::vector< std::unique_ptr< RNTupleProcessor > > innerProcessors, std::string_view processorName, std::unique_ptr< ROOT::RNTupleModel > model=nullptr)
 Create an RNTupleProcessor for a chain (i.e., a vertical combination) of other RNTupleProcessors.
 
static std::unique_ptr< RNTupleProcessorCreateChain (std::vector< std::unique_ptr< RNTupleProcessor > > innerProcessors, std::unique_ptr< ROOT::RNTupleModel > model=nullptr)
 Create an RNTupleProcessor for a chain (i.e., a vertical combination) of other RNTupleProcessors.
 
static std::unique_ptr< RNTupleProcessorCreateJoin (const RNTupleOpenSpec &primaryNTuple, const std::vector< RNTupleOpenSpec > &auxNTuples, const std::vector< std::string > &joinFields, std::string_view processorName, std::unique_ptr< ROOT::RNTupleModel > primaryModel=nullptr, std::vector< std::unique_ptr< ROOT::RNTupleModel > > auxModels={})
 Create an RNTupleProcessor for a join (i.e., a horizontal combination) of RNTuples.
 
static std::unique_ptr< RNTupleProcessorCreateJoin (const RNTupleOpenSpec &primaryNTuple, const std::vector< RNTupleOpenSpec > &auxNTuples, const std::vector< std::string > &joinFields, std::unique_ptr< ROOT::RNTupleModel > primaryModel=nullptr, std::vector< std::unique_ptr< ROOT::RNTupleModel > > auxModels={})
 Create an RNTupleProcessor for a join (i.e., a horizontal combination) of RNTuples.
 
- Protected Member Functions inherited from ROOT::Experimental::RNTupleProcessor
 RNTupleProcessor (std::string_view processorName, std::unique_ptr< ROOT::RNTupleModel > model)
 Create a new base RNTupleProcessor.
 
void ConnectField (RFieldContext &fieldContext, ROOT::Internal::RPageSource &pageSource, ROOT::REntry &entry)
 Create and connect a concrete field to the current page source, based on its proto field.
 
- Protected Attributes inherited from ROOT::Experimental::RNTupleProcessor
ROOT::NTupleSize_t fCurrentEntryNumber = 0
 
std::size_t fCurrentProcessorNumber = 0
 
std::unique_ptr< ROOT::REntryfEntry
 
std::unordered_map< std::string, RFieldContextfFieldContexts
 Maps the (qualified) field name to its corresponding field context.
 
std::unique_ptr< ROOT::RNTupleModelfModel
 
ROOT::NTupleSize_t fNEntries = kInvalidNTupleIndex
 Total number of entries.
 
ROOT::NTupleSize_t fNEntriesProcessed = 0
 
std::vector< RNTupleOpenSpecfNTuples
 
std::unique_ptr< ROOT::Internal::RPageSourcefPageSource
 
std::string fProcessorName
 

#include <ROOT/RNTupleProcessor.hxx>

Inheritance diagram for ROOT::Experimental::RNTupleJoinProcessor:
[legend]

Constructor & Destructor Documentation

◆ RNTupleJoinProcessor() [1/3]

ROOT::Experimental::RNTupleJoinProcessor::RNTupleJoinProcessor ( const RNTupleOpenSpec & mainNTuple,
const std::vector< RNTupleOpenSpec > & auxNTuples,
const std::vector< std::string > & joinFields,
std::string_view processorName,
std::unique_ptr< ROOT::RNTupleModel > primaryModel = nullptr,
std::vector< std::unique_ptr< ROOT::RNTupleModel > > auxModels = {} )
private

Construct a new RNTupleJoinProcessor.

Parameters
[in]mainNTupleThe source specification (name and storage location) of the primary RNTuple.
[in]auxNTUplesThe source specifications (name and storage location) of the auxiliary RNTuples.
[in]joinFieldsThe names of the fields on which to join, in case the specified RNTuples are unaligned. The join is made based on the combined join field values, and therefore each field has to be present in each specified RNTuple. If an empty list is provided, it is assumed that the RNTuples are fully aligned.
[in]processorNameName of the processor. Unless specified otherwise in RNTupleProcessor::CreateJoin, this is the name of the main RNTuple.
[in]primaryModelAn RNTupleModel specifying which fields from the primary RNTuple can be read by the processor. If no model is provided, one will be created based on the descriptor of the primary RNTuple.
[in]auxModelsA list of RNTupleModels specifying which fields from the corresponding auxiliary RNTuple (according to the order of auxNTuples) can be read by the processor. If this vector is empty, the models will be created based on the descriptors of their corresponding RNTuples. This also applies to individual auxiliary RNTuples for which the provided model is a nullptr.

Definition at line 343 of file RNTupleProcessor.cxx.

◆ RNTupleJoinProcessor() [2/3]

ROOT::Experimental::RNTupleJoinProcessor::RNTupleJoinProcessor ( const RNTupleJoinProcessor & )
delete

◆ RNTupleJoinProcessor() [3/3]

ROOT::Experimental::RNTupleJoinProcessor::RNTupleJoinProcessor ( RNTupleJoinProcessor && )
delete

◆ ~RNTupleJoinProcessor()

ROOT::Experimental::RNTupleJoinProcessor::~RNTupleJoinProcessor ( )
inlineoverride

Definition at line 609 of file RNTupleProcessor.hxx.

Member Function Documentation

◆ ConnectFields()

void ROOT::Experimental::RNTupleJoinProcessor::ConnectFields ( )
private

Connect all fields, once the primary and all auxiliary RNTuples have been added.

Definition at line 458 of file RNTupleProcessor.cxx.

◆ GetNEntries()

ROOT::NTupleSize_t ROOT::Experimental::RNTupleJoinProcessor::GetNEntries ( )
inlinefinalprivatevirtual

Get the total number of entries in this processor.

Implements ROOT::Experimental::RNTupleProcessor.

Definition at line 553 of file RNTupleProcessor.hxx.

◆ HasJoinTable()

bool ROOT::Experimental::RNTupleJoinProcessor::HasJoinTable ( ) const
inlineprivate

Definition at line 539 of file RNTupleProcessor.hxx.

◆ LoadEntry()

ROOT::NTupleSize_t ROOT::Experimental::RNTupleJoinProcessor::LoadEntry ( ROOT::NTupleSize_t entryNumber)
finalprivatevirtual

Load the entry identified by the provided entry number of the primary RNTuple.

See also
ROOT::Experimental::RNTupleProcessor::LoadEntry

Implements ROOT::Experimental::RNTupleProcessor.

Definition at line 479 of file RNTupleProcessor.cxx.

◆ operator=() [1/2]

RNTupleJoinProcessor ROOT::Experimental::RNTupleJoinProcessor::operator= ( const RNTupleJoinProcessor & )
delete

◆ operator=() [2/2]

RNTupleJoinProcessor ROOT::Experimental::RNTupleJoinProcessor::operator= ( RNTupleJoinProcessor && )
delete

◆ SetEntryPointers()

void ROOT::Experimental::RNTupleJoinProcessor::SetEntryPointers ( const ROOT::REntry & entry)
finalprivatevirtual

◆ SetJoinFieldTokens()

void ROOT::Experimental::RNTupleJoinProcessor::SetJoinFieldTokens ( const std::vector< std::string > & joinFields)
inlineprivate

Populate fJoinFieldTokens with tokens for join fields belonging to the main RNTuple in the join model.

Parameters
[in]joinFieldsThe names of the fields used in the join.

Definition at line 575 of file RNTupleProcessor.hxx.

◆ SetModel()

void ROOT::Experimental::RNTupleJoinProcessor::SetModel ( std::unique_ptr< ROOT::RNTupleModel > primaryModel,
std::vector< std::unique_ptr< ROOT::RNTupleModel > > auxModels )
private

Set fModel by combining the primary and auxiliary models.

Parameters
[in]primaryModelThe model of the primary RNTuple.
[in]auxModelsModels of the auxiliary RNTuples.

To prevent field name clashes when one or more models have fields with duplicate names, fields from each auxiliary model are stored as a anonymous record, and subsequently registered as subfields in the join model. This way, they can be accessed from the processor's entry as auxNTupleName.fieldName.

Definition at line 418 of file RNTupleProcessor.cxx.

Friends And Related Symbol Documentation

◆ RNTupleProcessor

friend class RNTupleProcessor
friend

Definition at line 530 of file RNTupleProcessor.hxx.

Member Data Documentation

◆ fAuxiliaryPageSources

std::vector<std::unique_ptr<ROOT::Internal::RPageSource> > ROOT::Experimental::RNTupleJoinProcessor::fAuxiliaryPageSources
private

Definition at line 533 of file RNTupleProcessor.hxx.

◆ fJoinFieldTokens

std::vector<ROOT::RFieldToken> ROOT::Experimental::RNTupleJoinProcessor::fJoinFieldTokens
private

Tokens representing the join fields present in the main RNTuple.

Definition at line 535 of file RNTupleProcessor.hxx.

◆ fJoinTables

std::vector<std::unique_ptr<Internal::RNTupleJoinTable> > ROOT::Experimental::RNTupleJoinProcessor::fJoinTables
private

Definition at line 536 of file RNTupleProcessor.hxx.

◆ fJoinTablesAreBuilt

bool ROOT::Experimental::RNTupleJoinProcessor::fJoinTablesAreBuilt = false
private

Definition at line 537 of file RNTupleProcessor.hxx.

Libraries for ROOT::Experimental::RNTupleJoinProcessor:

The documentation for this class was generated from the following files: