Logo ROOT  
Reference Guide
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};
70
71} // ns RDF
72} // ns Internal
73} // ns ROOT
74
75#endif // ROOT_RJITTEDACTION
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
RJittedAction(RLoopManager &lm, const ROOT::RDF::ColumnNames_t &columns, const RColumnRegister &colRegister, const std::vector< std::string > &prevVariations)
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....
Definition: RSampleInfo.hxx:84
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
TArc a
Definition: textangle.C:12