Logo ROOT   6.18/05
Reference Guide
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:
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 ClearValueReaders(unsigned int slot) final;
59 void InitNode() final;
60 void AddFilterName(std::vector<std::string> &filters) final;
61 void ClearTask(unsigned int slot) final;
62 std::shared_ptr<RDFGraphDrawing::GraphNode> GetGraph();
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:69
const char * filters[]
char name[80]
Definition: TGX11.cxx:109
A wrapper around a concrete RFilter, which forwards all calls to it RJittedFilter is the type of the ...
void ClearValueReaders(unsigned int slot) final
void FillReport(ROOT::RDF::RCutFlowReport &) const final
void ClearTask(unsigned int slot) 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
std::unique_ptr< RFilterBase > fConcreteFilter
void PartialReport(ROOT::RDF::RCutFlowReport &) const final
bool CheckFilters(unsigned int slot, Long64_t entry) final
RJittedFilter(RLoopManager *lm, std::string_view name)
void SetFilter(std::unique_ptr< RFilterBase > f)
The head node of a RDF computation graph.
void Deregister(RDFInternal::RActionBase *actionPtr)
RLoopManager * fLoopManager
Definition: RNodeBase.hxx:43
Class used to create the operation graph to be printed in the dot representation.
Definition: GraphNode.hxx:26
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition: TTreeReader.h:44
basic_string_view< char > string_view
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21