12#ifndef ROOT_RDF_RCOLUMNREGISTER
13#define ROOT_RDF_RCOLUMNREGISTER
18#include <unordered_map>
27class RVariationsDescription;
43class RVariationReader;
44class RDefinesWithReaders;
45class RVariationsWithReaders;
69 using VariationsMap_t = std::unordered_multimap<std::string_view, ROOT::Internal::RDF::RVariationsWithReaders *>;
70 using DefinesMap_t = std::vector<std::pair<std::string_view, ROOT::Internal::RDF::RDefinesWithReaders *>>;
71 using AliasesMap_t = std::vector<std::pair<std::string_view, std::string_view>>;
108 void AddDefine(std::shared_ptr<RDFDetail::RDefineBase> column);
110 void AddAlias(std::string_view alias, std::string_view colName);
115 std::string_view
ResolveAlias(std::string_view alias)
const;
117 void AddVariation(std::shared_ptr<RVariationBase> variation);
123 std::vector<std::string>
GetVariationDeps(
const std::vector<std::string> &columns)
const;
128 const std::string &variationName,
const std::type_info &tid);
The head node of a RDF computation graph.
Pure virtual base class for all column reader types.
A binder for user-defined columns, variations and aliases.
std::vector< std::string_view > GenerateColumnNames() const
Return the list of the names of the defined columns (Defines + Aliases).
bool IsDefineOrAlias(std::string_view name) const
Check if the provided name is tracked in the names list.
bool IsAlias(std::string_view name) const
Return true if the given column name is an existing alias.
std::vector< std::string_view > BuildDefineNames() const
Return the list of the names of defined columns (no aliases).
std::vector< std::pair< std::string_view, std::string_view > > AliasesMap_t
std::vector< std::string > GetVariationsFor(const std::string &column) const
Get the names of the variations that directly provide alternative values for this column.
std::string_view ResolveAlias(std::string_view alias) const
Return the actual column name that the alias resolves to.
std::shared_ptr< const VariationsMap_t > fVariations
Immutable multimap of Variations, can be shared among several nodes.
RDFDetail::RColumnReaderBase * GetReader(unsigned int slot, const std::string &colName, const std::string &variationName, const std::type_info &tid)
Return a RDefineReader or a RVariationReader, or nullptr if not available.
std::shared_ptr< const DefinesMap_t > fDefines
Immutable collection of Defines, can be shared among several nodes.
std::vector< std::pair< std::string_view, ROOT::Internal::RDF::RDefinesWithReaders * > > DefinesMap_t
bool IsDefine(std::string_view name) const
Return true if the given column name is an existing defined column.
void AddVariation(std::shared_ptr< RVariationBase > variation)
Register a new systematic variation.
std::shared_ptr< const AliasesMap_t > fAliases
Immutable map of Aliases, can be shared among several nodes.
void AddDefine(std::shared_ptr< RDFDetail::RDefineBase > column)
Add a new defined column.
std::vector< std::string > GetVariationDeps(const std::string &column) const
Get the names of all variations that directly or indirectly affect a given column.
ROOT::RDF::RVariationsDescription BuildVariationsDescription() const
ROOT::Detail::RDF::RLoopManager * fLoopManager
The head node of the computation graph this register belongs to. Never null.
std::unordered_multimap< std::string_view, ROOT::Internal::RDF::RVariationsWithReaders * > VariationsMap_t
void AddAlias(std::string_view alias, std::string_view colName)
Add a new alias to the ledger.
RDFDetail::RDefineBase * GetDefine(std::string_view colName) const
Return the RDefine for the requested column name, or nullptr.
RVariationsWithReaders * FindVariationAndReaders(const std::string &colName, const std::string &variationName)
Return the RVariationsWithReaders object that handles the specified variation of the specified column...
A descriptor for the systematic variations known to a given RDataFrame node.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...