Logo ROOT  
Reference Guide
ROOT::Detail::RDF::RDefinePerSample< F > Class Template Referencefinal

template<typename F>
class ROOT::Detail::RDF::RDefinePerSample< F >

Definition at line 29 of file RDefinePerSample.hxx.

Public Member Functions

 RDefinePerSample (const RDefinePerSample &)=delete
 
 RDefinePerSample (std::string_view name, std::string_view type, F expression, unsigned int nSlots)
 
void FinaliseSlot (unsigned int) final
 Clean-up operations to be performed at the end of a task. More...
 
const std::type_info & GetTypeId () const
 
voidGetValuePtr (unsigned int slot) final
 Return the (type-erased) address of the Define'd value for the given processing slot. More...
 
void InitSlot (TTreeReader *, unsigned int) final
 
RDefinePerSampleoperator= (const RDefinePerSample &)=delete
 
void Update (unsigned int slot, const ROOT::RDF::RSampleInfo &id) final
 Update the value at the address returned by GetValuePtr with the content corresponding to the given entry. More...
 
void Update (unsigned int, Long64_t) final
 Update the value at the address returned by GetValuePtr with the content corresponding to the given entry. More...
 
- Public Member Functions inherited from ROOT::Detail::RDF::RDefineBase
 RDefineBase (std::string_view name, std::string_view type, unsigned int nSlots, const RDFInternal::RBookedDefines &defines, const std::map< std::string, std::vector< void * > > &DSValuePtrs, ROOT::RDF::RDataSource *ds, const ColumnNames_t &columnNames)
 
virtual ~RDefineBase ()
 
virtual void FinaliseSlot (unsigned int slot)=0
 Clean-up operations to be performed at the end of a task. More...
 
std::string GetName () const
 
virtual const std::type_info & GetTypeId () const =0
 
std::string GetTypeName () const
 
virtual voidGetValuePtr (unsigned int slot)=0
 Return the (type-erased) address of the Define'd value for the given processing slot. More...
 
virtual void InitSlot (TTreeReader *r, unsigned int slot)=0
 
RDefineBaseoperator= (const RDefineBase &)=delete
 
RDefineBaseoperator= (RDefineBase &&)=delete
 
virtual void Update (unsigned int slot, Long64_t entry)=0
 Update the value at the address returned by GetValuePtr with the content corresponding to the given entry. More...
 
virtual void Update (unsigned int, const ROOT::RDF::RSampleInfo &)
 Update function to be called once per sample, used if the derived type is a RDefinePerSample. More...
 

Private Types

using RetType_t = typename CallableTraits< F >::ret_type
 
using ValuesPerSlot_t = std::conditional_t< std::is_same< RetType_t, bool >::value, std::deque< RetType_t >, std::vector< RetType_t > >
 

Private Attributes

F fExpression
 
ValuesPerSlot_t fLastResults
 

Additional Inherited Members

- Protected Attributes inherited from ROOT::Detail::RDF::RDefineBase
const ROOT::RDF::ColumnNames_t fColumnNames
 
ROOT::RDF::RDataSourcefDataSource
 non-owning ptr to the RDataSource, if any. Used to retrieve column readers. More...
 
RDFInternal::RBookedDefines fDefines
 
const std::map< std::string, std::vector< void * > > & fDSValuePtrs
 
ROOT::RVecB fIsDefine
 The nth flag signals whether the nth input column is a custom column or not. More...
 
std::deque< bool > fIsInitialized
 
std::vector< Long64_tfLastCheckedEntry
 
const std::string fName
 The name of the custom column. More...
 
const std::string fType
 The type of the custom column as a text string. More...
 

#include <ROOT/RDF/RDefinePerSample.hxx>

Inheritance diagram for ROOT::Detail::RDF::RDefinePerSample< F >:
[legend]

Member Typedef Documentation

◆ RetType_t

template<typename F >
using ROOT::Detail::RDF::RDefinePerSample< F >::RetType_t = typename CallableTraits<F>::ret_type
private

Definition at line 30 of file RDefinePerSample.hxx.

◆ ValuesPerSlot_t

template<typename F >
using ROOT::Detail::RDF::RDefinePerSample< F >::ValuesPerSlot_t = std::conditional_t<std::is_same<RetType_t, bool>::value, std::deque<RetType_t>, std::vector<RetType_t> >
private

Definition at line 33 of file RDefinePerSample.hxx.

Constructor & Destructor Documentation

◆ RDefinePerSample() [1/2]

template<typename F >
ROOT::Detail::RDF::RDefinePerSample< F >::RDefinePerSample ( std::string_view  name,
std::string_view  type,
F  expression,
unsigned int  nSlots 
)
inline

Definition at line 40 of file RDefinePerSample.hxx.

◆ RDefinePerSample() [2/2]

template<typename F >
ROOT::Detail::RDF::RDefinePerSample< F >::RDefinePerSample ( const RDefinePerSample< F > &  )
delete

Member Function Documentation

◆ FinaliseSlot()

template<typename F >
void ROOT::Detail::RDF::RDefinePerSample< F >::FinaliseSlot ( unsigned int  slot)
inlinefinalvirtual

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

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

Definition at line 69 of file RDefinePerSample.hxx.

◆ GetTypeId()

template<typename F >
const std::type_info & ROOT::Detail::RDF::RDefinePerSample< F >::GetTypeId ( ) const
inlinevirtual

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

Definition at line 66 of file RDefinePerSample.hxx.

◆ GetValuePtr()

template<typename F >
void * ROOT::Detail::RDF::RDefinePerSample< F >::GetValuePtr ( unsigned int  slot)
inlinefinalvirtual

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

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

Definition at line 50 of file RDefinePerSample.hxx.

◆ InitSlot()

template<typename F >
void ROOT::Detail::RDF::RDefinePerSample< F >::InitSlot ( TTreeReader ,
unsigned int   
)
inlinefinalvirtual

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

Definition at line 68 of file RDefinePerSample.hxx.

◆ operator=()

template<typename F >
RDefinePerSample & ROOT::Detail::RDF::RDefinePerSample< F >::operator= ( const RDefinePerSample< F > &  )
delete

◆ Update() [1/2]

template<typename F >
void ROOT::Detail::RDF::RDefinePerSample< F >::Update ( unsigned int  slot,
const ROOT::RDF::RSampleInfo id 
)
inlinefinalvirtual

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

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

Definition at line 61 of file RDefinePerSample.hxx.

◆ Update() [2/2]

template<typename F >
void ROOT::Detail::RDF::RDefinePerSample< F >::Update ( unsigned int  slot,
Long64_t  entry 
)
inlinefinalvirtual

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 55 of file RDefinePerSample.hxx.

Member Data Documentation

◆ fExpression

template<typename F >
F ROOT::Detail::RDF::RDefinePerSample< F >::fExpression
private

Definition at line 36 of file RDefinePerSample.hxx.

◆ fLastResults

template<typename F >
ValuesPerSlot_t ROOT::Detail::RDF::RDefinePerSample< F >::fLastResults
private

Definition at line 37 of file RDefinePerSample.hxx.


The documentation for this class was generated from the following file: