Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
16using namespace ROOT::Detail::RDF;
17
19 : RFilterBase(lm, name, lm->GetNSlots(), RDFInternal::RBookedDefines()) { }
20
21void RJittedFilter::SetFilter(std::unique_ptr<RFilterBase> f)
22{
23 fConcreteFilter = std::move(f);
24}
25
26void RJittedFilter::InitSlot(TTreeReader *r, unsigned int slot)
27{
28 R__ASSERT(fConcreteFilter != nullptr);
29 fConcreteFilter->InitSlot(r, slot);
30}
31
32bool 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
86void RJittedFilter::FinaliseSlot(unsigned int slot)
87{
88 R__ASSERT(fConcreteFilter != nullptr);
89 fConcreteFilter->FinaliseSlot(slot);
90}
91
93{
94 R__ASSERT(fConcreteFilter != nullptr);
95 fConcreteFilter->InitNode();
96}
97
98void RJittedFilter::AddFilterName(std::vector<std::string> &filters)
99{
100 if (fConcreteFilter == nullptr) {
101 // No event loop performed yet, but the JITTING must be performed.
103 }
104 fConcreteFilter->AddFilterName(filters);
105}
106
107std::shared_ptr<RDFGraphDrawing::GraphNode> RJittedFilter::GetGraph()
108{
109 if (fConcreteFilter != nullptr) {
110 // Here the filter exists, so it can be served
111 return fConcreteFilter->GetGraph();
112 }
113 throw std::runtime_error("The Jitting should have been invoked before this method.");
114}
ROOT::R::TRInterface & r
Definition Object.C:4
#define f(i)
Definition RSha256.hxx:104
long long Long64_t
Definition RtypesCore.h:73
#define R__ASSERT(e)
Definition TError.h:120
const char * filters[]
char name[80]
Definition TGX11.cxx:110
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
RJittedFilter(RLoopManager *lm, std::string_view name)
void SetFilter(std::unique_ptr< RFilterBase > f)
The head node of a RDF computation graph.
void Jit()
Add RDF nodes that require just-in-time compilation to the computation graph.
virtual RLoopManager * GetLoopManagerUnchecked()
Definition RNodeBase.hxx:65
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition TTreeReader.h:44