17namespace Experimental {
19RSample::RSample(
const std::string &sampleName,
const std::string &treeName,
const std::string &fileNameGlob,
21 :
RSample(sampleName, std::vector<std::string>{treeName}, std::vector<std::string>{fileNameGlob}, metaData)
26 const std::vector<std::string> &fileNameGlobs,
const RMetaData &metaData)
27 :
RSample(sampleName, std::vector<std::string>(fileNameGlobs.
size(), treeName), fileNameGlobs, metaData)
32 const std::vector<std::pair<std::string, std::string>> &treeAndFileNameGlobs,
34 : fSampleName(sampleName), fMetaData(metaData)
37 if (treeAndFileNameGlobs.empty())
41 for (
const auto &
p : treeAndFileNameGlobs) {
42 const auto fullpath =
p.second +
"?#" +
p.first;
43 chain.
Add(fullpath.c_str());
46 fTreeNames.reserve(expandedNames->GetEntries());
48 for (
auto i = 0; i < expandedNames->GetEntries(); ++i) {
49 fTreeNames.emplace_back(expandedNames->At(i)->GetName());
54RSample::RSample(
const std::string &sampleName,
const std::vector<std::string> &treeNames,
55 const std::vector<std::string> &fileNameGlobs,
const RMetaData &metaData)
56 : fSampleName(sampleName), fMetaData(metaData)
58 if (treeNames.size() != 1 && treeNames.size() != fileNameGlobs.size())
59 throw std::logic_error(
"Mismatch between number of trees and file globs.");
61 for (
auto i = 0u; i < fileNameGlobs.size(); ++i) {
62 const auto fullpath = fileNameGlobs[i] +
"?#" + (treeNames.size() == 1u ? treeNames[0] : treeNames[i]);
63 chain.
Add(fullpath.c_str());
66 fTreeNames.reserve(expandedNames->GetEntries());
68 for (
auto i = 0; i < expandedNames->GetEntries(); ++i) {
69 fTreeNames.emplace_back(expandedNames->At(i)->GetName());
104unsigned int RSample::GetSampleId()
const
109void RSample::SetSampleId(
unsigned int id)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Class representing a sample which is a grouping of trees and their fileglobs, and,...
const std::string & GetSampleName() const
Get the name of the sample (RSample object).
const std::vector< std::string > & GetFileNameGlobs() const
Get the collection of the filename globs associated with the sample.
RMetaData fMetaData
An instance of the RMetaData class.
std::vector< std::string > fFileNameGlobs
A list of file names.
const std::vector< std::string > & GetTreeNames() const
Get the collection of the tree names associated with the sample.
unsigned int fSampleId
Global sample index, set inside of the RDatasetSpec.
std::string fSampleName
Name of the sample.
const RMetaData & GetMetaData() const
Get an instance of the RMetaData class.
std::vector< std::string > fTreeNames
A list of names of trees.
A chain is a collection of files containing TTree objects.
TObjArray * GetListOfFiles() const
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...