Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RNTupleView< T, UserProvidedAddress > Class Template Reference

template<typename T, bool UserProvidedAddress>
class ROOT::Experimental::RNTupleView< T, UserProvidedAddress >

An RNTupleView provides read-only access to a single field of the ntuple.

Template Parameters
TThe type of the object that will be read by the view
UserProvidedAddressWhether the user provided an external memory location to read data into

The view owns a field and its underlying columns in order to fill an ntuple value object with data. Data can be accessed by index. For top-level fields, the index refers to the entry number. Fields that are part of nested collections have global index numbers that are derived from their parent indexes.

Fields of simple types with a Map() method will use that and thus expose zero-copy access.

Definition at line 144 of file RNTupleView.hxx.

Public Member Functions

 RNTupleView (const RNTupleView &other)=delete
 
 RNTupleView (RNTupleView &&other)=default
 
 ~RNTupleView ()=default
 
void Bind (std::shared_ptr< T > objPtr)
 
void BindRawPtr (T *rawPtr)
 
void EmplaceNew ()
 
const FieldTGetField () const
 
RNTupleGlobalRange GetFieldRange () const
 
template<typename C = T, std::enable_if_t< Internal::isMappable< FieldT >, C * > = nullptr>
const C * MapV (NTupleSize_t globalIndex, NTupleSize_t &nItems)
 
template<typename C = T, std::enable_if_t< Internal::isMappable< FieldT >, C * > = nullptr>
const C * MapV (RClusterIndex clusterIndex, NTupleSize_t &nItems)
 
const T & operator() (NTupleSize_t globalIndex)
 
const T & operator() (RClusterIndex clusterIndex)
 
RNTupleViewoperator= (const RNTupleView &other)=delete
 
RNTupleViewoperator= (RNTupleView &&other)=default
 

Private Types

using FieldT = RField< T >
 

Private Member Functions

 RNTupleView (DescriptorId_t fieldId, Internal::RPageSource *pageSource)
 
 RNTupleView (DescriptorId_t fieldId, Internal::RPageSource *pageSource, std::shared_ptr< T > objPtr)
 
 RNTupleView (DescriptorId_t fieldId, Internal::RPageSource *pageSource, T *rawPtr)
 
void SetupField (DescriptorId_t fieldId, Internal::RPageSource *pageSource)
 

Private Attributes

FieldT fField
 fFieldId has fParent always set to null; views access nested fields without looking at the parent
 
RFieldBase::RValue fValue
 Used as a Read() destination for fields that are not mappable.
 

Friends

class RNTupleCollectionView
 
class RNTupleReader
 

#include <ROOT/RNTupleView.hxx>

Member Typedef Documentation

◆ FieldT

template<typename T , bool UserProvidedAddress>
using ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::FieldT = RField<T>
private

Definition at line 148 of file RNTupleView.hxx.

Constructor & Destructor Documentation

◆ RNTupleView() [1/5]

template<typename T , bool UserProvidedAddress>
ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::RNTupleView ( DescriptorId_t  fieldId,
Internal::RPageSource pageSource 
)
inlineprivate

Definition at line 166 of file RNTupleView.hxx.

◆ RNTupleView() [2/5]

template<typename T , bool UserProvidedAddress>
ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::RNTupleView ( DescriptorId_t  fieldId,
Internal::RPageSource pageSource,
std::shared_ptr< T >  objPtr 
)
inlineprivate

Definition at line 173 of file RNTupleView.hxx.

◆ RNTupleView() [3/5]

template<typename T , bool UserProvidedAddress>
ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::RNTupleView ( DescriptorId_t  fieldId,
Internal::RPageSource pageSource,
T *  rawPtr 
)
inlineprivate

Definition at line 180 of file RNTupleView.hxx.

◆ RNTupleView() [4/5]

template<typename T , bool UserProvidedAddress>
ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::RNTupleView ( const RNTupleView< T, UserProvidedAddress > &  other)
delete

◆ RNTupleView() [5/5]

template<typename T , bool UserProvidedAddress>
ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::RNTupleView ( RNTupleView< T, UserProvidedAddress > &&  other)
default

◆ ~RNTupleView()

template<typename T , bool UserProvidedAddress>
ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::~RNTupleView ( )
default

Member Function Documentation

◆ Bind()

template<typename T , bool UserProvidedAddress>
void ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::Bind ( std::shared_ptr< T >  objPtr)
inline

Definition at line 231 of file RNTupleView.hxx.

◆ BindRawPtr()

template<typename T , bool UserProvidedAddress>
void ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::BindRawPtr ( T *  rawPtr)
inline

Definition at line 240 of file RNTupleView.hxx.

◆ EmplaceNew()

template<typename T , bool UserProvidedAddress>
void ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::EmplaceNew ( )
inline

Definition at line 249 of file RNTupleView.hxx.

◆ GetField()

template<typename T , bool UserProvidedAddress>
const FieldT & ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::GetField ( ) const
inline

Definition at line 194 of file RNTupleView.hxx.

◆ GetFieldRange()

template<typename T , bool UserProvidedAddress>
RNTupleGlobalRange ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::GetFieldRange ( ) const
inline

Definition at line 195 of file RNTupleView.hxx.

◆ MapV() [1/2]

template<typename T , bool UserProvidedAddress>
template<typename C = T, std::enable_if_t< Internal::isMappable< FieldT >, C * > = nullptr>
const C * ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::MapV ( NTupleSize_t  globalIndex,
NTupleSize_t nItems 
)
inline

Definition at line 219 of file RNTupleView.hxx.

◆ MapV() [2/2]

template<typename T , bool UserProvidedAddress>
template<typename C = T, std::enable_if_t< Internal::isMappable< FieldT >, C * > = nullptr>
const C * ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::MapV ( RClusterIndex  clusterIndex,
NTupleSize_t nItems 
)
inline

Definition at line 226 of file RNTupleView.hxx.

◆ operator()() [1/2]

template<typename T , bool UserProvidedAddress>
const T & ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::operator() ( NTupleSize_t  globalIndex)
inline

Definition at line 197 of file RNTupleView.hxx.

◆ operator()() [2/2]

template<typename T , bool UserProvidedAddress>
const T & ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::operator() ( RClusterIndex  clusterIndex)
inline

Definition at line 207 of file RNTupleView.hxx.

◆ operator=() [1/2]

template<typename T , bool UserProvidedAddress>
RNTupleView & ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::operator= ( const RNTupleView< T, UserProvidedAddress > &  other)
delete

◆ operator=() [2/2]

template<typename T , bool UserProvidedAddress>
RNTupleView & ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::operator= ( RNTupleView< T, UserProvidedAddress > &&  other)
default

◆ SetupField()

template<typename T , bool UserProvidedAddress>
void ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::SetupField ( DescriptorId_t  fieldId,
Internal::RPageSource pageSource 
)
inlineprivate

Definition at line 156 of file RNTupleView.hxx.

Friends And Related Symbol Documentation

◆ RNTupleCollectionView

template<typename T , bool UserProvidedAddress>
friend class RNTupleCollectionView
friend

Definition at line 146 of file RNTupleView.hxx.

◆ RNTupleReader

template<typename T , bool UserProvidedAddress>
friend class RNTupleReader
friend

Definition at line 145 of file RNTupleView.hxx.

Member Data Documentation

◆ fField

template<typename T , bool UserProvidedAddress>
FieldT ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::fField
private

fFieldId has fParent always set to null; views access nested fields without looking at the parent

Definition at line 152 of file RNTupleView.hxx.

◆ fValue

template<typename T , bool UserProvidedAddress>
RFieldBase::RValue ROOT::Experimental::RNTupleView< T, UserProvidedAddress >::fValue
private

Used as a Read() destination for fields that are not mappable.

Definition at line 154 of file RNTupleView.hxx.

  • tree/ntuple/v7/inc/ROOT/RNTupleView.hxx