Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::Internal::RChunkLoader< Args > Class Template Reference

template<typename... Args>
class TMVA::Experimental::Internal::RChunkLoader< Args >

Definition at line 114 of file RChunkLoader.hxx.

Public Member Functions

 RChunkLoader (const std::string &treeName, const std::string &fileName, const std::size_t chunkSize, const std::vector< std::string > &cols, const std::vector< std::string > &filters={}, const std::vector< std::size_t > &vecSizes={}, const float vecPadding=0.0)
 Constructor for the RChunkLoader.
 
std::pair< std::size_t, std::size_t > LoadChunk (TMVA::Experimental::RTensor< float > &chunkTensor, const std::size_t currentRow)
 Load a chunk of data using the RChunkLoaderFunctor.
 

Private Member Functions

std::pair< std::size_t, std::size_t > loadFiltered (ROOT::RDataFrame &x_rdf, RChunkLoaderFunctor< Args... > &func)
 Add filters to the RDataFrame and load a chunk of data.
 
std::pair< std::size_t, std::size_t > loadNonFiltered (ROOT::RDataFrame &x_rdf, RChunkLoaderFunctor< Args... > &func)
 Loop over the events in the dataframe untill either the end of the dataframe is reached, or a full chunk is loaded.
 

Private Attributes

std::size_t fChunkSize
 
std::vector< std::string > fCols
 
std::string fFileName
 
std::vector< std::string > fFilters
 
std::size_t fNumColumns
 
std::string fTreeName
 
std::size_t fVecPadding
 
std::vector< std::size_t > fVecSizes
 

#include <TMVA/RChunkLoader.hxx>

Constructor & Destructor Documentation

◆ RChunkLoader()

template<typename... Args>
TMVA::Experimental::Internal::RChunkLoader< Args >::RChunkLoader ( const std::string &  treeName,
const std::string &  fileName,
const std::size_t  chunkSize,
const std::vector< std::string > &  cols,
const std::vector< std::string > &  filters = {},
const std::vector< std::size_t > &  vecSizes = {},
const float  vecPadding = 0.0 
)
inline

Constructor for the RChunkLoader.

Parameters
treeName
fileName
chunkSize
cols
filters
vecSizes
vecPadding

Definition at line 137 of file RChunkLoader.hxx.

Member Function Documentation

◆ LoadChunk()

template<typename... Args>
std::pair< std::size_t, std::size_t > TMVA::Experimental::Internal::RChunkLoader< Args >::LoadChunk ( TMVA::Experimental::RTensor< float > &  chunkTensor,
const std::size_t  currentRow 
)
inline

Load a chunk of data using the RChunkLoaderFunctor.

Parameters
chunkTensor
currentRow
Returns
A pair of size_t defining the number of events processed and how many passed all filters

Definition at line 156 of file RChunkLoader.hxx.

◆ loadFiltered()

template<typename... Args>
std::pair< std::size_t, std::size_t > TMVA::Experimental::Internal::RChunkLoader< Args >::loadFiltered ( ROOT::RDataFrame x_rdf,
RChunkLoaderFunctor< Args... > &  func 
)
inlineprivate

Add filters to the RDataFrame and load a chunk of data.

Parameters
x_rdf
func
Returns
A pair of size_t defining the number of events processed and how many passed all filters

Definition at line 184 of file RChunkLoader.hxx.

◆ loadNonFiltered()

template<typename... Args>
std::pair< std::size_t, std::size_t > TMVA::Experimental::Internal::RChunkLoader< Args >::loadNonFiltered ( ROOT::RDataFrame x_rdf,
RChunkLoaderFunctor< Args... > &  func 
)
inlineprivate

Loop over the events in the dataframe untill either the end of the dataframe is reached, or a full chunk is loaded.

Parameters
x_rdf
func
Returns
A pair of size_t defining the number of events processed and how many passed all filters

Definition at line 214 of file RChunkLoader.hxx.

Member Data Documentation

◆ fChunkSize

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RChunkLoader< Args >::fChunkSize
private

Definition at line 119 of file RChunkLoader.hxx.

◆ fCols

template<typename... Args>
std::vector<std::string> TMVA::Experimental::Internal::RChunkLoader< Args >::fCols
private

Definition at line 122 of file RChunkLoader.hxx.

◆ fFileName

template<typename... Args>
std::string TMVA::Experimental::Internal::RChunkLoader< Args >::fFileName
private

Definition at line 118 of file RChunkLoader.hxx.

◆ fFilters

template<typename... Args>
std::vector<std::string> TMVA::Experimental::Internal::RChunkLoader< Args >::fFilters
private

Definition at line 123 of file RChunkLoader.hxx.

◆ fNumColumns

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RChunkLoader< Args >::fNumColumns
private

Definition at line 120 of file RChunkLoader.hxx.

◆ fTreeName

template<typename... Args>
std::string TMVA::Experimental::Internal::RChunkLoader< Args >::fTreeName
private

Definition at line 117 of file RChunkLoader.hxx.

◆ fVecPadding

template<typename... Args>
std::size_t TMVA::Experimental::Internal::RChunkLoader< Args >::fVecPadding
private

Definition at line 126 of file RChunkLoader.hxx.

◆ fVecSizes

template<typename... Args>
std::vector<std::size_t> TMVA::Experimental::Internal::RChunkLoader< Args >::fVecSizes
private

Definition at line 125 of file RChunkLoader.hxx.

  • tmva/tmva/inc/TMVA/RChunkLoader.hxx