25#include <unordered_set>
42 const auto tree = fLoopManager->GetTree();
44 const auto treeName = tree->GetName();
74 ss <<
"\nwith friend\n";
76 ss <<
"\nwith friends\n";
106 else if (fDataSource) {
112 const auto n = fLoopManager->GetNEmptyEntries();
114 return "Empty dataframe filling 1 row";
116 return "Empty dataframe filling " + std::to_string(
n) +
" rows";
122 : fLoopManager(
lm), fDataSource(
lm->GetDataSource()), fColRegister(
lm.get())
129 fDataSource(
lm.GetDataSource()),
161 auto tree = fLoopManager->GetTree();
168 for (
const auto &s : fDataSource->GetColumnNames()) {
169 if (s.rfind(
"R_rdf_sizeof", 0) != 0)
194 const auto col = fColRegister.ResolveAlias(column);
238 for (
const auto &
name : GetDefinedColumnNames())
242 const std::vector<std::string>
metadataProperties = {
"Columns in total",
"Columns from defines",
"Event loops run",
246 std::to_string(GetNRuns()), std::to_string(
GetNSlots())};
254 std::stringstream
ss;
277 for (
auto i = 0
u; i <
nCols; i++) {
308 const auto columns = fColRegister.BuildDefineNames();
309 for (
const auto &column :
columns) {
331 return fColRegister.BuildVariationsDescription();
353 if (fLoopManager->GetTree()) {
354 const auto &
branchNames = fLoopManager->GetBranchNames();
360 if (fDataSource && fDataSource->HasColumn(
columnName))
380 return fLoopManager->GetNSlots();
399 return fLoopManager->GetNRuns();
404 std::vector<std::string>
types;
407 types.push_back(GetColumnType(column));
416 error +=
" was called with ImplicitMT enabled, but multi-thread is not supported.";
417 throw std::runtime_error(error);
440 fColRegister, *fLoopManager);
441 fColRegister.AddDefine(std::move(
slotColumn));
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
The head node of a RDF computation graph.
A binder for user-defined columns, variations and aliases.
A DFDescription contains useful information about a given RDataFrame computation graph.
RVariationsDescription GetVariations() const
Return a descriptor for the systematic variations registered in this branch of the computation graph.
std::string GetColumnType(std::string_view column)
Return the type of a given column as a string.
RDFDescription Describe()
Return information about the dataframe.
ColumnNames_t GetColumnTypeNamesList(const ColumnNames_t &columnList)
std::shared_ptr< ROOT::Detail::RDF::RLoopManager > fLoopManager
< The RLoopManager at the root of this computation graph. Never null.
unsigned int GetNRuns() const
Gets the number of event loops run.
ColumnNames_t GetDefinedColumnNames()
Returns the names of the defined columns.
void CheckIMTDisabled(std::string_view callerName)
unsigned int GetNSlots() const
Gets the number of data processing slots.
RInterfaceBase(std::shared_ptr< RDFDetail::RLoopManager > lm)
bool HasColumn(std::string_view columnName)
Checks if a column is present in the dataset.
std::string DescribeDataset() const
ColumnNames_t GetColumnNames()
Returns the names of the available columns.
A descriptor for the systematic variations known to a given RDataFrame node.
const_iterator begin() const
const_iterator end() const
A chain is a collection of files containing TTree objects.
std::vector< std::string > GetBranchNames(TTree &t, bool allowDuplicates=true)
Get all the branches names, including the ones of the friend trees.
std::string ColumnName2ColumnTypeName(const std::string &colName, TTree *, RDataSource *, RDefineBase *, bool vector2rvec=true)
Return a string containing the type of the given branch.
unsigned int GetColumnWidth(const std::vector< std::string > &names, const unsigned int minColumnSpace=8u)
Get optimal column width for printing a table given the names and the desired minimal space between c...
bool IsInternalColumn(std::string_view colName)
Whether custom column with name colName is an "internal" column such as rdfentry_ or rdfslot_.
ROOT::TreeUtils::RFriendInfo GetFriendInfo(const TTree &tree, bool retrieveEntries=false)
std::vector< std::string > GetFileNamesFromTree(const TTree &tree)
std::vector< std::string > ColumnNames_t
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.