12#ifndef ROOT_RDF_RCOLUMNREGISTER
13#define ROOT_RDF_RCOLUMNREGISTER
18#include <unordered_map>
68 using VariationsMap_t = std::unordered_multimap<std::string_view, ROOT::Internal::RDF::RVariationsWithReaders *>;
69 using DefinesMap_t = std::vector<std::pair<std::string_view, ROOT::Internal::RDF::RDefinesWithReaders *>>;
70 using AliasesMap_t = std::vector<std::pair<std::string_view, std::string_view>>;
103 RDFDetail::RDefineBase *
GetDefine(std::string_view colName)
const;
107 void AddDefine(std::shared_ptr<RDFDetail::RDefineBase> column);
109 void AddAlias(std::string_view alias, std::string_view colName);
114 std::string_view
ResolveAlias(std::string_view alias)
const;
116 void AddVariation(std::shared_ptr<RVariationBase> variation);
122 std::vector<std::string>
GetVariationDeps(
const std::vector<std::string> &columns)
const;
126 RDFDetail::RColumnReaderBase *
GetReader(
unsigned int slot,
const std::string &colName,
127 const std::string &variationName,
const std::type_info &tid);
129 RDFDetail::RColumnReaderBase *
130 GetReaderUnchecked(
unsigned int slot,
const std::string &colName,
const std::string &variationName);
The head node of a RDF computation graph.
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, ROOT::Internal::RDF::RDefinesWithReaders * > > DefinesMap_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.
RDFDetail::RColumnReaderBase * GetReaderUnchecked(unsigned int slot, const std::string &colName, const std::string &variationName)
Return a RDefineReader or a RVariationReader, or nullptr if not available.
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.
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::vector< std::pair< std::string_view, std::string_view > > AliasesMap_t
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.
RColumnRegister(ROOT::Detail::RDF::RLoopManager *lm)
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 helper type that keeps track of RDefine objects and their corresponding RDefineReaders.
This type includes all parts of RVariation that do not depend on the callable signature.
Column reader that reads the value for a specific column, variation and slot.
A descriptor for the systematic variations known to a given RDataFrame node.
Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target ty...