Project
Loading...
Searching...
No Matches
ROOT::RDF::RCombinedDS Class Referencefinal

RDataSource which does the cartesian product of entries in two other datasources. More...

#include <RCombinedDS.h>

Inherits ROOT::RDF::RDataSource.

Public Member Functions

 RCombinedDS (std::unique_ptr< RDataSource > left, std::unique_ptr< RDataSource > right, std::unique_ptr< RCombinedDSIndex > index=std::make_unique< RCombinedDSFriendIndex >(), std::string leftPrefix=std::string{"left_"}, std::string rightPrefix=std::string{"right_"})
 
 ~RCombinedDS () override
 Destructor.
 
template<typename T >
std::vector< T ** > GetColumnReaders (std::string_view colName)
 
const std::vector< std::string > & GetColumnNames () const override
 
std::vector< std::pair< ULong64_t, ULong64_t > > GetEntryRanges () override
 
std::string GetTypeName (std::string_view colName) const override
 
bool HasColumn (std::string_view colName) const override
 
bool SetEntry (unsigned int slot, ULong64_t entry) override
 
void InitSlot (unsigned int slot, ULong64_t firstEntry) override
 
void SetNSlots (unsigned int nSlots) override
 
void Initialize () override
 

Protected Member Functions

std::vector< void * > GetColumnReadersImpl (std::string_view colName, const std::type_info &info) override
 This should never be called, since we did a template overload for GetColumnReaders()
 

Detailed Description

RDataSource which does the cartesian product of entries in two other datasources.

An RDataSource which combines the rows of two other RDataSources between them. The actual logic to do the combination is specified by the provided RCombinedDSIndex implementation. By default it simply pairs same position rows of two tables with the same length.

This RDataSource takes two input datasources, and iterates on all the couples of the cartesian product between the set of entries of the two. This is effectively mimicking a double loop on the entries of the two RDataSources.

Definition at line 300 of file RCombinedDS.h.

Constructor & Destructor Documentation

◆ RCombinedDS()

ROOT::RDF::RCombinedDS::RCombinedDS ( std::unique_ptr< RDataSource inLeft,
std::unique_ptr< RDataSource inRight,
std::unique_ptr< RCombinedDSIndex inIndex = std::make_unique<RCombinedDSFriendIndex>(),
std::string  inLeftPrefix = std::string{"left_"},
std::string  inRightPrefix = std::string{"right_"} 
)

Constructor to create an Arrow RDataSource for RDataFrame.

Parameters
[in]leftthe first table we iterate on, i.e. the outer loop
[in]rightthe second table we iterate on, i.e. the inner loop
[in]leftPrefixthe prefix to prepend to the element of the first table
[in]rightthe second table we iterate on, i.e. the inner loop
[in]rightPrefixthe prefix to prepend to the element of the second table

Definition at line 118 of file RCombinedDS.cxx.

◆ ~RCombinedDS()

ROOT::RDF::RCombinedDS::~RCombinedDS ( )
overridedefault

Destructor.

Member Function Documentation

◆ GetColumnNames()

const std::vector< std::string > & ROOT::RDF::RCombinedDS::GetColumnNames ( ) const
override

Definition at line 145 of file RCombinedDS.cxx.

◆ GetColumnReaders()

template<typename T >
std::vector< T ** > ROOT::RDF::RCombinedDS::GetColumnReaders ( std::string_view  colName)
inline

Definition at line 330 of file RCombinedDS.h.

◆ GetColumnReadersImpl()

std::vector< void * > ROOT::RDF::RCombinedDS::GetColumnReadersImpl ( std::string_view  colName,
const std::type_info &  info 
)
overrideprotected

This should never be called, since we did a template overload for GetColumnReaders()

Definition at line 209 of file RCombinedDS.cxx.

◆ GetEntryRanges()

std::vector< std::pair< ULong64_t, ULong64_t > > ROOT::RDF::RCombinedDS::GetEntryRanges ( )
override

Definition at line 150 of file RCombinedDS.cxx.

◆ GetTypeName()

std::string ROOT::RDF::RCombinedDS::GetTypeName ( std::string_view  colName) const
override

Definition at line 156 of file RCombinedDS.cxx.

◆ HasColumn()

bool ROOT::RDF::RCombinedDS::HasColumn ( std::string_view  colName) const
override

Definition at line 171 of file RCombinedDS.cxx.

◆ Initialize()

void ROOT::RDF::RCombinedDS::Initialize ( )
override

Definition at line 223 of file RCombinedDS.cxx.

◆ InitSlot()

void ROOT::RDF::RCombinedDS::InitSlot ( unsigned int  slot,
ULong64_t  firstEntry 
)
override

Definition at line 192 of file RCombinedDS.cxx.

◆ SetEntry()

bool ROOT::RDF::RCombinedDS::SetEntry ( unsigned int  slot,
ULong64_t  entry 
)
override

Definition at line 184 of file RCombinedDS.cxx.

◆ SetNSlots()

void ROOT::RDF::RCombinedDS::SetNSlots ( unsigned int  nSlots)
override

FIXME: For the moment we simply forward the nSlots, not sure this is the right thing to do.

Definition at line 199 of file RCombinedDS.cxx.


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