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:
44 RJittedAction(RLoopManager &lm, const ROOT::RDF::ColumnNames_t &columns, const RColumnRegister &colRegister,
45 const std::vector<std::string> &prevVariations);
47
48 void SetAction(std::unique_ptr<RActionBase> a) { fConcreteAction = std::move(a); }
49
50 void Run(unsigned int slot, Long64_t entry) final;
51 void Initialize() final;
52 void InitSlot(TTreeReader *r, unsigned int slot) final;
53 void TriggerChildrenCount() final;
54 void FinalizeSlot(unsigned int) final;
55 void Finalize() final;
56 void *PartialUpdate(unsigned int slot) final;
57 bool HasRun() const final;
58 void SetHasRun() final;
59
60 std::shared_ptr<GraphDrawing::GraphNode> GetGraph();
61
62 // Helper for RMergeableValue
63 std::unique_ptr<ROOT::Detail::RDF::RMergeableValueBase> GetMergeableValue() const final;
64
66
67 std::unique_ptr<RActionBase> MakeVariedAction(std::vector<void *> &&results) final;
68};
69
70} // ns RDF
71} // ns Internal
72} // ns ROOT
73
74#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:80
The head node of a RDF computation graph.
Base class of RMergeableValue.
Class used to create the operation graph to be printed in the dot representation.
A binder for user-defined columns and aliases.
std::shared_ptr< GraphDrawing::GraphNode > GetGraph()
ROOT::RDF::SampleCallback_t GetSampleCallback() final
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::unique_ptr< RActionBase > fConcreteAction
std::unique_ptr< RActionBase > MakeVariedAction(std::vector< void * > &&results) final
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
Definition TTreeReader.h:44
std::vector< std::string > ColumnNames_t
Definition Utils.hxx:35
std::function< void(unsigned int, const ROOT::RDF::RSampleInfo &)> SampleCallback_t
The type of a data-block callback, registered with a RDataFrame computation graph via e....
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...