Logo ROOT  
Reference Guide
RJittedAction.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
14#include "TError.h"
15
18
19RJittedAction::RJittedAction(RLoopManager &lm) : RActionBase(&lm, {}, ROOT::Internal::RDF::RBookedCustomColumns{}) { }
20
21void RJittedAction::Run(unsigned int slot, Long64_t entry)
22{
23 R__ASSERT(fConcreteAction != nullptr);
24 fConcreteAction->Run(slot, entry);
25}
26
28{
29 R__ASSERT(fConcreteAction != nullptr);
30 fConcreteAction->Initialize();
31}
32
33void RJittedAction::InitSlot(TTreeReader *r, unsigned int slot)
34{
35 R__ASSERT(fConcreteAction != nullptr);
36 fConcreteAction->InitSlot(r, slot);
37}
38
40{
41 R__ASSERT(fConcreteAction != nullptr);
42 fConcreteAction->TriggerChildrenCount();
43}
44
45void RJittedAction::FinalizeSlot(unsigned int slot)
46{
47 R__ASSERT(fConcreteAction != nullptr);
48 fConcreteAction->FinalizeSlot(slot);
49}
50
52{
53 R__ASSERT(fConcreteAction != nullptr);
54 fConcreteAction->Finalize();
55}
56
57void *RJittedAction::PartialUpdate(unsigned int slot)
58{
59 R__ASSERT(fConcreteAction != nullptr);
60 return fConcreteAction->PartialUpdate(slot);
61}
62
64{
65 if (fConcreteAction != nullptr) {
66 return fConcreteAction->HasRun();
67 } else {
68 // The action has not been JITted. This means that it has not run.
69 return false;
70 }
71}
72
74{
75 R__ASSERT(fConcreteAction != nullptr);
76 return fConcreteAction->SetHasRun();
77}
78
79void RJittedAction::ClearValueReaders(unsigned int slot)
80{
81 R__ASSERT(fConcreteAction != nullptr);
82 return fConcreteAction->ClearValueReaders(slot);
83}
84
85std::shared_ptr<ROOT::Internal::RDF::GraphDrawing::GraphNode> RJittedAction::GetGraph()
86{
87 R__ASSERT(fConcreteAction != nullptr);
88 return fConcreteAction->GetGraph();
89}
ROOT::R::TRInterface & r
Definition: Object.C:4
long long Long64_t
Definition: RtypesCore.h:71
#define R__ASSERT(e)
Definition: TError.h:96
The head node of a RDF computation graph.
Encapsulates the columns defined by the user.
std::shared_ptr< GraphDrawing::GraphNode > GetGraph()
void ClearValueReaders(unsigned int slot) final
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::unique_ptr< RActionBase > fConcreteAction
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition: TTreeReader.h:43