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

Builds a join table on one or several fields of an RNTuple so it can be joined onto other RNTuples.

Definition at line 35 of file RNTupleJoinTable.hxx.

Classes

class  REntryMapping
 Provides a mapping from one or several join field values to an entry index. More...

Public Types

using JoinValue_t = std::uint64_t
using PartitionKey_t = std::uint64_t

Public Member Functions

 RNTupleJoinTable (const RNTupleJoinTable &other)=delete
 RNTupleJoinTable (RNTupleJoinTable &&other)=delete
 ~RNTupleJoinTable ()=default
RNTupleJoinTableAdd (ROOT::Internal::RPageSource &pageSource, PartitionKey_t partitionKey=kDefaultPartitionKey, ROOT::NTupleSize_t entryOffset=0)
 Add an entry mapping to the join table.
ROOT::NTupleSize_t GetEntryIndex (const std::vector< void * > &valuePtrs) const
 Get an entry index (if it exists) for the given join field value(s), from any partition.
RNTupleJoinTableoperator= (const RNTupleJoinTable &other)=delete
RNTupleJoinTableoperator= (RNTupleJoinTable &&other)=delete

Static Public Member Functions

static std::unique_ptr< RNTupleJoinTableCreate (const std::vector< std::string > &joinFieldNames)
 Create an RNTupleJoinTable from an existing RNTuple.

Static Public Attributes

static constexpr PartitionKey_t kDefaultPartitionKey = PartitionKey_t(-1)

Private Member Functions

 RNTupleJoinTable (const std::vector< std::string > &joinFieldNames)
 Create an a new RNTupleJoinTable for the RNTuple represented by the provided page source.

Private Attributes

std::vector< std::string > fJoinFieldNames
 Names of the join fields used for the mapping to their respective entry indexes.
std::unordered_map< PartitionKey_t, std::vector< std::unique_ptr< REntryMapping > > > fPartitions
 Partitions of one or multiple entry mappings.

#include <ROOT/RNTupleJoinTable.hxx>

Member Typedef Documentation

◆ JoinValue_t

Definition at line 37 of file RNTupleJoinTable.hxx.

◆ PartitionKey_t

Constructor & Destructor Documentation

◆ RNTupleJoinTable() [1/3]

ROOT::Experimental::Internal::RNTupleJoinTable::RNTupleJoinTable ( const std::vector< std::string > & joinFieldNames)
inlineprivate

Create an a new RNTupleJoinTable for the RNTuple represented by the provided page source.

Parameters
[in]joinFieldNamesThe names of the join fields to use for the join table. Only integral-type fields are allowed.

Definition at line 175 of file RNTupleJoinTable.hxx.

◆ RNTupleJoinTable() [2/3]

ROOT::Experimental::Internal::RNTupleJoinTable::RNTupleJoinTable ( const RNTupleJoinTable & other)
delete

◆ RNTupleJoinTable() [3/3]

ROOT::Experimental::Internal::RNTupleJoinTable::RNTupleJoinTable ( RNTupleJoinTable && other)
delete

◆ ~RNTupleJoinTable()

ROOT::Experimental::Internal::RNTupleJoinTable::~RNTupleJoinTable ( )
default

Member Function Documentation

◆ Add()

ROOT::Experimental::Internal::RNTupleJoinTable & ROOT::Experimental::Internal::RNTupleJoinTable::Add ( ROOT::Internal::RPageSource & pageSource,
PartitionKey_t partitionKey = kDefaultPartitionKey,
ROOT::NTupleSize_t entryOffset = 0 )

Add an entry mapping to the join table.

Parameters
[in]pageSourceThe page source of the RNTuple with the entries to map.
[in]partitionKeyWhich partition to add the mapping to. If not provided, it will be added to the default partition.
[in]entryOffsetOffset to add to each entry index in the mapping. This can can be used when the RNTuple represented by the provided page source is part of a chain of RNTuples.
Returns
A reference to the updated join table.

Definition at line 118 of file RNTupleJoinTable.cxx.

◆ Create()

std::unique_ptr< ROOT::Experimental::Internal::RNTupleJoinTable > ROOT::Experimental::Internal::RNTupleJoinTable::Create ( const std::vector< std::string > & joinFieldNames)
static

Create an RNTupleJoinTable from an existing RNTuple.

Parameters
[in]joinFieldNamesThe names of the join fields to use for the join table. Only integral-type fields are allowed.
Returns
A pointer to the newly-created join table.

Definition at line 112 of file RNTupleJoinTable.cxx.

◆ GetEntryIndex()

ROOT::NTupleSize_t ROOT::Experimental::Internal::RNTupleJoinTable::GetEntryIndex ( const std::vector< void * > & valuePtrs) const

Get an entry index (if it exists) for the given join field value(s), from any partition.

Parameters
[in]valuePtrsA vector of pointers to the join field values to look up.
Note
If one or more corresponding entries exist for the given value(s), the first entry index found in the join table is returned.
Returns
An entry number that corresponds to valuePtrs. When there are no corresponding entries, kInvalidNTupleIndex is returned.

Definition at line 128 of file RNTupleJoinTable.cxx.

◆ operator=() [1/2]

RNTupleJoinTable & ROOT::Experimental::Internal::RNTupleJoinTable::operator= ( const RNTupleJoinTable & other)
delete

◆ operator=() [2/2]

RNTupleJoinTable & ROOT::Experimental::Internal::RNTupleJoinTable::operator= ( RNTupleJoinTable && other)
delete

Member Data Documentation

◆ fJoinFieldNames

std::vector<std::string> ROOT::Experimental::Internal::RNTupleJoinTable::fJoinFieldNames
private

Names of the join fields used for the mapping to their respective entry indexes.

Definition at line 165 of file RNTupleJoinTable.hxx.

◆ fPartitions

std::unordered_map<PartitionKey_t, std::vector<std::unique_ptr<REntryMapping> > > ROOT::Experimental::Internal::RNTupleJoinTable::fPartitions
private

Partitions of one or multiple entry mappings.

Definition at line 168 of file RNTupleJoinTable.hxx.

◆ kDefaultPartitionKey

PartitionKey_t ROOT::Experimental::Internal::RNTupleJoinTable::kDefaultPartitionKey = PartitionKey_t(-1)
staticconstexpr

Definition at line 39 of file RNTupleJoinTable.hxx.


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