Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RJittedVariation.hxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, CERN 02/2021
2
3/*************************************************************************
4 * Copyright (C) 1995-2021, 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_RJITTEDVARIATION
12#define ROOT_RJITTEDVARIATION
13
15#include "ROOT/RStringView.hxx"
16
17#include <memory>
18
19class TTreeReader;
20
21namespace ROOT {
22namespace Internal {
23namespace RDF {
24
25/// A wrapper around a concrete RVariation, which forwards all calls to it
26/// RJittedVariation is a placeholder that is inserted in the computation graph in place of a RVariation
27/// that will be just-in-time compiled. Jitted code will assign the concrete RVariation to this RJittedVariation
28/// before the event-loop starts.
30 std::unique_ptr<RVariationBase> fConcreteVariation = nullptr;
31
32public:
33 RJittedVariation(const std::vector<std::string> &colNames, std::string_view variationName,
34 const std::vector<std::string> &variationTags, std::string_view type,
35 const RColumnRegister &colRegister, RLoopManager &lm, const ColumnNames_t &inputColNames)
36 : RVariationBase(colNames, variationName, variationTags, type, colRegister, lm, inputColNames)
37 {
38 }
39 ~RJittedVariation() override;
40
41 void SetVariation(std::unique_ptr<RVariationBase> c) { fConcreteVariation = std::move(c); }
42
43 void InitSlot(TTreeReader *r, unsigned int slot) final;
44 void *GetValuePtr(unsigned int slot, const std::string &column, const std::string &variation) final;
45 const std::type_info &GetTypeId() const final;
46 void Update(unsigned int slot, Long64_t entry) final;
47 void FinalizeSlot(unsigned int slot) final;
48};
49
50} // namespace RDF
51} // namespace Internal
52} // namespace ROOT
53
54#endif // ROOT_RJITTEDVARIATION
#define c(i)
Definition RSha256.hxx:101
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
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
The head node of a RDF computation graph.
A binder for user-defined columns, variations and aliases.
A wrapper around a concrete RVariation, which forwards all calls to it RJittedVariation is a placehol...
void SetVariation(std::unique_ptr< RVariationBase > c)
RJittedVariation(const std::vector< std::string > &colNames, std::string_view variationName, const std::vector< std::string > &variationTags, std::string_view type, const RColumnRegister &colRegister, RLoopManager &lm, const ColumnNames_t &inputColNames)
void InitSlot(TTreeReader *r, unsigned int slot) final
const std::type_info & GetTypeId() const final
void FinalizeSlot(unsigned int slot) final
Clean-up operations to be performed at the end of a task.
void * GetValuePtr(unsigned int slot, const std::string &column, const std::string &variation) final
Return the (type-erased) address of the value of one variation of one column (can be safely cast back...
std::unique_ptr< RVariationBase > fConcreteVariation
This type includes all parts of RVariation that do not depend on the callable signature.
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
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.