Class representing a sample which is a grouping of trees and their fileglobs, and, optionally, the sample's metadata information via the RMetaData object.
The class is passed to an RDatasetSpec object in order to build an RDataFrame.
For example, an RSample object can be built as follows:
Definition at line 39 of file RSample.hxx.
Public Member Functions | |
RSample ()=delete | |
RSample (const RSample &)=default | |
RSample (const std::string &sampleName, const std::string &treeName, const std::string &fileNameGlob, const RMetaData &metaData={}) | |
RSample (const std::string &sampleName, const std::string &treeName, const std::vector< std::string > &fileNameGlobs, const RMetaData &metaData={}) | |
RSample (const std::string &sampleName, const std::vector< std::pair< std::string, std::string > > &treeAndFileNameGlobs, const RMetaData &metaData={}) | |
RSample (const std::string &sampleName, const std::vector< std::string > &treeNames, const std::vector< std::string > &fileNameGlobs, const RMetaData &metaData={}) | |
RSample (RSample &&)=default | |
const std::vector< std::string > & | GetFileNameGlobs () const |
Get the collection of the filename globs associated with the sample. | |
const RMetaData & | GetMetaData () const |
Get an instance of the RMetaData class. | |
const std::string & | GetSampleName () const |
Get the name of the sample (RSample object). | |
const std::vector< std::string > & | GetTreeNames () const |
Get the collection of the tree names associated with the sample. | |
RSample & | operator= (const RSample &)=default |
RSample & | operator= (RSample &&)=default |
Private Attributes | |
std::vector< std::string > | fFileNameGlobs |
A list of file names. | |
RMetaData | fMetaData |
An instance of the RMetaData class. | |
unsigned int | fSampleId {0} |
Global sample index, set inside of the RDatasetSpec. | |
std::string | fSampleName |
Name of the sample. | |
std::vector< std::string > | fTreeNames |
A list of names of trees. | |
#include <ROOT/RDF/RSample.hxx>
|
default |
|
default |
|
delete |
ROOT::RDF::Experimental::RSample::RSample | ( | const std::string & | sampleName, |
const std::string & | treeName, | ||
const std::string & | fileNameGlob, | ||
const RMetaData & | metaData = {} |
||
) |
Definition at line 19 of file RSample.cxx.
ROOT::RDF::Experimental::RSample::RSample | ( | const std::string & | sampleName, |
const std::string & | treeName, | ||
const std::vector< std::string > & | fileNameGlobs, | ||
const RMetaData & | metaData = {} |
||
) |
Definition at line 25 of file RSample.cxx.
ROOT::RDF::Experimental::RSample::RSample | ( | const std::string & | sampleName, |
const std::vector< std::pair< std::string, std::string > > & | treeAndFileNameGlobs, | ||
const RMetaData & | metaData = {} |
||
) |
Definition at line 31 of file RSample.cxx.
ROOT::RDF::Experimental::RSample::RSample | ( | const std::string & | sampleName, |
const std::vector< std::string > & | treeNames, | ||
const std::vector< std::string > & | fileNameGlobs, | ||
const RMetaData & | metaData = {} |
||
) |
Definition at line 54 of file RSample.cxx.
const std::vector< std::string > & ROOT::RDF::Experimental::RSample::GetFileNameGlobs | ( | ) | const |
Get the collection of the filename globs associated with the sample.
Definition at line 87 of file RSample.cxx.
const RMetaData & ROOT::RDF::Experimental::RSample::GetMetaData | ( | ) | const |
Get an instance of the RMetaData class.
Once this is done, the further access to the RMetaData information is granted, for example (given the metadata has a key "sample_name" that has an associated value of type string):
Definition at line 99 of file RSample.cxx.
const std::string & ROOT::RDF::Experimental::RSample::GetSampleName | ( | ) | const |
Get the name of the sample (RSample object).
Definition at line 75 of file RSample.cxx.
const std::vector< std::string > & ROOT::RDF::Experimental::RSample::GetTreeNames | ( | ) | const |
Get the collection of the tree names associated with the sample.
Definition at line 81 of file RSample.cxx.
|
private |
A list of file names.
They can contain the globbing characters supported by TChain. See TChain::Add for more information.
Definition at line 53 of file RSample.hxx.
|
private |
An instance of the RMetaData class.
Definition at line 55 of file RSample.hxx.
|
private |
Global sample index, set inside of the RDatasetSpec.
Definition at line 58 of file RSample.hxx.
|
private |
Name of the sample.
Definition at line 41 of file RSample.hxx.
|
private |
A list of names of trees.
This list should go in lockstep with fFileNameGlobs, only in case this dataset is a TChain where each file contains its own tree with a different name from the global name of the dataset. Otherwise, fTreeNames contains 1 treename, that is common for all file globs.
Definition at line 48 of file RSample.hxx.