Project
Loading...
Searching...
No Matches
ROOT::RDF::RCombinedDSBlockJoinIndex< INDEX_TYPE > Class Template Reference

#include <RCombinedDS.h>

Inherits ROOT::RDF::RCombinedDSIndex.

Public Member Functions

 RCombinedDSBlockJoinIndex (std::string const &leftCategoryColumn, bool self=true, BlockCombinationRule combinationType=BlockCombinationRule::Anti, std::string const &rightCategoryColumn="")
 
std::pair< ULong64_t, ULong64_t > GetAssociatedEntries (ULong64_t entry) final
 
std::vector< std::pair< ULong64_t, ULong64_t > > BuildIndex (std::unique_ptr< RDataFrame > &left, std::unique_ptr< RDataFrame > &right) final
 
- Public Member Functions inherited from ROOT::RDF::RCombinedDSIndex
virtual ~RCombinedDSIndex ()=default
 

Detailed Description

template<typename INDEX_TYPE = int>
class ROOT::RDF::RCombinedDSBlockJoinIndex< INDEX_TYPE >

An index which allows doing a cross join of all entries belonging to the same category, where the category is defined by a two given columns.

This can be used to do double loops on events when using the event id column. FIXME: the need for templation is due to the fact RDataFrame::GetColumnType was introduced only in ROOT 6.16.x. We can remove it once we have a proper build of ROOT. FIXME: for the moment this only works when the inputs are actually from the same table.

Definition at line 150 of file RCombinedDS.h.

Constructor & Destructor Documentation

◆ RCombinedDSBlockJoinIndex()

template<typename INDEX_TYPE = int>
ROOT::RDF::RCombinedDSBlockJoinIndex< INDEX_TYPE >::RCombinedDSBlockJoinIndex ( std::string const &  leftCategoryColumn,
bool  self = true,
BlockCombinationRule  combinationType = BlockCombinationRule::Anti,
std::string const &  rightCategoryColumn = "" 
)
inline

Definition at line 156 of file RCombinedDS.h.

Member Function Documentation

◆ BuildIndex()

template<typename INDEX_TYPE = int>
std::vector< std::pair< ULong64_t, ULong64_t > > ROOT::RDF::RCombinedDSBlockJoinIndex< INDEX_TYPE >::BuildIndex ( std::unique_ptr< RDataFrame > &  left,
std::unique_ptr< RDataFrame > &  right 
)
inlinefinalvirtual

This is invoked on every Inititialise of the RCombinedDS to allow constructing the index associated to it.

Parameters
[in]

is the dataframe constructed on top of the left input.

Parameters
[in]

is the dataframe constructed on top of the right input.

Returns
the vector with the ranges of the combined dataset.

FIXME: we should avoid the memory copy here. OK for now.

For all categories, do the full set of permutations. In case the two inputs are the same, we can simply reuse the same range of entries.

Implements ROOT::RDF::RCombinedDSIndex.

Definition at line 173 of file RCombinedDS.h.

◆ GetAssociatedEntries()

template<typename INDEX_TYPE = int>
std::pair< ULong64_t, ULong64_t > ROOT::RDF::RCombinedDSBlockJoinIndex< INDEX_TYPE >::GetAssociatedEntries ( ULong64_t  entry)
inlinefinalvirtual

This is invoked on every GetEntry() of the RCombinedDS and it's used to effectively enumerate all the pairs of the combination.

Parameters
[in]

is the entry in the combined table

Returns
a pair where first is the entry in the associated left table, while right is an entry in the associated right table.

Implements ROOT::RDF::RCombinedDSIndex.

Definition at line 167 of file RCombinedDS.h.


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