Logo ROOT   6.21/01
Reference Guide
RJittedFilter.cxx
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 
15 
16 using namespace ROOT::Detail::RDF;
17 
19  : RFilterBase(lm, name, lm->GetNSlots(), RDFInternal::RBookedCustomColumns()) { }
20 
21 void RJittedFilter::SetFilter(std::unique_ptr<RFilterBase> f)
22 {
23  fConcreteFilter = std::move(f);
24 }
25 
26 void RJittedFilter::InitSlot(TTreeReader *r, unsigned int slot)
27 {
28  R__ASSERT(fConcreteFilter != nullptr);
29  fConcreteFilter->InitSlot(r, slot);
30 }
31 
32 bool RJittedFilter::CheckFilters(unsigned int slot, Long64_t entry)
33 {
34  R__ASSERT(fConcreteFilter != nullptr);
35  return fConcreteFilter->CheckFilters(slot, entry);
36 }
37 
39 {
40  R__ASSERT(fConcreteFilter != nullptr);
41  fConcreteFilter->Report(cr);
42 }
43 
45 {
46  R__ASSERT(fConcreteFilter != nullptr);
47  fConcreteFilter->PartialReport(cr);
48 }
49 
51 {
52  R__ASSERT(fConcreteFilter != nullptr);
53  fConcreteFilter->FillReport(cr);
54 }
55 
57 {
58  R__ASSERT(fConcreteFilter != nullptr);
59  fConcreteFilter->IncrChildrenCount();
60 }
61 
63 {
64  R__ASSERT(fConcreteFilter != nullptr);
65  fConcreteFilter->StopProcessing();
66 }
67 
69 {
70  R__ASSERT(fConcreteFilter != nullptr);
71  fConcreteFilter->ResetChildrenCount();
72 }
73 
75 {
76  R__ASSERT(fConcreteFilter != nullptr);
77  fConcreteFilter->TriggerChildrenCount();
78 }
79 
81 {
82  R__ASSERT(fConcreteFilter != nullptr);
83  fConcreteFilter->ResetReportCount();
84 }
85 
86 void RJittedFilter::ClearValueReaders(unsigned int slot)
87 {
88  R__ASSERT(fConcreteFilter != nullptr);
89  fConcreteFilter->ClearValueReaders(slot);
90 }
91 
92 void RJittedFilter::ClearTask(unsigned int slot)
93 {
94  R__ASSERT(fConcreteFilter != nullptr);
95  fConcreteFilter->ClearTask(slot);
96 }
97 
99 {
100  R__ASSERT(fConcreteFilter != nullptr);
101  fConcreteFilter->InitNode();
102 }
103 
104 void RJittedFilter::AddFilterName(std::vector<std::string> &filters)
105 {
106  if (fConcreteFilter == nullptr) {
107  // No event loop performed yet, but the JITTING must be performed.
109  }
110  fConcreteFilter->AddFilterName(filters);
111 }
112 
113 std::shared_ptr<RDFGraphDrawing::GraphNode> RJittedFilter::GetGraph()
114 {
115  if (fConcreteFilter != nullptr) {
116  // Here the filter exists, so it can be served
117  return fConcreteFilter->GetGraph();
118  }
119  throw std::runtime_error("The Jitting should have been invoked before this method.");
120 }
void InitSlot(TTreeReader *r, unsigned int slot) final
The head node of a RDF computation graph.
long long Long64_t
Definition: RtypesCore.h:69
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree...
Definition: TTreeReader.h:43
void ClearValueReaders(unsigned int slot) final
#define R__ASSERT(e)
Definition: TError.h:96
#define f(i)
Definition: RSha256.hxx:104
unsigned int GetNSlots()
Definition: RDFUtils.cxx:257
void FillReport(ROOT::RDF::RCutFlowReport &) const final
void AddFilterName(std::vector< std::string > &filters) final
void Report(ROOT::RDF::RCutFlowReport &) const final
void PartialReport(ROOT::RDF::RCutFlowReport &) const final
std::shared_ptr< RDFGraphDrawing::GraphNode > GetGraph()
const char * filters[]
ROOT::R::TRInterface & r
Definition: Object.C:4
bool CheckFilters(unsigned int slot, Long64_t entry) final
void Jit()
Add RDF nodes that require just-in-time compilation to the computation graph.
void ClearTask(unsigned int slot) final
std::unique_ptr< RFilterBase > fConcreteFilter
RJittedFilter(RLoopManager *lm, std::string_view name)
virtual RLoopManager * GetLoopManagerUnchecked()
Definition: RNodeBase.hxx:64
void SetFilter(std::unique_ptr< RFilterBase > f)
char name[80]
Definition: TGX11.cxx:109