25#include <unordered_set>
38 if (
auto ds = GetDataSource()) {
43 const auto n = fLoopManager->GetNEmptyEntries();
45 return "Empty dataframe filling 1 row";
47 return "Empty dataframe filling " + std::to_string(
n) +
" rows";
53 : fLoopManager(
lm), fColRegister(
lm.get())
91 if (
auto ds = GetDataSource()) {
93 if (s.rfind(
"R_rdf_sizeof", 0) != 0)
118 const auto col = fColRegister.ResolveAlias(column);
162 for (
const auto &
name : GetDefinedColumnNames())
166 const std::vector<std::string>
metadataProperties = {
"Columns in total",
"Columns from defines",
"Event loops run",
170 std::to_string(GetNRuns()), std::to_string(GetNSlots())};
178 std::stringstream
ss;
201 for (
auto i = 0
u; i <
nCols; i++) {
232 const auto columns = fColRegister.BuildDefineNames();
233 for (
const auto &column :
columns) {
255 return fColRegister.BuildVariationsDescription();
297 return fLoopManager->GetNSlots();
316 return fLoopManager->GetNRuns();
321 std::vector<std::string>
types;
324 types.push_back(GetColumnType(column));
333 error +=
" was called with ImplicitMT enabled, but multi-thread is not supported.";
334 throw std::runtime_error(error);
357 fColRegister, *fLoopManager);
358 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)
unsigned int GetNRuns() const
Gets the number of event loops run.
RDataSource * GetDataSource() const
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
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...
std::string DescribeDataset(ROOT::RDF::RDataSource &ds)
std::string ColumnName2ColumnTypeName(const std::string &colName, TTree *, RDataSource *, RDefineBase *, bool vector2RVec=true)
Return a string containing the type of the given branch.
bool IsInternalColumn(std::string_view colName)
Whether custom column with name colName is an "internal" column such as rdfentry_ or rdfslot_.
const std::vector< std::string > & GetColumnNamesNoDuplicates(const ROOT::RDF::RDataSource &ds)
std::vector< std::string > ColumnNames_t
Namespace for new ROOT classes and functions.
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.