Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ROOT::Detail::RDF::RJittedDefine Class Reference

A wrapper around a concrete RDefine, which forwards all calls to it RJittedDefine is a placeholder that is put in the collection of custom columns in place of a RDefine that will be just-in-time compiled.

Jitted code will assign the concrete RDefine to this RJittedDefine before the event-loop starts.

Definition at line 36 of file RJittedDefine.hxx.

Public Member Functions

 RJittedDefine (std::string_view name, std::string_view type, RLoopManager &lm, const RDFInternal::RColumnRegister &colRegister, const ColumnNames_t &columns)
 ~RJittedDefine ()
void FinalizeSlot (unsigned int slot) final
 Clean-up operations to be performed at the end of a task.
std::string GetName () const
const std::type_info & GetTypeId () const final
std::string GetTypeName () const
void * GetValuePtr (unsigned int slot) final
 Return the (type-erased) address of the Define'd value for the given processing slot.
const std::vector< std::string > & GetVariations () const
RDefineBaseGetVariedDefine (const std::string &variationName) final
 Return a clone of this Define that works with values in the variationName "universe".
void InitSlot (TTreeReader *r, unsigned int slot) final
void MakeVariations (const std::vector< std::string > &variations) final
 Create clones of this Define that work with values in varied "universes".
void SetDefine (std::unique_ptr< RDefineBase > c)
void Update (unsigned int slot, const ROOT::RDF::RSampleInfo &id) final
 Update function to be called once per sample, used if the derived type is a RDefinePerSample.
void Update (unsigned int slot, Long64_t entry) final
 Update the value at the address returned by GetValuePtr with the content corresponding to the given entry.

Protected Attributes

RDFInternal::RColumnRegister fColRegister
const ROOT::RDF::ColumnNames_t fColumnNames
ROOT::RVecB fIsDefine
 The nth flag signals whether the nth input column is a custom column or not.
std::vector< Long64_tfLastCheckedEntry
RLoopManagerfLoopManager
const std::string fName
 The name of the custom column.
const std::string fType
 The type of the custom column as a text string.
std::string fVariation
 This indicates for what variation this define evaluates values.
std::vector< std::string > fVariationDeps
 List of systematic variations that affect the value of this define.

Private Attributes

std::unique_ptr< RDefineBasefConcreteDefine = nullptr
const std::type_info * fTypeId = nullptr
 Type info obtained through TypeName2TypeID based on the column type name.
Inheritance diagram for ROOT::Detail::RDF::RJittedDefine:
ROOT::Detail::RDF::RDefineBase

Constructor & Destructor Documentation

◆ RJittedDefine()

ROOT::Detail::RDF::RJittedDefine::RJittedDefine ( std::string_view name,
std::string_view type,
RLoopManager & lm,
const RDFInternal::RColumnRegister & colRegister,
const ColumnNames_t & columns )
inline

Definition at line 44 of file RJittedDefine.hxx.

◆ ~RJittedDefine()

RJittedDefine::~RJittedDefine ( )

Definition at line 17 of file RJittedDefine.cxx.

Member Function Documentation

◆ FinalizeSlot()

void RJittedDefine::FinalizeSlot ( unsigned int slot)
finalvirtual

Clean-up operations to be performed at the end of a task.

Implements ROOT::Detail::RDF::RDefineBase.

Definition at line 54 of file RJittedDefine.cxx.

◆ GetName()

std::string RDefineBase::GetName ( ) const
inherited

Definition at line 42 of file RDefineBase.cxx.

◆ GetTypeId()

const std::type_info & RJittedDefine::GetTypeId ( ) const
finalvirtual

Implements ROOT::Detail::RDF::RDefineBase.

Definition at line 31 of file RJittedDefine.cxx.

◆ GetTypeName()

std::string RDefineBase::GetTypeName ( ) const
inherited

Definition at line 47 of file RDefineBase.cxx.

◆ GetValuePtr()

void * RJittedDefine::GetValuePtr ( unsigned int slot)
finalvirtual

Return the (type-erased) address of the Define'd value for the given processing slot.

Implements ROOT::Detail::RDF::RDefineBase.

Definition at line 25 of file RJittedDefine.cxx.

◆ GetVariations()

const std::vector< std::string > & ROOT::Detail::RDF::RDefineBase::GetVariations ( ) const
inlineinherited

Definition at line 72 of file RDefineBase.hxx.

◆ GetVariedDefine()

RDefineBase & RJittedDefine::GetVariedDefine ( const std::string & variationName)
finalvirtual

Return a clone of this Define that works with values in the variationName "universe".

Implements ROOT::Detail::RDF::RDefineBase.

Definition at line 66 of file RJittedDefine.cxx.

◆ InitSlot()

void RJittedDefine::InitSlot ( TTreeReader * r,
unsigned int slot )
finalvirtual

Implements ROOT::Detail::RDF::RDefineBase.

Definition at line 19 of file RJittedDefine.cxx.

◆ MakeVariations()

void RJittedDefine::MakeVariations ( const std::vector< std::string > & variations)
finalvirtual

Create clones of this Define that work with values in varied "universes".

Implements ROOT::Detail::RDF::RDefineBase.

Definition at line 60 of file RJittedDefine.cxx.

◆ SetDefine()

void ROOT::Detail::RDF::RJittedDefine::SetDefine ( std::unique_ptr< RDefineBase > c)
inline

Definition at line 56 of file RJittedDefine.hxx.

◆ Update() [1/2]

void RJittedDefine::Update ( unsigned int ,
const ROOT::RDF::RSampleInfo &  )
finalvirtual

Update function to be called once per sample, used if the derived type is a RDefinePerSample.

Reimplemented from ROOT::Detail::RDF::RDefineBase.

Definition at line 48 of file RJittedDefine.cxx.

◆ Update() [2/2]

void RJittedDefine::Update ( unsigned int slot,
Long64_t entry )
finalvirtual

Update the value at the address returned by GetValuePtr with the content corresponding to the given entry.

Implements ROOT::Detail::RDF::RDefineBase.

Definition at line 42 of file RJittedDefine.cxx.

Member Data Documentation

◆ fColRegister

RDFInternal::RColumnRegister ROOT::Detail::RDF::RDefineBase::fColRegister
protectedinherited

Definition at line 44 of file RDefineBase.hxx.

◆ fColumnNames

const ROOT::RDF::ColumnNames_t ROOT::Detail::RDF::RDefineBase::fColumnNames
protectedinherited

Definition at line 46 of file RDefineBase.hxx.

◆ fConcreteDefine

std::unique_ptr<RDefineBase> ROOT::Detail::RDF::RJittedDefine::fConcreteDefine = nullptr
private

Definition at line 37 of file RJittedDefine.hxx.

◆ fIsDefine

ROOT::RVecB ROOT::Detail::RDF::RDefineBase::fIsDefine
protectedinherited

The nth flag signals whether the nth input column is a custom column or not.

Definition at line 48 of file RDefineBase.hxx.

◆ fLastCheckedEntry

std::vector<Long64_t> ROOT::Detail::RDF::RDefineBase::fLastCheckedEntry
protectedinherited

Definition at line 43 of file RDefineBase.hxx.

◆ fLoopManager

RLoopManager* ROOT::Detail::RDF::RDefineBase::fLoopManager
protectedinherited

Definition at line 45 of file RDefineBase.hxx.

◆ fName

const std::string ROOT::Detail::RDF::RDefineBase::fName
protectedinherited

The name of the custom column.

Definition at line 41 of file RDefineBase.hxx.

◆ fType

const std::string ROOT::Detail::RDF::RDefineBase::fType
protectedinherited

The type of the custom column as a text string.

Definition at line 42 of file RDefineBase.hxx.

◆ fTypeId

const std::type_info* ROOT::Detail::RDF::RJittedDefine::fTypeId = nullptr
private

Type info obtained through TypeName2TypeID based on the column type name.

The expectation is that this always compares equal to fConcreteDefine->GetTypeId() (which however is only available after jitting). It can be null if TypeName2TypeID failed to figure out this type.

Definition at line 41 of file RJittedDefine.hxx.

◆ fVariation

std::string ROOT::Detail::RDF::RDefineBase::fVariation
protectedinherited

This indicates for what variation this define evaluates values.

Definition at line 50 of file RDefineBase.hxx.

◆ fVariationDeps

std::vector<std::string> ROOT::Detail::RDF::RDefineBase::fVariationDeps
protectedinherited

List of systematic variations that affect the value of this define.

Definition at line 49 of file RDefineBase.hxx.