Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RJittedFilter.hxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, Danilo Piparo CERN 09/2018
2
3/*************************************************************************
4 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_RJITTEDFILTER
12#define ROOT_RJITTEDFILTER
13
17#include "ROOT/RStringView.hxx"
18#include "RtypesCore.h"
19
20#include <memory>
21#include <string>
22#include <vector>
23
24class TTreeReader;
25
26namespace ROOT {
27namespace RDF {
28class RCutFlowReport;
29}
30
31namespace Detail {
32namespace RDF {
33
35
36/// A wrapper around a concrete RFilter, which forwards all calls to it
37/// RJittedFilter is the type of the node returned by jitted Filter calls: the concrete filter can be created and set
38/// at a later time, from jitted code.
39class RJittedFilter final : public RFilterBase {
40 std::unique_ptr<RFilterBase> fConcreteFilter = nullptr;
41
42public:
43 RJittedFilter(RLoopManager *lm, std::string_view name, const std::vector<std::string> &variations);
45
46 void SetFilter(std::unique_ptr<RFilterBase> f);
47
48 void InitSlot(TTreeReader *r, unsigned int slot) final;
49 bool CheckFilters(unsigned int slot, Long64_t entry) final;
50 void Report(ROOT::RDF::RCutFlowReport &) const final;
51 void PartialReport(ROOT::RDF::RCutFlowReport &) const final;
52 void FillReport(ROOT::RDF::RCutFlowReport &) const final;
53 void IncrChildrenCount() final;
54 void StopProcessing() final;
55 void ResetChildrenCount() final;
56 void TriggerChildrenCount() final;
57 void ResetReportCount() final;
58 void InitNode() final;
59 void AddFilterName(std::vector<std::string> &filters) final;
60 void FinaliseSlot(unsigned int slot) final;
61 std::shared_ptr<RDFGraphDrawing::GraphNode> GetGraph();
62 std::shared_ptr<RNodeBase> GetVariedFilter(const std::string &variationName) final;
63};
64
65} // ns RDF
66} // ns Detail
67} // ns ROOT
68
69#endif // ROOT_RJITTEDFILTER
ROOT::R::TRInterface & r
Definition Object.C:4
#define f(i)
Definition RSha256.hxx:104
long long Long64_t
Definition RtypesCore.h:80
const char * filters[]
char name[80]
Definition TGX11.cxx:110
A wrapper around a concrete RFilter, which forwards all calls to it RJittedFilter is the type of the ...
void FillReport(ROOT::RDF::RCutFlowReport &) const final
void AddFilterName(std::vector< std::string > &filters) final
void Report(ROOT::RDF::RCutFlowReport &) const final
std::shared_ptr< RDFGraphDrawing::GraphNode > GetGraph()
void InitSlot(TTreeReader *r, unsigned int slot) final
void FinaliseSlot(unsigned int slot) final
Clean-up operations to be performed at the end of a task.
std::unique_ptr< RFilterBase > fConcreteFilter
void PartialReport(ROOT::RDF::RCutFlowReport &) const final
bool CheckFilters(unsigned int slot, Long64_t entry) final
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"...
void SetFilter(std::unique_ptr< RFilterBase > f)
The head node of a RDF computation graph.
Base class for non-leaf nodes of the computational graph.
Definition RNodeBase.hxx:42
Class used to create the operation graph to be printed in the dot representation.
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition TTreeReader.h:44
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...