30namespace GraphDrawing {
32 std::unordered_map<
void *, std::shared_ptr<GraphNode>> &visitedMap);
42template <
typename PrevNodeRaw>
47 using PrevNode_t = std::conditional_t<std::is_same<PrevNodeRaw, RJittedFilter>::value,
RFilterBase, PrevNodeRaw>;
52 RRange(
unsigned int start,
unsigned int stop,
unsigned int stride, std::shared_ptr<PrevNode_t> pd)
72 if (!
fPrevNode.CheckFilters(slot, entry)) {
116 std::shared_ptr<RDFGraphDrawing::GraphNode>
117 GetGraph(std::unordered_map<
void *, std::shared_ptr<RDFGraphDrawing::GraphNode>> &visitedMap)
final
121 auto prevNode =
fPrevNode.GetGraph(visitedMap);
122 const auto &prevColumns = prevNode->GetDefinedColumns();
129 if (!thisNode->IsNew()) {
132 thisNode->SetPrevNode(prevNode);
142 std::vector<std::string_view> colsViews;
143 colsViews.reserve(prevColumns.size());
144 for (
const auto &col : prevColumns)
145 colsViews.push_back(col);
146 thisNode->AddDefinedColumns(colsViews);
155 assert(variationName !=
"nominal");
167 prevNode = std::static_pointer_cast<PrevNode_t>(prevNode->GetVariedFilter(variationName));
170 auto e =
fVariedRanges.insert({variationName, std::move(variedRange)});
171 return e.first->second;
void Register(RDFInternal::RActionBase *actionPtr)
void Deregister(RDFInternal::RActionBase *actionPtr)
Base class for non-leaf nodes of the computational graph.
const std::vector< std::string > & GetVariations() const
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
std::vector< std::string > fVariations
List of systematic variations that affect this node.
ULong64_t fNProcessedEntries
Long64_t fLastCheckedEntry
std::unordered_map< std::string, std::shared_ptr< RRangeBase > > fVariedRanges
bool fHasStopped
True if the end of the range has been reached.
bool CheckFilters(unsigned int slot, Long64_t entry) final
Ranges act as filters when it comes to selecting entries that downstream nodes should process.
const std::shared_ptr< PrevNode_t > fPrevNodePtr
RRange & operator=(const RRange &)=delete
std::conditional_t< std::is_same< PrevNodeRaw, RJittedFilter >::value, RFilterBase, PrevNodeRaw > PrevNode_t
void StopProcessing() final
void IncrChildrenCount() final
void AddFilterName(std::vector< std::string > &filters) final
This function must be defined by all nodes, but only the filters will add their name.
void Report(ROOT::RDF::RCutFlowReport &rep) const final
RRange(const RRange &)=delete
RRange(unsigned int start, unsigned int stop, unsigned int stride, std::shared_ptr< PrevNode_t > pd)
std::shared_ptr< RNodeBase > GetVariedFilter(const std::string &variationName) final
Return a clone of this node that acts as a Filter working with values in the variationName "universe"...
std::shared_ptr< RDFGraphDrawing::GraphNode > GetGraph(std::unordered_map< void *, std::shared_ptr< RDFGraphDrawing::GraphNode > > &visitedMap) final
void PartialReport(ROOT::RDF::RCutFlowReport &rep) const final
std::shared_ptr< GraphNode > CreateRangeNode(const ROOT::Detail::RDF::RRangeBase *rangePtr, std::unordered_map< void *, std::shared_ptr< GraphNode > > &visitedMap)
bool IsStrInVec(const std::string &str, const std::vector< std::string > &vec)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...