1#ifndef TMVA_CHUNKLOADER
2#define TMVA_CHUNKLOADER
14namespace Experimental {
18template <
typename First,
typename...
Rest>
33 template <
typename First_T>
42 template <
typename VecType>
80 template <
typename VecType>
97 const std::vector<std::size_t> &
maxVecSizes = std::vector<std::size_t>(),
109 AssignToTensor(std::forward<First>(first), std::forward<Rest>(rest)...);
113template <
typename... Args>
138 const std::vector<std::string> &
cols,
const std::string &
filters =
"",
155 std::pair<std::size_t, std::size_t>
166 .WithGlobalRange({
start_l, std::numeric_limits<Long64_t>::max()});
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
The dataset specification for RDataFrame.
RDatasetSpec & AddSample(RSample sample)
Add sample (RSample class object) to the RDatasetSpec object.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
const_iterator begin() const
const_iterator end() const
A "std::vector"-like collection of values implementing handy operation to analyse them.
void AssignVector(const ROOT::RVec< VecType > &vec)
Loop through the values of a given vector and load them into the RTensor Note: the given vec_size doe...
void AssignToTensor(const ROOT::RVec< VecType > &first, Rest_T... rest)
Recursively loop through the given values, and load them onto the fChunkTensor.
void AssignToTensor(First_T first)
Load the final given value into fChunkTensor.
void AssignToTensor(First_T first, Rest_T... rest)
Recursively loop through the given values, and load them onto the fChunkTensor.
RChunkLoaderFunctor(TMVA::Experimental::RTensor< float > &chunkTensor, const std::vector< std::size_t > &maxVecSizes=std::vector< std::size_t >(), const float vecPadding=0.0)
void operator()(First first, Rest... rest)
Loop through all columns of an event and put their values into an RTensor.
void AssignToTensor(const ROOT::RVec< VecType > &first)
Load the final given value into fChunkTensor.
TMVA::Experimental::RTensor< float > & fChunkTensor
std::vector< std::size_t > fMaxVecSizes
std::vector< std::string > fCols
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,...
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 > LoadChunk(TMVA::Experimental::RTensor< float > &chunkTensor, const std::size_t currentRow)
Load a chunk of data using the RChunkLoaderFunctor.
std::vector< std::size_t > fVecSizes
RChunkLoader(const std::string &treeName, const std::string &fileName, const std::size_t chunkSize, const std::vector< std::string > &cols, const std::string &filters="", const std::vector< std::size_t > &vecSizes={}, const float vecPadding=0.0)
Constructor for the RChunkLoader.
RTensor is a container with contiguous memory and shape information.
create variable transformations