Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RJittedAction.cxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, Danilo Piparo CERN 09/2018
2
3/*************************************************************************
4 * Copyright (C) 1995-2020, 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
14// Avoid error: invalid application of ‘sizeof’ to incomplete type in RJittedAction::GetMergeableValue
16#include "TError.h"
17
20
22
23void RJittedAction::Run(unsigned int slot, Long64_t entry)
24{
25 R__ASSERT(fConcreteAction != nullptr);
26 fConcreteAction->Run(slot, entry);
27}
28
30{
31 R__ASSERT(fConcreteAction != nullptr);
32 fConcreteAction->Initialize();
33}
34
35void RJittedAction::InitSlot(TTreeReader *r, unsigned int slot)
36{
37 R__ASSERT(fConcreteAction != nullptr);
38 fConcreteAction->InitSlot(r, slot);
39}
40
42{
43 R__ASSERT(fConcreteAction != nullptr);
44 fConcreteAction->TriggerChildrenCount();
45}
46
47void RJittedAction::FinalizeSlot(unsigned int slot)
48{
49 R__ASSERT(fConcreteAction != nullptr);
50 fConcreteAction->FinalizeSlot(slot);
51}
52
54{
55 R__ASSERT(fConcreteAction != nullptr);
56 fConcreteAction->Finalize();
57}
58
59void *RJittedAction::PartialUpdate(unsigned int slot)
60{
61 R__ASSERT(fConcreteAction != nullptr);
62 return fConcreteAction->PartialUpdate(slot);
63}
64
66{
67 if (fConcreteAction != nullptr) {
68 return fConcreteAction->HasRun();
69 } else {
70 // The action has not been JITted. This means that it has not run.
71 return false;
72 }
73}
74
76{
77 R__ASSERT(fConcreteAction != nullptr);
78 return fConcreteAction->SetHasRun();
79}
80
81std::shared_ptr<ROOT::Internal::RDF::GraphDrawing::GraphNode> RJittedAction::GetGraph()
82{
83 R__ASSERT(fConcreteAction != nullptr);
84 return fConcreteAction->GetGraph();
85}
86
87/**
88 Retrieve a wrapper to the result of the action that knows how to merge
89 with others of the same type.
90*/
91std::unique_ptr<ROOT::Detail::RDF::RMergeableValueBase> RJittedAction::GetMergeableValue() const
92{
93 R__ASSERT(fConcreteAction != nullptr);
94 return fConcreteAction->GetMergeableValue();
95}
96
97std::function<void(unsigned int)> RJittedAction::GetDataBlockCallback()
98{
99 R__ASSERT(fConcreteAction != nullptr);
100 return fConcreteAction->GetDataBlockCallback();
101}
ROOT::R::TRInterface & r
Definition Object.C:4
long long Long64_t
Definition RtypesCore.h:73
#define R__ASSERT(e)
Definition TError.h:120
typedef void((*Func_t)())
The head node of a RDF computation graph.
Encapsulates the columns defined by the user.
std::shared_ptr< GraphDrawing::GraphNode > GetGraph()
std::unique_ptr< ROOT::Detail::RDF::RMergeableValueBase > GetMergeableValue() const final
Retrieve a wrapper to the result of the action that knows how to merge with others of the same type.
void FinalizeSlot(unsigned int) final
void Run(unsigned int slot, Long64_t entry) final
void * PartialUpdate(unsigned int slot) final
This method is invoked to update a partial result during the event loop, right before passing the res...
void InitSlot(TTreeReader *r, unsigned int slot) final
std::function< void(unsigned int)> GetDataBlockCallback() final
std::unique_ptr< RActionBase > fConcreteAction
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition TTreeReader.h:44