11#ifndef ROOT_RDF_TINTERFACE_UTILS
12#define ROOT_RDF_TINTERFACE_UTILS
42#include <unordered_map>
55template<
typename T,
typename V>
80class RIgnoreErrorLevelRAII {
85 RIgnoreErrorLevelRAII(
int errorIgnoreLevel) {
gErrorIgnoreLevel = errorIgnoreLevel; }
99struct GraphAsymmErrors{};
114template <
typename T,
bool ISV6HISTO = std::is_base_of<TH1, std::decay_t<T>>::value>
117 static bool HasAxisLimits(
T &
h)
119 auto xaxis =
h.GetXaxis();
120 return !(xaxis->GetXmin() == 0. && xaxis->GetXmax() == 0.);
125struct HistoUtils<
T, false> {
126 static void SetCanExtendAllAxes(
T &) {}
127 static bool HasAxisLimits(
T &) {
return true; }
131template <
typename... ColTypes,
typename ActionTag,
typename ActionResultType,
typename PrevNodeType>
132std::unique_ptr<RActionBase>
133BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<ActionResultType> &
h,
const unsigned int nSlots,
134 std::shared_ptr<PrevNodeType> prevNode, ActionTag,
const RColumnRegister &colRegister)
136 using Helper_t = FillHelper<ActionResultType>;
137 using Action_t = RAction<Helper_t, PrevNodeType,
TTraits::TypeList<ColTypes...>>;
138 return std::make_unique<Action_t>(Helper_t(
h, nSlots), bl, std::move(prevNode), colRegister);
142template <
typename... ColTypes,
typename PrevNodeType>
143std::unique_ptr<RActionBase>
144BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<::TH1D> &
h,
const unsigned int nSlots,
145 std::shared_ptr<PrevNodeType> prevNode, ActionTags::Histo1D,
const RColumnRegister &colRegister)
147 auto hasAxisLimits = HistoUtils<::TH1D>::HasAxisLimits(*
h);
150 using Helper_t = FillHelper<::TH1D>;
151 using Action_t = RAction<Helper_t, PrevNodeType,
TTraits::TypeList<ColTypes...>>;
152 return std::make_unique<Action_t>(Helper_t(
h, nSlots), bl, std::move(prevNode), colRegister);
154 using Helper_t = BufferedFillHelper;
155 using Action_t = RAction<Helper_t, PrevNodeType,
TTraits::TypeList<ColTypes...>>;
156 return std::make_unique<Action_t>(Helper_t(
h, nSlots), bl, std::move(prevNode), colRegister);
160template <
typename... ColTypes,
typename PrevNodeType>
161std::unique_ptr<RActionBase>
162BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<TGraph> &
g,
const unsigned int nSlots,
163 std::shared_ptr<PrevNodeType> prevNode, ActionTags::Graph,
const RColumnRegister &colRegister)
165 using Helper_t = FillTGraphHelper;
166 using Action_t = RAction<Helper_t, PrevNodeType,
TTraits::TypeList<ColTypes...>>;
167 return std::make_unique<Action_t>(Helper_t(
g, nSlots), bl, std::move(prevNode), colRegister);
170template <
typename... ColTypes,
typename PrevNodeType>
171std::unique_ptr<RActionBase>
172BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<TGraphAsymmErrors> &
g,
const unsigned int nSlots,
173 std::shared_ptr<PrevNodeType> prevNode, ActionTags::GraphAsymmErrors,
const RColumnRegister &colRegister)
175 using Helper_t = FillTGraphAsymmErrorsHelper;
176 using Action_t = RAction<Helper_t, PrevNodeType,
TTraits::TypeList<ColTypes...>>;
177 return std::make_unique<Action_t>(Helper_t(
g, nSlots), bl, std::move(prevNode), colRegister);
181template <
typename ColType,
typename PrevNodeType,
typename ActionResultType>
182std::unique_ptr<RActionBase>
183BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<ActionResultType> &minV,
const unsigned int nSlots,
184 std::shared_ptr<PrevNodeType> prevNode,
ActionTags::Min,
const RColumnRegister &colRegister)
186 using Helper_t = MinHelper<ActionResultType>;
187 using Action_t = RAction<Helper_t, PrevNodeType, TTraits::TypeList<ColType>>;
188 return std::make_unique<Action_t>(Helper_t(minV, nSlots), bl, std::move(prevNode), colRegister);
192template <
typename ColType,
typename PrevNodeType,
typename ActionResultType>
193std::unique_ptr<RActionBase>
194BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<ActionResultType> &maxV,
const unsigned int nSlots,
195 std::shared_ptr<PrevNodeType> prevNode,
ActionTags::Max,
const RColumnRegister &colRegister)
197 using Helper_t = MaxHelper<ActionResultType>;
198 using Action_t = RAction<Helper_t, PrevNodeType, TTraits::TypeList<ColType>>;
199 return std::make_unique<Action_t>(Helper_t(maxV, nSlots), bl, std::move(prevNode), colRegister);
203template <
typename ColType,
typename PrevNodeType,
typename ActionResultType>
204std::unique_ptr<RActionBase>
205BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<ActionResultType> &sumV,
const unsigned int nSlots,
206 std::shared_ptr<PrevNodeType> prevNode,
ActionTags::Sum,
const RColumnRegister &colRegister)
208 using Helper_t = SumHelper<ActionResultType>;
209 using Action_t = RAction<Helper_t, PrevNodeType, TTraits::TypeList<ColType>>;
210 return std::make_unique<Action_t>(Helper_t(sumV, nSlots), bl, std::move(prevNode), colRegister);
214template <
typename ColType,
typename PrevNodeType>
215std::unique_ptr<RActionBase>
216BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<double> &meanV,
const unsigned int nSlots,
217 std::shared_ptr<PrevNodeType> prevNode,
ActionTags::Mean,
const RColumnRegister &colRegister)
219 using Helper_t = MeanHelper;
220 using Action_t = RAction<Helper_t, PrevNodeType, TTraits::TypeList<ColType>>;
221 return std::make_unique<Action_t>(Helper_t(meanV, nSlots), bl, std::move(prevNode), colRegister);
225template <
typename ColType,
typename PrevNodeType>
226std::unique_ptr<RActionBase>
227BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<double> &stdDeviationV,
const unsigned int nSlots,
228 std::shared_ptr<PrevNodeType> prevNode,
ActionTags::StdDev,
const RColumnRegister &colRegister)
230 using Helper_t = StdDevHelper;
231 using Action_t = RAction<Helper_t, PrevNodeType, TTraits::TypeList<ColType>>;
232 return std::make_unique<Action_t>(Helper_t(stdDeviationV, nSlots), bl, prevNode, colRegister);
236template <
typename... ColTypes,
typename PrevNodeType>
237std::unique_ptr<RActionBase> BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<RDisplay> &
d,
238 const unsigned int, std::shared_ptr<PrevNodeType> prevNode,
241 using Helper_t = DisplayHelper<PrevNodeType>;
242 using Action_t = RAction<Helper_t, PrevNodeType,
TTraits::TypeList<ColTypes...>>;
243 return std::make_unique<Action_t>(Helper_t(
d, prevNode), bl, prevNode, colRegister);
246struct SnapshotHelperArgs {
247 std::string fFileName;
248 std::string fDirName;
249 std::string fTreeName;
250 std::vector<std::string> fOutputColNames;
255template <
typename... ColTypes,
typename PrevNodeType>
256std::unique_ptr<RActionBase>
257BuildAction(
const ColumnNames_t &colNames,
const std::shared_ptr<SnapshotHelperArgs> &snapHelperArgs,
258 const unsigned int nSlots, std::shared_ptr<PrevNodeType> prevNode, ActionTags::Snapshot,
259 const RColumnRegister &colRegister)
261 const auto &
filename = snapHelperArgs->fFileName;
262 const auto &dirname = snapHelperArgs->fDirName;
263 const auto &treename = snapHelperArgs->fTreeName;
264 const auto &outputColNames = snapHelperArgs->fOutputColNames;
265 const auto &options = snapHelperArgs->fOptions;
267 auto makeIsDefine = [&] {
268 std::vector<bool> isDef;
269 isDef.reserve(
sizeof...(ColTypes));
270 for (
auto i = 0u; i <
sizeof...(ColTypes); ++i)
271 isDef[i] = colRegister.HasName(colNames[i]);
274 std::vector<bool> isDefine = makeIsDefine();
276 std::unique_ptr<RActionBase> actionPtr;
279 using Helper_t = SnapshotHelper<ColTypes...>;
280 using Action_t = RAction<Helper_t, PrevNodeType>;
282 new Action_t(Helper_t(
filename, dirname, treename, colNames, outputColNames, options, std::move(isDefine)),
283 colNames, prevNode, colRegister));
286 using Helper_t = SnapshotHelperMT<ColTypes...>;
287 using Action_t = RAction<Helper_t, PrevNodeType>;
288 actionPtr.reset(
new Action_t(
289 Helper_t(nSlots,
filename, dirname, treename, colNames, outputColNames, options, std::move(isDefine)),
290 colNames, prevNode, colRegister));
296template <
typename... ColTypes,
typename PrevNodeType,
typename Helper_t>
297std::unique_ptr<RActionBase>
298BuildAction(
const ColumnNames_t &bl,
const std::shared_ptr<Helper_t> &
h,
const unsigned int ,
299 std::shared_ptr<PrevNodeType> prevNode, ActionTags::Book,
const RColumnRegister &colRegister)
301 using Action_t = RAction<Helper_t, PrevNodeType,
TTraits::TypeList<ColTypes...>>;
302 return std::make_unique<Action_t>(Helper_t(std::move(*
h)), bl, std::move(prevNode), colRegister);
307template <
typename Filter>
310 using FilterRet_t =
typename RDF::CallableTraits<Filter>::ret_type;
312 "filter expression returns a type that is not convertible to bool");
334 RDataSource *ds,
const RColumnRegister &customCols,
335 const ColumnNames_t &branches, std::shared_ptr<RNodeBase> *prevNodeOnHeap);
339 std::shared_ptr<RNodeBase> *upcastNodeOnHeap);
341std::shared_ptr<RJittedVariation>
345 std::shared_ptr<RNodeBase> *upcastNodeOnHeap);
348 const std::type_info &art,
const std::type_info &at,
void *rOnHeap,
TTree *
tree,
349 const unsigned int nSlots,
const RColumnRegister &colRegister,
RDataSource *ds,
350 std::weak_ptr<RJittedAction> *jittedActionOnHeap);
359std::weak_ptr<T> *MakeWeakOnHeap(
const std::shared_ptr<T> &shPtr)
361 return new std::weak_ptr<T>(shPtr);
366std::shared_ptr<T> *MakeSharedOnHeap(
const std::shared_ptr<T> &shPtr)
368 return new std::shared_ptr<T>(shPtr);
375std::shared_ptr<RNodeBase>
UpcastNode(std::shared_ptr<RNodeBase> ptr);
378 const RColumnRegister &validDefines,
RDataSource *ds);
387void AddDSColumnsHelper(
const std::string &colName,
RLoopManager &lm,
RDataSource &ds, RColumnRegister &colRegister)
393 if (!valuePtrs.empty()) {
395 std::vector<void*> typeErasedValuePtrs(valuePtrs.begin(), valuePtrs.end());
402template <
typename... ColumnTypes>
407 using expander =
int[];
409 (
void)expander{(AddDSColumnsHelper<ColumnTypes>(requiredCols[i], lm, ds, colRegister), ++i)..., 0};
413template <
typename F,
typename PrevNode>
415 std::weak_ptr<RJittedFilter> *wkJittedFilter, std::shared_ptr<PrevNode> *prevNodeOnHeap,
416 RColumnRegister *colRegister)
noexcept
418 if (wkJittedFilter->expired()) {
421 delete wkJittedFilter;
423 delete prevNodeOnHeap;
430 const auto jittedFilter = wkJittedFilter->lock();
433 using Callable_t = std::decay_t<F>;
435 using ColTypes_t =
typename TTraits::CallableTraits<Callable_t>::arg_types;
436 constexpr auto nColumns = ColTypes_t::list_size;
443 AddDSColumns(cols, lm, *ds, ColTypes_t(), *colRegister);
445 jittedFilter->SetFilter(
446 std::unique_ptr<RFilterBase>(
new F_t(std::forward<F>(
f), cols, *prevNodeOnHeap, *colRegister,
name)));
450 delete prevNodeOnHeap;
451 delete wkJittedFilter;
454namespace DefineTypes {
456struct RDefinePerSampleTag {};
464 name, dummyType, std::forward<F>(
f), cols, colRegister, lm));
471 return std::unique_ptr<RDefineBase>(
478template <
typename RDefineTypeTag,
typename F>
480 std::weak_ptr<RJittedDefine> *wkJittedDefine, RColumnRegister *colRegister,
481 std::shared_ptr<RNodeBase> *prevNodeOnHeap)
noexcept
484 auto doDeletes = [&] {
485 delete wkJittedDefine;
487 delete prevNodeOnHeap;
491 if (wkJittedDefine->expired()) {
500 auto jittedDefine = wkJittedDefine->lock();
502 using Callable_t = std::decay_t<F>;
503 using ColTypes_t =
typename TTraits::CallableTraits<Callable_t>::arg_types;
507 AddDSColumns(cols, *lm, *ds, ColTypes_t(), *colRegister);
511 const auto dummyType =
"jittedCol_t";
513 std::unique_ptr<RDefineBase> newCol{
514 MakeDefineNode(RDefineTypeTag{},
name, dummyType, std::forward<F>(
f), cols, *colRegister, *lm)};
515 jittedDefine->SetDefine(std::move(newCol));
521void JitVariationHelper(
F &&
f,
const char **colsPtr, std::size_t colsSize,
const char **variedCols,
522 std::size_t variedColsSize,
const char **variationTags, std::size_t variationTagsSize,
524 std::weak_ptr<RJittedVariation> *wkJittedVariation, RColumnRegister *colRegister,
525 std::shared_ptr<RNodeBase> *prevNodeOnHeap)
noexcept
528 auto doDeletes = [&] {
531 delete[] variationTags;
533 delete wkJittedVariation;
535 delete prevNodeOnHeap;
538 if (wkJittedVariation->expired()) {
545 const ColumnNames_t inputColNames(colsPtr, colsPtr + colsSize);
546 std::vector<std::string> variedColNames(variedCols, variedCols + variedColsSize);
547 std::vector<std::string> tags(variationTags, variationTags + variationTagsSize);
549 auto jittedVariation = wkJittedVariation->lock();
551 using Callable_t = std::decay_t<F>;
552 using ColTypes_t =
typename TTraits::CallableTraits<Callable_t>::arg_types;
556 AddDSColumns(inputColNames, *lm, *ds, ColTypes_t(), *colRegister);
559 std::unique_ptr<RVariationBase> newVariation{
560 new RVariation<std::decay_t<F>>(std::move(variedColNames), variationName, std::forward<F>(
f), std::move(tags),
561 jittedVariation->GetTypeName(), *colRegister, *lm, std::move(inputColNames))};
562 jittedVariation->SetVariation(std::move(newVariation));
568template <
typename ActionTag,
typename... ColTypes,
typename PrevNodeType,
typename HelperArgType>
569void CallBuildAction(std::shared_ptr<PrevNodeType> *prevNodeOnHeap,
const char **colsPtr, std::size_t colsSize,
570 const unsigned int nSlots, std::shared_ptr<HelperArgType> *helperArgOnHeap,
571 std::weak_ptr<RJittedAction> *wkJittedActionOnHeap, RColumnRegister *colRegister)
noexcept
574 auto doDeletes = [&] {
576 delete helperArgOnHeap;
577 delete wkJittedActionOnHeap;
581 delete prevNodeOnHeap;
584 if (wkJittedActionOnHeap->expired()) {
593 auto jittedActionOnHeap = wkJittedActionOnHeap->lock();
596 auto &prevNodePtr = *prevNodeOnHeap;
597 auto &loopManager = *prevNodePtr->GetLoopManagerUnchecked();
598 using ColTypes_t =
TypeList<ColTypes...>;
599 constexpr auto nColumns = ColTypes_t::list_size;
600 auto ds = loopManager.GetDataSource();
602 AddDSColumns(cols, loopManager, *ds, ColTypes_t(), *colRegister);
604 auto actionPtr = BuildAction<ColTypes...>(cols, std::move(*helperArgOnHeap), nSlots, std::move(prevNodePtr),
605 ActionTag{}, *colRegister);
606 loopManager.AddSampleCallback(actionPtr->GetSampleCallback());
607 jittedActionOnHeap->SetAction(std::move(actionPtr));
614struct RMinReturnType {
624struct RMinReturnType<
T, true> {
625 using type = TTraits::TakeFirstParameter_t<T>;
629template <
typename R,
typename F,
typename... Args>
632 return [
f](
unsigned int, Args...
a)
mutable ->
R {
return f(
a...); };
635template <
typename ColType,
typename... Rest>
636struct RNeedJittingHelper {
637 static constexpr bool value = RNeedJittingHelper<Rest...>
::value;
640template <
typename... Rest>
642 static constexpr bool value =
true;
646struct RNeedJittingHelper<
T> {
647 static constexpr bool value =
false;
652 static constexpr bool value =
true;
655template <
typename ...ColTypes>
657 static constexpr bool value = RNeedJittingHelper<ColTypes...>
::value;
661struct RNeedJitting<> {
662 static constexpr bool value =
false;
669template <
typename R,
typename Merge,
typename U,
typename T,
typename decayedU = std::decay_t<U>,
670 typename mergeArgsNoDecay_t =
typename CallableTraits<Merge>::arg_types_nodecay,
671 typename mergeArgs_t =
typename CallableTraits<Merge>::arg_types,
672 typename mergeRet_t =
typename CallableTraits<Merge>::ret_type>
675 constexpr bool isAggregatorOk =
677 static_assert(isAggregatorOk,
"aggregator function must have signature `U(U,T)` or `void(U&,T)`");
678 constexpr bool isMergeOk =
680 (std::is_same<
TypeList<std::vector<decayedU> &>, mergeArgsNoDecay_t>
::value &&
682 static_assert(isMergeOk,
"merge function must have signature `U(U,U)` or `void(std::vector<U>&)`");
687template <
typename R,
typename T>
688void CheckAggregate(
T)
690 static_assert(
sizeof(
T) == 0,
"aggregator function must take exactly two arguments");
702 const RColumnRegister &definedCols,
const ColumnNames_t &dataSourceColumns);
705std::vector<std::string>
GetFilterNames(
const std::shared_ptr<RLoopManager> &loopManager);
708template <
typename NodeType>
709std::vector<std::string>
GetFilterNames(
const std::shared_ptr<NodeType> &node)
711 std::vector<std::string> filterNames;
712 node->AddFilterName(filterNames);
716struct ParsedTreePath {
717 std::string fTreeName;
718 std::string fDirName;
728using IsTrueForAllImpl_t =
typename std::is_same<TBoolPack<bs...,
true>, TBoolPack<
true, bs...>>;
730template <
bool... Conditions>
732 static constexpr bool value = IsTrueForAllImpl_t<Conditions...>
::value;
739struct IsList_t : std::false_type {};
742struct IsList_t<std::list<T>> : std::true_type {};
745struct IsDeque_t : std::false_type {};
748struct IsDeque_t<std::deque<T>> : std::true_type {};
756struct InnerValueType {
760template <
typename Elem>
779using MaxReturnType_t = MinReturnType_t<T>;
782using SumReturnType_t = MinReturnType_t<T>;
#define R(a, b, c, d, e, f, g, h, i)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
The head node of a RDF computation graph.
void AddDSValuePtrs(const std::string &col, const std::vector< void * > ptrs)
RDataSource * GetDataSource() const
bool HasDSValuePtrs(const std::string &col) const
RLoopManager * GetLoopManagerUnchecked() final
A binder for user-defined columns and aliases.
RDataSource defines an API that RDataFrame can use to read arbitrary data formats.
virtual bool HasColumn(std::string_view colName) const =0
Checks if the dataset has a certain column.
std::vector< T ** > GetColumnReaders(std::string_view columnName)
Called at most once per column by RDF.
The public interface to the RDataFrame federation of classes.
A "std::vector"-like collection of values implementing handy operation to analyse them.
A TTree represents a columnar dataset.
R Sum(const RVec< T > &v, const R zero=R(0))
Sum elements of an RVec.
RVec< T > Filter(const RVec< T > &v, F &&f)
Create a new collection with the elements passing the filter expressed by the predicate.
basic_string_view< char > string_view
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.
ParsedTreePath ParseTreePath(std::string_view fullTreeName)
std::shared_ptr< RJittedVariation > BookVariationJit(const std::vector< std::string > &colNames, std::string_view variationName, const std::vector< std::string > &variationTags, std::string_view expression, RLoopManager &lm, RDataSource *ds, const RColumnRegister &colRegister, const ColumnNames_t &branches, std::shared_ptr< RNodeBase > *upcastNodeOnHeap)
Book the jitting of a Vary call.
void CheckValidCppVarName(std::string_view var, const std::string &where)
std::shared_ptr< RNodeBase > UpcastNode(std::shared_ptr< RNodeBase > ptr)
ColumnNames_t GetValidatedColumnNames(RLoopManager &lm, const unsigned int nColumns, const ColumnNames_t &columns, const RColumnRegister &customColumns, RDataSource *ds)
Given the desired number of columns and the user-provided list of columns:
std::vector< std::string > GetFilterNames(const std::shared_ptr< RLoopManager > &loopManager)
std::string PrettyPrintAddr(const void *const addr)
std::string JitBuildAction(const ColumnNames_t &cols, std::shared_ptr< RDFDetail::RNodeBase > *prevNode, const std::type_info &helperArgType, const std::type_info &at, void *helperArgOnHeap, TTree *tree, const unsigned int nSlots, const RColumnRegister &customCols, RDataSource *ds, std::weak_ptr< RJittedAction > *jittedActionOnHeap)
ColumnNames_t GetTopLevelBranchNames(TTree &t)
Get all the top-level branches names, including the ones of the friend trees.
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)
void CheckForDefinition(const std::string &where, std::string_view definedColView, const RColumnRegister &customCols, const ColumnNames_t &treeColumns, const ColumnNames_t &dataSourceColumns)
Throw if column definedColView is not already there.
ColumnNames_t FilterArraySizeColNames(const ColumnNames_t &columnNames, const std::string &action)
Take a list of column names, return that list with entries starting by '#' filtered out.
std::shared_ptr< RJittedDefine > BookDefinePerSampleJit(std::string_view name, std::string_view expression, RLoopManager &lm, const RColumnRegister &customCols, std::shared_ptr< RNodeBase > *upcastNodeOnHeap)
Book the jitting of a DefinePerSample call.
void CheckForRedefinition(const std::string &where, std::string_view definedColView, const RColumnRegister &customCols, const ColumnNames_t &treeColumns, const ColumnNames_t &dataSourceColumns)
Throw if column definedColView is already there.
void CheckForDuplicateSnapshotColumns(const ColumnNames_t &cols)
ColumnNames_t ConvertRegexToColumns(const ColumnNames_t &colNames, std::string_view columnNameRegexp, std::string_view callerName)
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 ...
std::shared_ptr< RJittedDefine > BookDefineJit(std::string_view name, std::string_view expression, RLoopManager &lm, RDataSource *ds, const RColumnRegister &customCols, const ColumnNames_t &branches, std::shared_ptr< RNodeBase > *upcastNodeOnHeap)
Book the jitting of a Define call.
std::vector< std::string > GetValidatedArgTypes(const ColumnNames_t &colNames, const RColumnRegister &colRegister, TTree *tree, RDataSource *ds, const std::string &context, bool vector2rvec)
void CheckForNoVariations(const std::string &where, std::string_view definedColView, const RColumnRegister &customCols)
Throw if the column has systematic variations attached.
ColumnNames_t FindUnknownColumns(const ColumnNames_t &requiredCols, const ColumnNames_t &datasetColumns, const RColumnRegister &definedCols, const ColumnNames_t &dataSourceColumns)
void TriggerRun(ROOT::RDF::RNode &node)
Trigger the execution of an RDataFrame computation graph.
std::shared_ptr< RDFDetail::RJittedFilter > BookFilterJit(std::shared_ptr< RDFDetail::RNodeBase > *prevNodeOnHeap, std::string_view name, std::string_view expression, const ColumnNames_t &branches, const RColumnRegister &customCols, TTree *tree, RDataSource *ds)
Book the jitting of a Filter call.
void(off) SmallVectorTemplateBase< T
std::vector< std::string > ColumnNames_t
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
ROOT type_traits extensions.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
Short_t Max(Short_t a, Short_t b)
Double_t Mean(Long64_t n, const T *a, const Double_t *w=0)
Return the weighted mean of an array a with length n.
Short_t Min(Short_t a, Short_t b)
Double_t StdDev(Long64_t n, const T *a, const Double_t *w=0)
A collection of options to steer the creation of the dataset on file.
Lightweight storage for a collection of types.