31std::shared_ptr<GraphNode>
CreateRangeNode(
const ROOT::Detail::RDF::RRangeBase *rangePtr,
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)
76 if (!
fPrevNode.CheckFilters(slot, entry)) {
120 std::shared_ptr<RDFGraphDrawing::GraphNode>
121 GetGraph(std::unordered_map<
void *, std::shared_ptr<RDFGraphDrawing::GraphNode>> &visitedMap)
final
125 auto prevNode =
fPrevNode.GetGraph(visitedMap);
126 const auto &prevColumns = prevNode->GetDefinedColumns();
128 auto thisNode = RDFGraphDrawing::CreateRangeNode(
this, visitedMap);
133 if (!thisNode->IsNew()) {
136 thisNode->SetPrevNode(prevNode);
146 std::vector<std::string_view> colsViews;
147 colsViews.reserve(prevColumns.size());
148 for (
const auto &col : prevColumns)
149 colsViews.push_back(col);
150 thisNode->AddDefinedColumns(colsViews);
159 assert(variationName !=
"nominal");
171 prevNode = std::static_pointer_cast<PrevNode_t>(prevNode->GetVariedFilter(variationName));
174 auto e =
fVariedRanges.insert({variationName, std::move(variedRange)});
175 return e.first->second;
Basic types used by ROOT and required by TInterpreter.
long long Long64_t
Portable signed long integer 8 bytes.
A wrapper around a concrete RFilter, which forwards all calls to it RJittedFilter is the type of the ...
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.
RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride, const unsigned int nSlots, const std::vector< std::string > &prevVariations)
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"...
RRange & operator=(RRange &&)=delete
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
Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target ty...
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)