Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::REntry Class Reference

The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.

The entry provides a memory-managed binder for a set of values. Through shared pointers, the memory locations that are associated to values are managed.

Definition at line 50 of file REntry.hxx.

Classes

class  RFieldToken
 The field token identifies a (sub)field in this entry. More...
 

Public Types

using ConstIterator_t = decltype(fValues)::const_iterator
 

Public Member Functions

 REntry (const REntry &other)=delete
 
 REntry (REntry &&other)=default
 
 ~REntry ()=default
 
ConstIterator_t begin () const
 
template<typename T >
void BindRawPtr (RFieldToken token, T *rawPtr)
 
template<typename T >
void BindRawPtr (std::string_view fieldName, T *rawPtr)
 
template<typename T >
void BindValue (RFieldToken token, std::shared_ptr< T > objPtr)
 
template<typename T >
void BindValue (std::string_view fieldName, std::shared_ptr< T > objPtr)
 
void EmplaceNewValue (RFieldToken token)
 
void EmplaceNewValue (std::string_view fieldName)
 
ConstIterator_t end () const
 
std::uint64_t GetModelId () const
 
template<typename T >
std::shared_ptr< T > GetPtr (RFieldToken token) const
 
template<typename T >
std::shared_ptr< T > GetPtr (std::string_view fieldName) const
 
std::uint64_t GetSchemaId () const
 
RFieldToken GetToken (std::string_view fieldName) const
 The ordinal of the (sub)field fieldName; can be used in other methods to address the corresponding value.
 
const std::string & GetTypeName (RFieldToken token) const
 
const std::string & GetTypeName (std::string_view fieldName) const
 
REntryoperator= (const REntry &other)=delete
 
REntryoperator= (REntry &&other)=default
 

Private Member Functions

 REntry ()=default
 
 REntry (std::uint64_t modelId, std::uint64_t schemaId)
 
template<typename T >
std::shared_ptr< T > AddValue (RField< T > &field)
 While building the entry, adds a new value to the list and return the value's shared pointer.
 
void AddValue (RFieldBase::RValue &&value)
 
std::size_t Append ()
 
void EnsureMatchingModel (RFieldToken token) const
 
template<typename T >
void EnsureMatchingType (RFieldToken token) const
 
const std::string & FindFieldName (RFieldToken token) const
 This function has linear complexity, only use for more helpful error messages!
 
RFieldBase::RValueGetValue (RFieldToken token)
 Return the RValue currently bound to the provided field.
 
RFieldBase::RValueGetValue (std::string_view fieldName)
 
void Read (NTupleSize_t index)
 
void UpdateValue (RFieldToken token, RFieldBase::RValue &&value)
 Update the RValue for a field in the entry.
 
void UpdateValue (RFieldToken token, RFieldBase::RValue &value)
 

Private Attributes

std::unordered_map< std::string, std::size_t > fFieldName2Token
 For fast lookup of token IDs given a (sub)field name present in the entry.
 
std::vector< std::string > fFieldTypes
 To ensure that the entry is standalone, a copy of all field types.
 
std::uint64_t fModelId = 0
 The entry must be linked to a specific model, identified by a model ID.
 
std::uint64_t fSchemaId = 0
 The entry and its tokens are also linked to a specific schema, identified by a schema ID.
 
std::vector< RFieldBase::RValuefValues
 Corresponds to the fields of the linked model.
 

Friends

class RNTupleChainProcessor
 
class RNTupleFillContext
 
class RNTupleJoinProcessor
 
class RNTupleModel
 
class RNTupleProcessor
 
class RNTupleReader
 

#include <ROOT/REntry.hxx>

Member Typedef Documentation

◆ ConstIterator_t

using ROOT::Experimental::REntry::ConstIterator_t = decltype(fValues)::const_iterator

Definition at line 166 of file REntry.hxx.

Constructor & Destructor Documentation

◆ REntry() [1/4]

ROOT::Experimental::REntry::REntry ( )
privatedefault

◆ REntry() [2/4]

ROOT::Experimental::REntry::REntry ( std::uint64_t  modelId,
std::uint64_t  schemaId 
)
inlineexplicitprivate

Definition at line 88 of file REntry.hxx.

◆ REntry() [3/4]

ROOT::Experimental::REntry::REntry ( const REntry other)
delete

◆ REntry() [4/4]

ROOT::Experimental::REntry::REntry ( REntry &&  other)
default

◆ ~REntry()

ROOT::Experimental::REntry::~REntry ( )
default

Member Function Documentation

◆ AddValue() [1/2]

template<typename T >
std::shared_ptr< T > ROOT::Experimental::REntry::AddValue ( RField< T > &  field)
inlineprivate

While building the entry, adds a new value to the list and return the value's shared pointer.

Definition at line 99 of file REntry.hxx.

◆ AddValue() [2/2]

void ROOT::Experimental::REntry::AddValue ( RFieldBase::RValue &&  value)
inlineprivate

Definition at line 90 of file REntry.hxx.

◆ Append()

std::size_t ROOT::Experimental::REntry::Append ( )
inlineprivate

Definition at line 124 of file REntry.hxx.

◆ begin()

ConstIterator_t ROOT::Experimental::REntry::begin ( ) const
inline

Definition at line 245 of file REntry.hxx.

◆ BindRawPtr() [1/2]

template<typename T >
void ROOT::Experimental::REntry::BindRawPtr ( RFieldToken  token,
T *  rawPtr 
)
inline

Definition at line 207 of file REntry.hxx.

◆ BindRawPtr() [2/2]

template<typename T >
void ROOT::Experimental::REntry::BindRawPtr ( std::string_view  fieldName,
T *  rawPtr 
)
inline

Definition at line 215 of file REntry.hxx.

◆ BindValue() [1/2]

template<typename T >
void ROOT::Experimental::REntry::BindValue ( RFieldToken  token,
std::shared_ptr< T >  objPtr 
)
inline

Definition at line 193 of file REntry.hxx.

◆ BindValue() [2/2]

template<typename T >
void ROOT::Experimental::REntry::BindValue ( std::string_view  fieldName,
std::shared_ptr< T >  objPtr 
)
inline

Definition at line 201 of file REntry.hxx.

◆ EmplaceNewValue() [1/2]

void ROOT::Experimental::REntry::EmplaceNewValue ( RFieldToken  token)
inline

Definition at line 184 of file REntry.hxx.

◆ EmplaceNewValue() [2/2]

void ROOT::Experimental::REntry::EmplaceNewValue ( std::string_view  fieldName)
inline

Definition at line 190 of file REntry.hxx.

◆ end()

ConstIterator_t ROOT::Experimental::REntry::end ( ) const
inline

Definition at line 246 of file REntry.hxx.

◆ EnsureMatchingModel()

void ROOT::Experimental::REntry::EnsureMatchingModel ( RFieldToken  token) const
inlineprivate

Definition at line 133 of file REntry.hxx.

◆ EnsureMatchingType()

template<typename T >
void ROOT::Experimental::REntry::EnsureMatchingType ( RFieldToken  token) const
inlineprivate

Definition at line 155 of file REntry.hxx.

◆ FindFieldName()

const std::string & ROOT::Experimental::REntry::FindFieldName ( RFieldToken  token) const
inlineprivate

This function has linear complexity, only use for more helpful error messages!

Definition at line 142 of file REntry.hxx.

◆ GetModelId()

std::uint64_t ROOT::Experimental::REntry::GetModelId ( ) const
inline

Definition at line 242 of file REntry.hxx.

◆ GetPtr() [1/2]

template<typename T >
std::shared_ptr< T > ROOT::Experimental::REntry::GetPtr ( RFieldToken  token) const
inline

Definition at line 221 of file REntry.hxx.

◆ GetPtr() [2/2]

template<typename T >
std::shared_ptr< T > ROOT::Experimental::REntry::GetPtr ( std::string_view  fieldName) const
inline

Definition at line 229 of file REntry.hxx.

◆ GetSchemaId()

std::uint64_t ROOT::Experimental::REntry::GetSchemaId ( ) const
inline

Definition at line 243 of file REntry.hxx.

◆ GetToken()

RFieldToken ROOT::Experimental::REntry::GetToken ( std::string_view  fieldName) const
inline

The ordinal of the (sub)field fieldName; can be used in other methods to address the corresponding value.

Definition at line 175 of file REntry.hxx.

◆ GetTypeName() [1/2]

const std::string & ROOT::Experimental::REntry::GetTypeName ( RFieldToken  token) const
inline

Definition at line 234 of file REntry.hxx.

◆ GetTypeName() [2/2]

const std::string & ROOT::Experimental::REntry::GetTypeName ( std::string_view  fieldName) const
inline

Definition at line 240 of file REntry.hxx.

◆ GetValue() [1/2]

RFieldBase::RValue & ROOT::Experimental::REntry::GetValue ( RFieldToken  token)
inlineprivate

Return the RValue currently bound to the provided field.

Definition at line 114 of file REntry.hxx.

◆ GetValue() [2/2]

RFieldBase::RValue & ROOT::Experimental::REntry::GetValue ( std::string_view  fieldName)
inlineprivate

Definition at line 115 of file REntry.hxx.

◆ operator=() [1/2]

REntry & ROOT::Experimental::REntry::operator= ( const REntry other)
delete

◆ operator=() [2/2]

REntry & ROOT::Experimental::REntry::operator= ( REntry &&  other)
default

◆ Read()

void ROOT::Experimental::REntry::Read ( NTupleSize_t  index)
inlineprivate

Definition at line 117 of file REntry.hxx.

◆ UpdateValue() [1/2]

void ROOT::Experimental::REntry::UpdateValue ( RFieldToken  token,
RFieldBase::RValue &&  value 
)
inlineprivate

Update the RValue for a field in the entry.

To be used when its underlying RFieldBase changes, which typically happens when page source the field values are read from changes.

Definition at line 110 of file REntry.hxx.

◆ UpdateValue() [2/2]

void ROOT::Experimental::REntry::UpdateValue ( RFieldToken  token,
RFieldBase::RValue value 
)
inlineprivate

Definition at line 111 of file REntry.hxx.

Friends And Related Symbol Documentation

◆ RNTupleChainProcessor

friend class RNTupleChainProcessor
friend

Definition at line 55 of file REntry.hxx.

◆ RNTupleFillContext

friend class RNTupleFillContext
friend

Definition at line 53 of file REntry.hxx.

◆ RNTupleJoinProcessor

friend class RNTupleJoinProcessor
friend

Definition at line 56 of file REntry.hxx.

◆ RNTupleModel

friend class RNTupleModel
friend

Definition at line 51 of file REntry.hxx.

◆ RNTupleProcessor

friend class RNTupleProcessor
friend

Definition at line 54 of file REntry.hxx.

◆ RNTupleReader

friend class RNTupleReader
friend

Definition at line 52 of file REntry.hxx.

Member Data Documentation

◆ fFieldName2Token

std::unordered_map<std::string, std::size_t> ROOT::Experimental::REntry::fFieldName2Token
private

For fast lookup of token IDs given a (sub)field name present in the entry.

Definition at line 81 of file REntry.hxx.

◆ fFieldTypes

std::vector<std::string> ROOT::Experimental::REntry::fFieldTypes
private

To ensure that the entry is standalone, a copy of all field types.

Definition at line 83 of file REntry.hxx.

◆ fModelId

std::uint64_t ROOT::Experimental::REntry::fModelId = 0
private

The entry must be linked to a specific model, identified by a model ID.

Definition at line 75 of file REntry.hxx.

◆ fSchemaId

std::uint64_t ROOT::Experimental::REntry::fSchemaId = 0
private

The entry and its tokens are also linked to a specific schema, identified by a schema ID.

Definition at line 77 of file REntry.hxx.

◆ fValues

std::vector<RFieldBase::RValue> ROOT::Experimental::REntry::fValues
private

Corresponds to the fields of the linked model.

Definition at line 79 of file REntry.hxx.

Libraries for ROOT::Experimental::REntry:

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