31#pragma GCC diagnostic push
32#pragma GCC diagnostic ignored "-Woverloaded-virtual"
33#pragma GCC diagnostic ignored "-Wshadow"
37#pragma GCC diagnostic pop
50class RCustomColumnBase;
64using ROOT::Detail::RDF::ColumnNames_t;
67struct ParsedExpression {
72 ColumnNames_t fUsedCols;
74 ColumnNames_t fVarNames;
77static bool IsStrInVec(
const std::string &str,
const std::vector<std::string> &vec)
79 return std::find(vec.cbegin(), vec.cend(), str) != vec.cend();
82static const std::string &ResolveAlias(
const std::string &col,
const std::map<std::string, std::string> &aliasMap)
84 const auto it = aliasMap.find(col);
85 if (it != aliasMap.end())
91static ColumnNames_t FindUsedColumns(
const std::string &expr,
const ColumnNames_t &treeBranchNames,
92 const ColumnNames_t &customColNames,
const ColumnNames_t &dataSourceColNames,
93 const std::map<std::string, std::string> &aliasMap)
95 ColumnNames_t usedCols;
97 lexertk::generator tokens;
98 const auto tokensOk = tokens.process(expr);
100 const auto msg =
"Failed to tokenize expression:\n" + expr +
"\n\nMake sure it is valid C++.";
101 throw std::runtime_error(msg);
105 const auto nTokens = tokens.size();
106 const auto kSymbol = lexertk::token::e_symbol;
107 for (
auto i = 0u; i < nTokens; ++i) {
108 const auto &tok = tokens[i];
110 if (tok.type != kSymbol || tok.value ==
"&" || tok.value ==
"|") {
115 ColumnNames_t potentialColNames({tok.value});
118 auto dotChainKeepsGoing = [&](
unsigned int _i) {
119 return _i + 2 <= nTokens && tokens[_i + 1].value ==
"." && tokens[_i + 2].type == kSymbol;
121 while (dotChainKeepsGoing(i)) {
122 potentialColNames.emplace_back(potentialColNames.back() +
"." + tokens[i + 2].value);
129 auto isRDFColumn = [&](
const std::string &columnOrAlias) {
130 const auto &col = ResolveAlias(columnOrAlias, aliasMap);
131 if (IsStrInVec(col, customColNames) || IsStrInVec(col, treeBranchNames) || IsStrInVec(col, dataSourceColNames))
135 const auto longestRDFColMatch = std::find_if(potentialColNames.crbegin(), potentialColNames.crend(), isRDFColumn);
137 if (longestRDFColMatch != potentialColNames.crend() && !IsStrInVec(*longestRDFColMatch, usedCols)) {
139 usedCols.emplace_back(*longestRDFColMatch);
146static ParsedExpression ParseRDFExpression(
const std::string &expr,
const ColumnNames_t &treeBranchNames,
147 const ColumnNames_t &customColNames,
const ColumnNames_t &dataSourceColNames,
148 const std::map<std::string, std::string> &aliasMap)
150 const auto usedColsAndAliases = FindUsedColumns(expr, treeBranchNames, customColNames, dataSourceColNames, aliasMap);
152 auto escapeDots = [](
const std::string &
s) {
155 dot.Substitute(ss,
"\\.",
"g");
156 return std::string(std::move(ss));
159 ColumnNames_t varNames;
160 ColumnNames_t usedCols;
162 for (
const auto &colOrAlias : usedColsAndAliases) {
163 const auto col = ResolveAlias(colOrAlias, aliasMap);
165 if (!IsStrInVec(col, usedCols)) {
166 usedCols.emplace_back(col);
167 varIdx = varNames.size();
168 varNames.emplace_back(
"var" + std::to_string(varIdx));
172 varIdx = std::distance(usedCols.begin(), std::find(usedCols.begin(), usedCols.end(), col));
174 TPRegexp replacer(
"\\b" + escapeDots(colOrAlias) +
"\\b");
175 replacer.Substitute(exprWithVars, varNames[varIdx],
"g");
178 return ParsedExpression{std::string(std::move(exprWithVars)), std::move(usedCols), std::move(varNames)};
188static std::unordered_map<std::string, std::string> &GetJittedExprs() {
189 static std::unordered_map<std::string, std::string> jittedExpressions;
190 return jittedExpressions;
194BuildLambdaString(
const std::string &expr,
const ColumnNames_t &vars,
const ColumnNames_t &varTypes)
196 R__ASSERT(vars.size() == varTypes.size());
199 const bool hasReturnStmt = re.Match(expr) == 1;
201 std::stringstream ss;
203 for (
auto i = 0u; i < vars.size(); ++i) {
206 ss << varTypes[i] <<
"& " << vars[i] <<
", ";
209 ss.seekp(-2, ss.cur);
215 ss << expr <<
"\n;}";
222static std::string DeclareLambda(
const std::string &expr,
const ColumnNames_t &vars,
const ColumnNames_t &varTypes)
224 const auto lambdaExpr = BuildLambdaString(expr, vars, varTypes);
225 auto &exprMap = GetJittedExprs();
226 const auto exprIt = exprMap.find(lambdaExpr);
227 if (exprIt != exprMap.end()) {
229 const auto lambdaName = exprIt->second;
234 const auto lambdaBaseName =
"lambda" + std::to_string(exprMap.size());
235 const auto lambdaFullName =
"__rdf::" + lambdaBaseName;
237 const auto toDeclare =
"namespace __rdf {\nauto " + lambdaBaseName +
" = " + lambdaExpr +
";\nusing " +
238 lambdaBaseName +
"_ret_t = typename ROOT::TypeTraits::CallableTraits<decltype(" +
239 lambdaBaseName +
")>::ret_type;\n}";
243 exprMap.insert({lambdaExpr, lambdaFullName});
245 return lambdaFullName;
250static std::string RetTypeOfLambda(
const std::string &lambdaName)
252 auto *ti =
gInterpreter->TypedefInfo_Factory((lambdaName +
"_ret_t").c_str());
258static void GetTopLevelBranchNamesImpl(
TTree &t, std::set<std::string> &bNamesReg, ColumnNames_t &bNames,
259 std::set<TTree *> &analysedTrees)
262 if (!analysedTrees.insert(&t).second) {
268 for (
auto branchObj : *branches) {
269 auto name = branchObj->GetName();
270 if (bNamesReg.insert(
name).second) {
271 bNames.emplace_back(
name);
281 for (
auto friendTreeObj : *friendTrees) {
283 GetTopLevelBranchNamesImpl(*friendTree, bNamesReg, bNames, analysedTrees);
289static ColumnNames_t GetTopLevelBranchNames(
TTree &t)
291 std::set<std::string> bNamesSet;
292 ColumnNames_t bNames;
293 std::set<TTree *> analysedTrees;
294 GetTopLevelBranchNamesImpl(t, bNamesSet, bNames, analysedTrees);
298static bool IsValidCppVarName(
const std::string &var)
302 const char firstChar = var[0];
305 auto isALetter = [](
char c) {
return (
c >=
'A' &&
c <=
'Z') || (
c >=
'a' &&
c <=
'z'); };
306 const bool isValidFirstChar = firstChar ==
'_' || isALetter(firstChar);
307 if (!isValidFirstChar)
311 auto isANumber = [](
char c) {
return c >=
'0' &&
c <=
'9'; };
312 auto isValidTok = [&isALetter, &isANumber](
char c) {
return c ==
'_' || isALetter(
c) || isANumber(
c); };
313 for (
const char c : var)
335 std::unique_ptr<RDFInternal::RActionBase> actionPtr)
339 auto snapshotRDF = std::make_shared<ROOT::RDataFrame>(treeName, fileName, validCols);
340 auto snapshotRDFResPtr =
MakeResultPtr(snapshotRDF, loopManager, std::move(actionPtr));
345 return snapshotRDFResPtr;
360 const auto theRegexSize = columnNameRegexp.size();
361 std::string theRegex(columnNameRegexp);
363 const auto isEmptyRegex = 0 == theRegexSize;
365 if (theRegexSize > 0 && theRegex[0] !=
'^')
366 theRegex =
"^" + theRegex;
367 if (theRegexSize > 0 && theRegex[theRegexSize - 1] !=
'$')
368 theRegex = theRegex +
"$";
370 ColumnNames_t selectedColumns;
371 selectedColumns.reserve(32);
376 for (
auto &&branchName : customColumns.
GetNames()) {
377 if ((isEmptyRegex || 0 != regexp.
Match(branchName.c_str())) &&
379 selectedColumns.emplace_back(branchName);
384 auto branchNames = GetTopLevelBranchNames(*
tree);
385 for (
auto &branchName : branchNames) {
386 if (isEmptyRegex || 0 != regexp.
Match(branchName.c_str())) {
387 selectedColumns.emplace_back(branchName);
394 for (
auto &dsColName : dsColNames) {
395 if ((isEmptyRegex || 0 != regexp.
Match(dsColName.c_str())) &&
397 selectedColumns.emplace_back(dsColName);
402 if (selectedColumns.empty()) {
403 std::string
text(callerName);
404 if (columnNameRegexp.empty()) {
405 text =
": there is no column available to match.";
407 text =
": regex \"" + std::string(columnNameRegexp) +
"\" did not match any column.";
409 throw std::runtime_error(
text);
411 return selectedColumns;
415 const std::map<std::string, std::string> &aliasMap,
const ColumnNames_t &dataSourceColumns)
417 const std::string definedColStr(definedCol);
419 if (!IsValidCppVarName(definedColStr)) {
420 const auto msg =
"Cannot define column \"" + definedColStr +
"\": not a valid C++ variable name.";
421 throw std::runtime_error(msg);
424 if (treePtr !=
nullptr) {
426 const auto branch = treePtr->
GetBranch(definedColStr.c_str());
427 if (branch !=
nullptr) {
428 const auto msg =
"branch \"" + definedColStr +
"\" already present in TTree";
429 throw std::runtime_error(msg);
433 if (std::find(customCols.begin(), customCols.end(), definedCol) != customCols.end()) {
434 const auto msg =
"Redefinition of column \"" + definedColStr +
"\"";
435 throw std::runtime_error(msg);
439 const auto aliasColNameIt = aliasMap.find(definedColStr);
440 if (aliasColNameIt != aliasMap.end()) {
441 const auto msg =
"An alias with name " + definedColStr +
" pointing to column " +
442 aliasColNameIt->second +
" is already existing.";
443 throw std::runtime_error(msg);
447 if (!dataSourceColumns.empty()) {
448 if (std::find(dataSourceColumns.begin(), dataSourceColumns.end(), definedCol) != dataSourceColumns.end()) {
449 const auto msg =
"Redefinition of column \"" + definedColStr +
"\" already present in the data-source";
450 throw std::runtime_error(msg);
457 if (nTemplateParams != nColumnNames) {
458 std::string err_msg =
"The number of template parameters specified is ";
459 err_msg += std::to_string(nTemplateParams);
460 err_msg +=
" while ";
461 err_msg += std::to_string(nColumnNames);
462 err_msg +=
" columns have been specified.";
463 throw std::runtime_error(err_msg);
469SelectColumns(
unsigned int nRequiredNames,
const ColumnNames_t &names,
const ColumnNames_t &defaultNames)
473 if (defaultNames.size() < nRequiredNames)
474 throw std::runtime_error(
475 std::to_string(nRequiredNames) +
" column name" + (nRequiredNames == 1 ?
" is" :
"s are") +
476 " required but none were provided and the default list has size " + std::to_string(defaultNames.size()));
478 return ColumnNames_t(defaultNames.begin(), defaultNames.begin() + nRequiredNames);
481 if (names.size() != nRequiredNames) {
482 auto msg = std::to_string(nRequiredNames) +
" column name" + (nRequiredNames == 1 ?
" is" :
"s are") +
483 " required but " + std::to_string(names.size()) + (names.size() == 1 ?
" was" :
" were") +
485 for (
const auto &
name : names)
486 msg +=
" \"" +
name +
"\",";
488 throw std::runtime_error(msg);
494ColumnNames_t
FindUnknownColumns(
const ColumnNames_t &requiredCols,
const ColumnNames_t &datasetColumns,
495 const ColumnNames_t &definedCols,
const ColumnNames_t &dataSourceColumns)
497 ColumnNames_t unknownColumns;
498 for (
auto &column : requiredCols) {
499 const auto isBranch = std::find(datasetColumns.begin(), datasetColumns.end(), column) != datasetColumns.end();
502 const auto isCustomColumn = std::find(definedCols.begin(), definedCols.end(), column) != definedCols.end();
505 const auto isDataSourceColumn =
506 std::find(dataSourceColumns.begin(), dataSourceColumns.end(), column) != dataSourceColumns.end();
507 if (isDataSourceColumn)
509 unknownColumns.emplace_back(column);
511 return unknownColumns;
516 const auto str = colName.data();
517 const auto goodPrefix = colName.size() > 3 &&
518 (
'r' == str[0] ||
't' == str[0]) &&
519 0 == strncmp(
"df", str + 1, 2);
520 return goodPrefix &&
'_' == colName.back();
523std::vector<std::string>
GetFilterNames(
const std::shared_ptr<RLoopManager> &loopManager)
525 return loopManager->GetFiltersNames();
532 s << std::hex << std::showbase << reinterpret_cast<size_t>(addr);
538 std::string_view expression,
const std::map<std::string, std::string> &aliasMap,
542 const auto &dsColumns = ds ? ds->GetColumnNames() : ColumnNames_t{};
544 const auto parsedExpr =
545 ParseRDFExpression(std::string(expression), branches, customCols.
GetNames(), dsColumns, aliasMap);
546 const auto exprVarTypes =
548 const auto lambdaName = DeclareLambda(parsedExpr.fExpr, parsedExpr.fVarNames, exprVarTypes);
549 const auto type = RetTypeOfLambda(lambdaName);
551 std::runtime_error(
"Filter: the following expression does not evaluate to bool:\n" + std::string(expression));
560 std::stringstream filterInvocation;
561 filterInvocation <<
"ROOT::Internal::RDF::JitFilterHelper(" << lambdaName <<
", {";
562 for (
const auto &col : parsedExpr.fUsedCols)
563 filterInvocation <<
"\"" << col <<
"\", ";
564 if (!parsedExpr.fUsedCols.empty())
565 filterInvocation.seekp(-2, filterInvocation.cur);
570 filterInvocation <<
"}, \"" <<
name <<
"\", "
571 <<
"reinterpret_cast<std::weak_ptr<ROOT::Detail::RDF::RJittedFilter>*>("
573 <<
"reinterpret_cast<std::shared_ptr<ROOT::Detail::RDF::RNodeBase>*>(" << prevNodeAddr <<
"),"
574 <<
"reinterpret_cast<ROOT::Internal::RDF::RBookedCustomColumns*>(" << columnsOnHeapAddr <<
")"
577 auto lm = jittedFilter->GetLoopManagerUnchecked();
578 lm->ToJitExec(filterInvocation.str());
584 const ColumnNames_t &branches,
585 std::shared_ptr<RNodeBase> *upcastNodeOnHeap)
589 const auto &dsColumns = ds ? ds->GetColumnNames() : ColumnNames_t{};
591 const auto parsedExpr =
592 ParseRDFExpression(std::string(expression), branches, customCols.
GetNames(), dsColumns, aliasMap);
593 const auto exprVarTypes =
595 const auto lambdaName = DeclareLambda(parsedExpr.fExpr, parsedExpr.fVarNames, exprVarTypes);
596 const auto type = RetTypeOfLambda(lambdaName);
600 auto jittedCustomColumn = std::make_shared<RDFDetail::RJittedCustomColumn>(
name,
type, lm.
GetNSlots());
602 std::stringstream defineInvocation;
603 defineInvocation <<
"ROOT::Internal::RDF::JitDefineHelper(" << lambdaName <<
", {";
604 for (
const auto &col : parsedExpr.fUsedCols) {
605 defineInvocation <<
"\"" << col <<
"\", ";
607 if (!parsedExpr.fUsedCols.empty())
608 defineInvocation.seekp(-2, defineInvocation.cur);
613 defineInvocation <<
"}, \"" <<
name <<
"\", reinterpret_cast<ROOT::Detail::RDF::RLoopManager*>("
615 <<
"), reinterpret_cast<std::weak_ptr<ROOT::Detail::RDF::RJittedCustomColumn>*>("
617 <<
"), reinterpret_cast<ROOT::Internal::RDF::RBookedCustomColumns*>(" << customColumnsAddr
618 <<
"), reinterpret_cast<std::shared_ptr<ROOT::Detail::RDF::RNodeBase>*>("
622 return jittedCustomColumn;
627std::string
JitBuildAction(
const ColumnNames_t &bl, std::shared_ptr<RDFDetail::RNodeBase> *prevNode,
628 const std::type_info &art,
const std::type_info &at,
void *rOnHeap,
TTree *
tree,
630 RDataSource *ds, std::weak_ptr<RJittedAction> *jittedActionOnHeap)
634 if (!actionResultTypeClass) {
635 std::string exceptionText =
"An error occurred while inferring the result type of an operation.";
636 throw std::runtime_error(exceptionText.c_str());
638 const auto actionResultTypeName = actionResultTypeClass->GetName();
642 if (!actionTypeClass) {
643 std::string exceptionText =
"An error occurred while inferring the action type of the operation.";
644 throw std::runtime_error(exceptionText.c_str());
646 const auto actionTypeName = actionTypeClass->GetName();
653 std::stringstream createAction_str;
654 createAction_str <<
"ROOT::Internal::RDF::CallBuildAction<" << actionTypeName;
656 for (
auto &colType : columnTypeNames)
657 createAction_str <<
", " << colType;
660 createAction_str <<
">(reinterpret_cast<std::shared_ptr<ROOT::Detail::RDF::RNodeBase>*>("
662 for (
auto i = 0u; i < bl.size(); ++i) {
664 createAction_str <<
", ";
665 createAction_str <<
'"' << bl[i] <<
'"';
667 createAction_str <<
"}, " << nSlots <<
", reinterpret_cast<" << actionResultTypeName <<
"*>("
669 <<
"), reinterpret_cast<std::weak_ptr<ROOT::Internal::RDF::RJittedAction>*>("
671 <<
"), reinterpret_cast<ROOT::Internal::RDF::RBookedCustomColumns*>(" << customColumnsAddr <<
"));";
672 return createAction_str.str();
677 for (
const auto &
s : strings) {
684std::shared_ptr<RNodeBase>
UpcastNode(std::shared_ptr<RNodeBase> ptr)
695 const ColumnNames_t &validCustomColumns,
RDataSource *ds)
698 auto selectedColumns =
SelectColumns(nColumns, columns, defaultColumns);
700 const auto unknownColumns =
FindUnknownColumns(selectedColumns, validBranchNames, validCustomColumns,
701 ds ? ds->GetColumnNames() : ColumnNames_t{});
703 if (!unknownColumns.empty()) {
705 std::stringstream unknowns;
706 std::string delim = unknownColumns.size() > 1 ?
"s: " :
": ";
707 for (
auto &unknownColumn : unknownColumns) {
708 unknowns << delim << unknownColumn;
711 throw std::runtime_error(
"Unknown column" + unknowns.str());
716 auto aliasMapEnd = aliasMap.end();
718 for (
auto idx :
ROOT::TSeqU(selectedColumns.size())) {
719 const auto &colName = selectedColumns[idx];
720 const auto aliasColumnNameIt = aliasMap.find(colName);
721 if (aliasMapEnd != aliasColumnNameIt) {
722 selectedColumns[idx] = aliasColumnNameIt->second;
726 return selectedColumns;
733 auto toCheckedArgType = [&](
const std::string &
c) {
737 if (colType.rfind(
"CLING_UNKNOWN_TYPE", 0) == 0) {
739 "The type of custom column \"" +
c +
"\" (" + colType.substr(19) +
740 ") is not known to the interpreter, but a just-in-time-compiled " + context +
741 " call requires this column. Make sure to create and load ROOT dictionaries for this column's class.";
742 throw std::runtime_error(msg);
746 std::vector<std::string> colTypes;
747 colTypes.reserve(colNames.size());
748 std::transform(colNames.begin(), colNames.end(), std::back_inserter(colTypes), toCheckedArgType);
757 const auto nColumns = requestedCols.size();
758 std::vector<bool> mustBeDefined(nColumns,
false);
759 for (
auto i = 0u; i < nColumns; ++i)
760 mustBeDefined[i] = std::find(definedCols.begin(), definedCols.end(), requestedCols[i]) == definedCols.end();
761 return mustBeDefined;
static RooMathCoreReg dummy
The head node of a RDF computation graph.
const std::map< std::string, std::string > & GetAliasMap() const
const ColumnNames_t & GetBranchNames()
Return all valid TTree::Branch names (caching results for subsequent calls).
void ToJitExec(const std::string &) const
const ColumnNames_t & GetDefaultColumnNames() const
Return the list of default columns – empty if none was provided when constructing the RDataFrame.
unsigned int GetNSlots() const
Encapsulates the columns defined by the user.
ColumnNames_t GetNames() const
Returns the list of the names of the defined columns.
bool HasName(std::string_view name) const
Check if the provided name is tracked in the names list.
const RCustomColumnBasePtrMap_t & GetColumns() const
Returns the list of the pointers to the defined columns.
RDataSource defines an API that RDataFrame can use to read arbitrary data formats.
virtual const std::vector< std::string > & GetColumnNames() const =0
Returns a reference to the collection of the dataset's column names.
A pseudo container class which is a generator of indices.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Small helper to keep current directory context.
A TFriendElement TF describes a TTree object TF in a file.
Int_t Match(const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10, TArrayI *pos=0)
The number of matches is returned, this equals the full match + sub-pattern matches.
A TTree represents a columnar dataset.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
virtual TObjArray * GetListOfBranches()
virtual TList * GetListOfFriends() const
basic_string_view< char > string_view
RResultPtr< T > MakeResultPtr(const std::shared_ptr< T > &r, RLoopManager &df, std::shared_ptr< ROOT::Internal::RDF::RActionBase > actionPtr)
Create a RResultPtr and set its pointer to the corresponding RAction This overload is invoked by non-...
const ColumnNames_t SelectColumns(unsigned int nRequiredNames, const ColumnNames_t &names, const ColumnNames_t &defaultNames)
Choose between local column names or default column names, throw in case of errors.
void BookFilterJit(const std::shared_ptr< RJittedFilter > &jittedFilter, std::shared_ptr< RDFDetail::RNodeBase > *prevNodeOnHeap, std::string_view name, std::string_view expression, const std::map< std::string, std::string > &aliasMap, const ColumnNames_t &branches, const RDFInternal::RBookedCustomColumns &customCols, TTree *tree, RDataSource *ds)
std::string ColumnName2ColumnTypeName(const std::string &colName, TTree *tree, RDataSource *ds, RCustomColumnBase *customColumn, bool vector2rvec)
Return a string containing the type of the given branch.
std::vector< std::string > GetValidatedArgTypes(const ColumnNames_t &colNames, const RBookedCustomColumns &customColumns, TTree *tree, RDataSource *ds, const std::string &context, bool vector2rvec)
std::shared_ptr< RNodeBase > UpcastNode(std::shared_ptr< RNodeBase > ptr)
std::vector< std::string > GetFilterNames(const std::shared_ptr< RLoopManager > &loopManager)
ColumnNames_t ConvertRegexToColumns(const RDFInternal::RBookedCustomColumns &customColumns, TTree *tree, ROOT::RDF::RDataSource *dataSource, std::string_view columnNameRegexp, std::string_view callerName)
std::string PrettyPrintAddr(const void *const addr)
std::shared_ptr< RJittedCustomColumn > BookDefineJit(std::string_view name, std::string_view expression, RLoopManager &lm, RDataSource *ds, const RDFInternal::RBookedCustomColumns &customCols, const ColumnNames_t &branches, std::shared_ptr< RNodeBase > *upcastNodeOnHeap)
void CheckTypesAndPars(unsigned int nTemplateParams, unsigned int nColumnNames)
std::string DemangleTypeIdName(const std::type_info &typeInfo)
bool AtLeastOneEmptyString(const std::vector< std::string_view > strings)
ColumnNames_t FindUnknownColumns(const ColumnNames_t &requiredCols, const ColumnNames_t &datasetColumns, const ColumnNames_t &definedCols, const ColumnNames_t &dataSourceColumns)
HeadNode_t CreateSnapshotRDF(const ColumnNames_t &validCols, std::string_view treeName, std::string_view fileName, bool isLazy, RLoopManager &loopManager, std::unique_ptr< RDFInternal::RActionBase > actionPtr)
std::string JitBuildAction(const ColumnNames_t &bl, std::shared_ptr< RDFDetail::RNodeBase > *prevNode, const std::type_info &art, const std::type_info &at, void *rOnHeap, TTree *tree, const unsigned int nSlots, const RDFInternal::RBookedCustomColumns &customCols, RDataSource *ds, std::weak_ptr< RJittedAction > *jittedActionOnHeap)
bool IsInternalColumn(std::string_view colName)
void InterpreterDeclare(const std::string &code)
ColumnNames_t GetValidatedColumnNames(RLoopManager &lm, const unsigned int nColumns, const ColumnNames_t &columns, const ColumnNames_t &validCustomColumns, RDataSource *ds)
Given the desired number of columns and the user-provided list of columns:
std::vector< bool > FindUndefinedDSColumns(const ColumnNames_t &requestedCols, const ColumnNames_t &definedCols)
Return a bitset each element of which indicates whether the corresponding element in selectedColumns ...
void CheckCustomColumn(std::string_view definedCol, TTree *treePtr, const ColumnNames_t &customCols, const std::map< std::string, std::string > &aliasMap, const ColumnNames_t &dataSourceColumns)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
char * DemangleTypeIdName(const std::type_info &ti, int &errorCode)
Demangle in a portable way the type id name.
static constexpr double s