Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 36 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 (RPageSource &pageSource, PartitionKey_t partitionKey=kDefaultPartitionKey)
 Add an entry mapping to the join table.
 
std::vector< ROOT::NTupleSize_tGetEntryIndexes (const std::vector< void * > &valuePtrs, PartitionKey_t partitionKey=kDefaultPartitionKey) const
 Get all entry indexes for the given join field value(s) within a partition.
 
std::unordered_map< PartitionKey_t, std::vector< ROOT::NTupleSize_t > > GetPartitionedEntryIndexes (const std::vector< void * > &valuePtrs) const
 Get all entry indexes for the given join field value(s) for all partitions.
 
std::unordered_map< PartitionKey_t, std::vector< ROOT::NTupleSize_t > > GetPartitionedEntryIndexes (const std::vector< void * > &valuePtrs, const std::vector< PartitionKey_t > &partitionKeys) const
 Get all entry indexes for the given join field value(s) for a specific set of partitions.
 
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

◆ 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 115 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 ( RPageSource & pageSource,
PartitionKey_t partitionKey = kDefaultPartitionKey )

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.
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.

◆ GetEntryIndexes()

std::vector< ROOT::NTupleSize_t > ROOT::Experimental::Internal::RNTupleJoinTable::GetEntryIndexes ( const std::vector< void * > & valuePtrs,
PartitionKey_t partitionKey = kDefaultPartitionKey ) const

Get all entry indexes for the given join field value(s) within a partition.

Parameters
[in]valuePtrsA vector of pointers to the join field values to look up.
[in]partitionKeyThe partition key to use for the lookup. If not provided, it will use the default partition key.
Returns
The entry numbers that correspond to valuePtrs. When there are no corresponding entries, an empty vector is returned.

Definition at line 127 of file RNTupleJoinTable.cxx.

◆ GetPartitionedEntryIndexes() [1/2]

std::unordered_map< ROOT::Experimental::Internal::RNTupleJoinTable::PartitionKey_t, std::vector< ROOT::NTupleSize_t > > ROOT::Experimental::Internal::RNTupleJoinTable::GetPartitionedEntryIndexes ( const std::vector< void * > & valuePtrs) const

Get all entry indexes for the given join field value(s) for all partitions.

Parameters
[in]valuePtrsA vector of pointers to the join field values to look up.
Returns
The entry numbers that correspond to valuePtrs, grouped by partition. When there are no corresponding entries, an empty map is returned.

Definition at line 163 of file RNTupleJoinTable.cxx.

◆ GetPartitionedEntryIndexes() [2/2]

std::unordered_map< ROOT::Experimental::Internal::RNTupleJoinTable::PartitionKey_t, std::vector< ROOT::NTupleSize_t > > ROOT::Experimental::Internal::RNTupleJoinTable::GetPartitionedEntryIndexes ( const std::vector< void * > & valuePtrs,
const std::vector< PartitionKey_t > & partitionKeys ) const

Get all entry indexes for the given join field value(s) for a specific set of partitions.

Parameters
[in]valuePtrsA vector of pointers to the join field values to look up.
[in]partitionKeysThe partition keys to use for the lookup.
Returns
The entry numbers that correspond to valuePtrs, grouped by partition. When there are no corresponding entries, an empty map is returned.

Definition at line 146 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 105 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 108 of file RNTupleJoinTable.hxx.

◆ kDefaultPartitionKey

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

Definition at line 40 of file RNTupleJoinTable.hxx.

Libraries for ROOT::Experimental::Internal::RNTupleJoinTable:

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