Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RJittedAction.hxx
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
11#ifndef ROOT_RJITTEDACTION
12#define ROOT_RJITTEDACTION
13
16#include "RtypesCore.h"
17
18#include <memory>
19
20class TTreeReader;
21
22namespace ROOT {
23namespace Detail {
24namespace RDF {
25class RMergeableValueBase;
26} // namespace RDF
27} // namespace Detail
28} // namespace ROOT
29
30namespace ROOT {
31namespace Internal {
32namespace RDF {
33
34// fwd decl
35namespace GraphDrawing {
36class GraphNode;
37} // ns GraphDrawing
38
39class RJittedAction : public RActionBase {
40private:
41 std::unique_ptr<RActionBase> fConcreteAction;
42
43public:
46
47 void SetAction(std::unique_ptr<RActionBase> a) { fConcreteAction = std::move(a); }
48
49 void Run(unsigned int slot, Long64_t entry) final;
50 void Initialize() final;
51 void InitSlot(TTreeReader *r, unsigned int slot) final;
52 void TriggerChildrenCount() final;
53 void FinalizeSlot(unsigned int) final;
54 void Finalize() final;
55 void *PartialUpdate(unsigned int slot) final;
56 bool HasRun() const final;
57 void SetHasRun() final;
58
59 std::shared_ptr<GraphDrawing::GraphNode> GetGraph();
60
61 // Helper for RMergeableValue
62 std::unique_ptr<ROOT::Detail::RDF::RMergeableValueBase> GetMergeableValue() const final;
63
64 std::function<void(unsigned int)> GetDataBlockCallback() final;
65};
66
67} // ns RDF
68} // ns Internal
69} // ns ROOT
70
71#endif // ROOT_RJITTEDACTION
ROOT::R::TRInterface & r
Definition Object.C:4
#define a(i)
Definition RSha256.hxx:99
long long Long64_t
Definition RtypesCore.h:73
The head node of a RDF computation graph.
void Deregister(RDFInternal::RActionBase *actionPtr)
Base class of RMergeableValue.
Class used to create the operation graph to be printed in the dot representation.
RLoopManager * fLoopManager
A raw pointer to the RLoopManager at the root of this functional graph.
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
void SetAction(std::unique_ptr< RActionBase > a)
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
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...