27namespace GraphDrawing {
29 std::unordered_map<
void *, std::shared_ptr<GraphNode>> &visitedMap);
39template <
typename PrevNodeRaw>
44 using PrevNode_t = std::conditional_t<std::is_same<PrevNodeRaw, RJittedFilter>::value,
RFilterBase, PrevNodeRaw>;
49 RRange(
unsigned int start,
unsigned int stop,
unsigned int stride, std::shared_ptr<PrevNode_t> pd)
69 if (!
fPrevNode.CheckFilters(slot, entry)) {
113 std::shared_ptr<RDFGraphDrawing::GraphNode>
114 GetGraph(std::unordered_map<
void *, std::shared_ptr<RDFGraphDrawing::GraphNode>> &visitedMap)
final
118 auto prevNode =
fPrevNode.GetGraph(visitedMap);
119 const auto &prevColumns = prevNode->GetDefinedColumns();
126 if (!thisNode->IsNew()) {
129 thisNode->SetPrevNode(prevNode);
135 thisNode->AddDefinedColumns(prevColumns);
144 assert(variationName !=
"nominal");
156 prevNode = std::static_pointer_cast<PrevNode_t>(prevNode->GetVariedFilter(variationName));
159 auto e =
fVariedRanges.insert({variationName, std::move(variedRange)});
160 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)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.