Logo ROOT  
Reference Guide
ROOT::Detail::RDF::RDefine< F, ExtraArgsTag > Class Template Referencefinal

template<typename F, typename ExtraArgsTag = CustomColExtraArgs::None>
class ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >

Definition at line 45 of file RDefine.hxx.

Public Member Functions

 RDefine (const RDefine &)=delete
 
 RDefine (std::string_view name, std::string_view type, F expression, const ColumnNames_t &columns, unsigned int nSlots, const RDFInternal::RBookedDefines &defines, const std::map< std::string, std::vector< void * >> &DSValuePtrs, ROOT::RDF::RDataSource *ds)
 
void FinaliseSlot (unsigned int slot) 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 *r, unsigned int slot) final
 
RDefineoperator= (const RDefine &)=delete
 
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. 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)
 
virtual ~RDefineBase ()
 
unsigned int GetID () const
 Return the unique identifier of this RDefineBase. More...
 
std::string GetName () const
 
std::string GetTypeName () const
 
RDefineBaseoperator= (const RDefineBase &)=delete
 
RDefineBaseoperator= (RDefineBase &&)=delete
 

Private Types

using ColumnTypes_t = RDFInternal::RemoveFirstTwoParametersIf_t< std::is_same< ExtraArgsTag, SlotAndEntryTag >::value, ColumnTypesTmp_t >
 
using ColumnTypesTmp_t = RDFInternal::RemoveFirstParameterIf_t< std::is_same< ExtraArgsTag, SlotTag >::value, FunParamTypes_t >
 
using FunParamTypes_t = typename CallableTraits< F >::arg_types
 
using NoneTag = CustomColExtraArgs::None
 
using ret_type = typename CallableTraits< F >::ret_type
 
using SlotAndEntryTag = CustomColExtraArgs::SlotAndEntry
 
using SlotTag = CustomColExtraArgs::Slot
 
using TypeInd_t = std::make_index_sequence< ColumnTypes_t::list_size >
 
using ValuesPerSlot_t = typename std::conditional< std::is_same< ret_type, bool >::value, std::deque< ret_type >, std::vector< ret_type > >::type
 

Private Member Functions

template<typename... ColTypes, std::size_t... S>
void UpdateHelper (unsigned int slot, Long64_t entry, TypeList< ColTypes... >, std::index_sequence< S... >, NoneTag)
 
template<typename... ColTypes, std::size_t... S>
void UpdateHelper (unsigned int slot, Long64_t entry, TypeList< ColTypes... >, std::index_sequence< S... >, SlotAndEntryTag)
 
template<typename... ColTypes, std::size_t... S>
void UpdateHelper (unsigned int slot, Long64_t entry, TypeList< ColTypes... >, std::index_sequence< S... >, SlotTag)
 

Private Attributes

const ColumnNames_t fColumnNames
 
F fExpression
 
std::array< bool, ColumnTypes_t::list_size > fIsDefine
 The nth flag signals whether the nth input column is a custom column or not. More...
 
ValuesPerSlot_t fLastResults
 
std::vector< std::array< std::unique_ptr< RColumnReaderBase >, ColumnTypes_t::list_size > > fValues
 Column readers per slot and per input column. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from ROOT::Detail::RDF::RDefineBase
static unsigned int GetNextID ()
 
- Protected Attributes inherited from ROOT::Detail::RDF::RDefineBase
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
 
const unsigned int fID = GetNextID()
 A unique ID that identifies this custom column. More...
 
std::deque< boolfIsInitialized
 
std::vector< Long64_tfLastCheckedEntry
 
const std::string fName
 The name of the custom column. More...
 
unsigned int fNChildren {0}
 number of nodes of the functional graph hanging from this object More...
 
const unsigned int fNSlots
 number of thread slots used by this node, inherited from parent node. More...
 
unsigned int fNStopsReceived {0}
 number of times that a children node signaled to stop processing entries. More...
 
const std::string fType
 The type of the custom column as a text string. More...
 

#include <ROOT/RDF/RDefine.hxx>

Inheritance diagram for ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >:
[legend]

Member Typedef Documentation

◆ ColumnTypes_t

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::ColumnTypes_t = RDFInternal::RemoveFirstTwoParametersIf_t<std::is_same<ExtraArgsTag, SlotAndEntryTag>::value, ColumnTypesTmp_t>
private

Definition at line 54 of file RDefine.hxx.

◆ ColumnTypesTmp_t

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::ColumnTypesTmp_t = RDFInternal::RemoveFirstParameterIf_t<std::is_same<ExtraArgsTag, SlotTag>::value, FunParamTypes_t>
private

Definition at line 52 of file RDefine.hxx.

◆ FunParamTypes_t

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::FunParamTypes_t = typename CallableTraits<F>::arg_types
private

Definition at line 51 of file RDefine.hxx.

◆ NoneTag

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::NoneTag = CustomColExtraArgs::None
private

Definition at line 47 of file RDefine.hxx.

◆ ret_type

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::ret_type = typename CallableTraits<F>::ret_type
private

Definition at line 57 of file RDefine.hxx.

◆ SlotAndEntryTag

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::SlotAndEntryTag = CustomColExtraArgs::SlotAndEntry
private

Definition at line 49 of file RDefine.hxx.

◆ SlotTag

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::SlotTag = CustomColExtraArgs::Slot
private

Definition at line 48 of file RDefine.hxx.

◆ TypeInd_t

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::TypeInd_t = std::make_index_sequence<ColumnTypes_t::list_size>
private

Definition at line 56 of file RDefine.hxx.

◆ ValuesPerSlot_t

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
using ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::ValuesPerSlot_t = typename std::conditional<std::is_same<ret_type, bool>::value, std::deque<ret_type>, std::vector<ret_type> >::type
private

Definition at line 59 of file RDefine.hxx.

Constructor & Destructor Documentation

◆ RDefine() [1/2]

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::RDefine ( std::string_view  name,
std::string_view  type,
F  expression,
const ColumnNames_t columns,
unsigned int  nSlots,
const RDFInternal::RBookedDefines defines,
const std::map< std::string, std::vector< void * >> &  DSValuePtrs,
ROOT::RDF::RDataSource ds 
)
inline

Definition at line 101 of file RDefine.hxx.

◆ RDefine() [2/2]

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::RDefine ( const RDefine< F, ExtraArgsTag > &  )
delete

Member Function Documentation

◆ FinaliseSlot()

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
void ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::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 141 of file RDefine.hxx.

◆ GetTypeId()

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
const std::type_info& ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::GetTypeId ( ) const
inlinevirtual

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

Definition at line 138 of file RDefine.hxx.

◆ GetValuePtr()

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
void* ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::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 126 of file RDefine.hxx.

◆ InitSlot()

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
void ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::InitSlot ( TTreeReader r,
unsigned int  slot 
)
inlinefinalvirtual

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

Definition at line 115 of file RDefine.hxx.

◆ operator=()

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
RDefine& ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::operator= ( const RDefine< F, ExtraArgsTag > &  )
delete

◆ Update()

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
void ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::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 129 of file RDefine.hxx.

◆ UpdateHelper() [1/3]

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
template<typename... ColTypes, std::size_t... S>
void ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::UpdateHelper ( unsigned int  slot,
Long64_t  entry,
TypeList< ColTypes... >  ,
std::index_sequence< S... >  ,
NoneTag   
)
inlineprivate

Definition at line 73 of file RDefine.hxx.

◆ UpdateHelper() [2/3]

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
template<typename... ColTypes, std::size_t... S>
void ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::UpdateHelper ( unsigned int  slot,
Long64_t  entry,
TypeList< ColTypes... >  ,
std::index_sequence< S... >  ,
SlotAndEntryTag   
)
inlineprivate

Definition at line 92 of file RDefine.hxx.

◆ UpdateHelper() [3/3]

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
template<typename... ColTypes, std::size_t... S>
void ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::UpdateHelper ( unsigned int  slot,
Long64_t  entry,
TypeList< ColTypes... >  ,
std::index_sequence< S... >  ,
SlotTag   
)
inlineprivate

Definition at line 82 of file RDefine.hxx.

Member Data Documentation

◆ fColumnNames

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
const ColumnNames_t ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::fColumnNames
private

Definition at line 63 of file RDefine.hxx.

◆ fExpression

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
F ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::fExpression
private

Definition at line 62 of file RDefine.hxx.

◆ fIsDefine

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
std::array<bool, ColumnTypes_t::list_size> ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::fIsDefine
private

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

Definition at line 70 of file RDefine.hxx.

◆ fLastResults

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
ValuesPerSlot_t ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::fLastResults
private

Definition at line 64 of file RDefine.hxx.

◆ fValues

template<typename F , typename ExtraArgsTag = CustomColExtraArgs::None>
std::vector<std::array<std::unique_ptr<RColumnReaderBase>, ColumnTypes_t::list_size> > ROOT::Detail::RDF::RDefine< F, ExtraArgsTag >::fValues
private

Column readers per slot and per input column.

Definition at line 67 of file RDefine.hxx.


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