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

template<typename T>
class ROOT::Experimental::RNTupleView< T >

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

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 152 of file RNTupleView.hxx.

Public Member Functions

 RNTupleView (const RNTupleView &other)=delete
 
 RNTupleView (DescriptorId_t fieldId, Detail::RPageSource *pageSource)
 
 RNTupleView (RNTupleView &&other)=default
 
 ~RNTupleView ()
 
RNTupleGlobalRange GetFieldRange () const
 
template<typename C = T>
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C * > MapV (const RClusterIndex &clusterIndex, NTupleSize_t &nItems)
 
template<typename C = T>
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C * > MapV (NTupleSize_t globalIndex, NTupleSize_t &nItems)
 
template<typename C = T>
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C & > operator() (const RClusterIndex &clusterIndex)
 
template<typename C = T>
std::enable_if_t<!Internal::IsMappable< FieldT >::value, const C & > operator() (const RClusterIndex &clusterIndex)
 
template<typename C = T>
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C & > operator() (NTupleSize_t globalIndex)
 
template<typename C = T>
std::enable_if_t<!Internal::IsMappable< FieldT >::value, const C & > operator() (NTupleSize_t globalIndex)
 
RNTupleViewoperator= (const RNTupleView &other)=delete
 
RNTupleViewoperator= (RNTupleView &&other)=default
 

Private Types

using FieldT = RField< T >
 

Private Attributes

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

Friends

class RNTupleViewCollection
 

#include <ROOT/RNTupleView.hxx>

Member Typedef Documentation

◆ FieldT

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

Definition at line 155 of file RNTupleView.hxx.

Constructor & Destructor Documentation

◆ RNTupleView() [1/3]

template<typename T >
ROOT::Experimental::RNTupleView< T >::RNTupleView ( DescriptorId_t  fieldId,
Detail::RPageSource pageSource 
)
inline

Definition at line 164 of file RNTupleView.hxx.

◆ RNTupleView() [2/3]

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

◆ RNTupleView() [3/3]

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

◆ ~RNTupleView()

template<typename T >
ROOT::Experimental::RNTupleView< T >::~RNTupleView ( )
inline

Definition at line 184 of file RNTupleView.hxx.

Member Function Documentation

◆ GetFieldRange()

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

Definition at line 186 of file RNTupleView.hxx.

◆ MapV() [1/2]

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

Definition at line 218 of file RNTupleView.hxx.

◆ MapV() [2/2]

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

Definition at line 212 of file RNTupleView.hxx.

◆ operator()() [1/4]

template<typename T >
template<typename C = T>
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C & > ROOT::Experimental::RNTupleView< T >::operator() ( const RClusterIndex clusterIndex)
inline

Definition at line 201 of file RNTupleView.hxx.

◆ operator()() [2/4]

template<typename T >
template<typename C = T>
std::enable_if_t<!Internal::IsMappable< FieldT >::value, const C & > ROOT::Experimental::RNTupleView< T >::operator() ( const RClusterIndex clusterIndex)
inline

Definition at line 205 of file RNTupleView.hxx.

◆ operator()() [3/4]

template<typename T >
template<typename C = T>
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C & > ROOT::Experimental::RNTupleView< T >::operator() ( NTupleSize_t  globalIndex)
inline

Definition at line 190 of file RNTupleView.hxx.

◆ operator()() [4/4]

template<typename T >
template<typename C = T>
std::enable_if_t<!Internal::IsMappable< FieldT >::value, const C & > ROOT::Experimental::RNTupleView< T >::operator() ( NTupleSize_t  globalIndex)
inline

Definition at line 194 of file RNTupleView.hxx.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Friends And Related Symbol Documentation

◆ RNTupleViewCollection

template<typename T >
friend class RNTupleViewCollection
friend

Definition at line 153 of file RNTupleView.hxx.

Member Data Documentation

◆ fField

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

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

Definition at line 159 of file RNTupleView.hxx.

◆ fValue

template<typename T >
Detail::RFieldValue ROOT::Experimental::RNTupleView< T >::fValue
private

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

Definition at line 161 of file RNTupleView.hxx.

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