18namespace Experimental {
27 throw std::logic_error(
"The starting entry cannot be larger than the ending entry in the "
28 "creation of a dataset specification.");
33 std::vector<std::string> sampleNames;
34 sampleNames.reserve(
fSamples.size());
36 sampleNames.emplace_back(sample.GetSampleName());
42 std::vector<std::string> treeNames;
43 for (
const auto &sample :
fSamples) {
44 const auto &trees = sample.GetTreeNames();
45 treeNames.insert(std::end(treeNames), std::begin(trees), std::end(trees));
52 std::vector<std::string> fileNames;
53 for (
const auto &sample :
fSamples) {
54 const auto &files = sample.GetFileNameGlobs();
55 fileNames.insert(std::end(fileNames), std::begin(files), std::end(files));
62 std::vector<RMetaData> metaDatas;
65 metaDatas.emplace_back(sample.GetMetaData());
92 fSamples.push_back(std::move(sample));
104 const std::vector<std::string> &fileNameGlobs,
const std::string &alias)
112 const std::string &alias)
125 const std::vector<std::string> &fileNameGlobs,
const std::string &alias)
127 if (treeNames.size() != 1 && treeNames.size() != fileNameGlobs.size())
128 throw std::logic_error(
"Mismatch between number of trees and file globs.");
129 std::vector<std::pair<std::string, std::string>>
target;
130 target.reserve(fileNameGlobs.size());
131 for (
auto i = 0u; i < fileNameGlobs.size(); ++i)
132 target.emplace_back(std::make_pair((treeNames.size() == 1u ? treeNames[0] : treeNames[i]), fileNameGlobs[i]));
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
A dataset specification for RDataFrame.
const std::vector< std::string > GetFileNameGlobs() const
std::vector< RSample > MoveOutSamples()
REntryRange fEntryRange
Start (inclusive) and end (exclusive) entry for the dataset processing.
RDatasetSpec & WithGlobalFriends(const std::string &treeName, const std::string &fileNameGlob, const std::string &alias="")
const std::vector< std::string > GetTreeNames() const
const ROOT::TreeUtils::RFriendInfo & GetFriendInfo() const
Long64_t GetEntryRangeBegin() const
const std::vector< RMetaData > GetMetaData() const
RDatasetSpec & AddSample(RSample sample)
ROOT::TreeUtils::RFriendInfo fFriendInfo
List of friends.
RDatasetSpec & WithGlobalRange(const RDatasetSpec::REntryRange &entryRange={})
std::vector< RSample > fSamples
List of samples.
const std::vector< std::string > GetSampleNames() const
Long64_t GetEntryRangeEnd() const
Class representing a sample (grouping of trees (and their fileglobs) and (optional) metadata)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
Information about friend trees of a certain TTree or TChain object.
void AddFriend(const std::string &treeName, const std::string &fileNameGlob, const std::string &alias="", std::int64_t nEntries=std::numeric_limits< std::int64_t >::max(), TVirtualIndex *indexInfo=nullptr)
Add information of a single friend.