36namespace GraphDrawing {
41std::shared_ptr<GraphNode>
53template <
typename FilterF,
typename PrevDataFrame>
56 using TypeInd_t = std::make_index_sequence<ColumnTypes_t::list_size>;
62 std::vector<RDFInternal::RDFValueTuple_t<ColumnTypes_t>>
fValues;
67 RFilter(FilterF
f,
const ColumnNames_t &columns, std::shared_ptr<PrevDataFrame> pd,
74 for (
auto i = 0u; i < nColumns; ++i)
87 if (!
fPrevData.CheckFilters(slot, entry)) {
101 template <std::size_t...
S>
113 bookedBranch.second->InitSlot(
r, slot);
162 column.second->ClearValueReaders(slot);
168 std::shared_ptr<RDFGraphDrawing::GraphNode>
GetGraph()
172 auto prevColumns = prevNode->GetDefinedColumns();
179 if (!thisNode->GetIsNew()) {
183 auto evaluatedNode = thisNode;
191 if (std::find(prevColumns.begin(), prevColumns.end(), column.first) == prevColumns.end()) {
193 evaluatedNode->SetPrevNode(defineNode);
194 evaluatedNode = defineNode;
201 evaluatedNode->SetPrevNode(prevNode);
typedef void((*Func_t)())
const unsigned int fNSlots
Number of thread slots used by this node, inherited from parent node.
RDFInternal::RBookedCustomColumns fCustomColumns
std::vector< ULong64_t > fRejected
virtual void FillReport(ROOT::RDF::RCutFlowReport &) const
std::vector< int > fLastResult
std::vector< ULong64_t > fAccepted
std::vector< Long64_t > fLastCheckedEntry
void StopProcessing() final
virtual void ClearTask(unsigned int slot) final
void PartialReport(ROOT::RDF::RCutFlowReport &rep) const final
bool CheckFilterHelper(unsigned int slot, Long64_t entry, std::index_sequence< S... >)
void Report(ROOT::RDF::RCutFlowReport &rep) const final
const std::shared_ptr< PrevDataFrame > fPrevDataPtr
void AddFilterName(std::vector< std::string > &filters)
virtual void ClearValueReaders(unsigned int slot) final
void IncrChildrenCount() final
void InitSlot(TTreeReader *r, unsigned int slot) final
std::array< bool, ColumnTypes_t::list_size > fIsCustomColumn
The nth flag signals whether the nth input column is a custom column or not.
RFilter & operator=(const RFilter &)=delete
RFilter(FilterF f, const ColumnNames_t &columns, std::shared_ptr< PrevDataFrame > pd, const RDFInternal::RBookedCustomColumns &customColumns, std::string_view name="")
void TriggerChildrenCount() final
typename CallableTraits< FilterF >::arg_types ColumnTypes_t
const ColumnNames_t fColumnNames
bool CheckFilters(unsigned int slot, Long64_t entry) final
RFilter(const RFilter &)=delete
std::make_index_sequence< ColumnTypes_t::list_size > TypeInd_t
std::vector< RDFInternal::RDFValueTuple_t< ColumnTypes_t > > fValues
PrevDataFrame & fPrevData
std::shared_ptr< RDFGraphDrawing::GraphNode > GetGraph()
void Deregister(RDFInternal::RActionBase *actionPtr)
virtual RLoopManager * GetLoopManagerUnchecked()
unsigned int fNStopsReceived
Number of times that a children node signaled to stop processing entries.
unsigned int fNChildren
Number of nodes of the functional graph hanging from this object.
RLoopManager * fLoopManager
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.
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
basic_string_view< char > string_view
bool CheckIfDefaultOrDSColumn(const std::string &name, const std::shared_ptr< ROOT::Detail::RDF::RCustomColumnBase > &column)
std::shared_ptr< GraphNode > CreateDefineNode(const std::string &columnName, const ROOT::Detail::RDF::RCustomColumnBase *columnPtr)
std::shared_ptr< GraphNode > CreateFilterNode(const ROOT::Detail::RDF::RFilterBase *filterPtr)
void InitRDFValues(unsigned int slot, RDFValueTuple &valueTuple, TTreeReader *r, const ColumnNames_t &bn, const RBookedCustomColumns &customCols, std::index_sequence< S... >, const std::array< bool, sizeof...(S)> &isCustomColumn)
Initialize a tuple of RColumnValues.
void ResetRDFValueTuple(std::vector< RTypeErasedColumnValue > &values, std::index_sequence< S... >, ROOT::TypeTraits::TypeList< ColTypes... >)
This overload is specialized to act on RTypeErasedColumnValues instead of RColumnValues.
ROOT type_traits extensions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
RooArgSet S(const RooAbsArg &v1)