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>
61 GetGraph(std::unordered_map<void *, std::shared_ptr<GraphDrawing::GraphNode>> &visitedMap) final;
62
63 // Helper for RMergeableValue
64 std::unique_ptr<ROOT::Detail::RDF::RMergeableValueBase> GetMergeableValue() const final;
65
67
68 std::unique_ptr<RActionBase> MakeVariedAction(std::vector<void *> &&results) final;
69 std::unique_ptr<ROOT::Internal::RDF::RActionBase> CloneAction(void *newResult) final;
70};
71
72} // ns RDF
73} // ns Internal
74} // ns ROOT
75
76#endif // ROOT_RJITTEDACTION
#define a(i)
Definition RSha256.hxx:99
long long Long64_t
Definition RtypesCore.h:80
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
The head node of a RDF computation graph.
Base class of RMergeableValue.
A binder for user-defined columns, variations and aliases.
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
std::unique_ptr< ROOT::Internal::RDF::RActionBase > CloneAction(void *newResult) final
void SetAction(std::unique_ptr< RActionBase > a)
std::unique_ptr< RActionBase > fConcreteAction
std::shared_ptr< GraphDrawing::GraphNode > GetGraph(std::unordered_map< void *, std::shared_ptr< GraphDrawing::GraphNode > > &visitedMap) final
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
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....
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.