Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::RNTupleCollectionView Class Reference

A view for a collection, that can itself generate new ntuple views for its nested fields.

The collection view's call operator returns the size of the collection. The collection view can also return the element range and it can create subviews for fields inside the collection.

Definition at line 319 of file RNTupleView.hxx.

Public Member Functions

 RNTupleCollectionView (const RNTupleCollectionView &other)=delete
 
 RNTupleCollectionView (RNTupleCollectionView &&other)
 
 ~RNTupleCollectionView ()=default
 
ROOT::RNTupleLocalRange GetCollectionRange (RNTupleLocalIndex localIndex)
 
ROOT::RNTupleLocalRange GetCollectionRange (ROOT::NTupleSize_t globalIndex)
 
RNTupleCollectionView GetCollectionView (std::string_view fieldName)
 Provides access to a collection field, that can itself generate new RNTupleViews for its nested fields.
 
template<typename T >
RNTupleDirectAccessView< T > GetDirectAccessView (std::string_view fieldName)
 Provides direct access to the I/O buffers of a mappable (sub)field.
 
template<typename T >
RNTupleView< T > GetView (std::string_view fieldName)
 Provides access to an individual (sub)field.
 
std::uint64_t operator() (RNTupleLocalIndex localIndex)
 
std::uint64_t operator() (ROOT::NTupleSize_t globalIndex)
 
RNTupleCollectionViewoperator= (const RNTupleCollectionView &other)=delete
 
RNTupleCollectionViewoperator= (RNTupleCollectionView &&other)
 

Private Member Functions

 RNTupleCollectionView (ROOT::DescriptorId_t fieldId, const std::string &fieldName, ROOT::Internal::RPageSource *source)
 
std::uint64_t GetCardinalityValue () const
 
ROOT::DescriptorId_t GetFieldId (std::string_view fieldName)
 

Static Private Member Functions

static RNTupleCollectionView Create (ROOT::DescriptorId_t fieldId, ROOT::Internal::RPageSource *source)
 

Private Attributes

ROOT::RField< RNTupleCardinality< std::uint64_t > > fField
 
ROOT::Internal::RPageSourcefSource
 
ROOT::RFieldBase::RValue fValue
 

Friends

class ROOT::RNTupleReader
 

#include <ROOT/RNTupleView.hxx>

Constructor & Destructor Documentation

◆ RNTupleCollectionView() [1/3]

ROOT::RNTupleCollectionView::RNTupleCollectionView ( ROOT::DescriptorId_t fieldId,
const std::string & fieldName,
ROOT::Internal::RPageSource * source )
inlineprivate

Definition at line 327 of file RNTupleView.hxx.

◆ RNTupleCollectionView() [2/3]

ROOT::RNTupleCollectionView::RNTupleCollectionView ( const RNTupleCollectionView & other)
delete

◆ RNTupleCollectionView() [3/3]

ROOT::RNTupleCollectionView::RNTupleCollectionView ( RNTupleCollectionView && other)
inline

Definition at line 371 of file RNTupleView.hxx.

◆ ~RNTupleCollectionView()

ROOT::RNTupleCollectionView::~RNTupleCollectionView ( )
default

Member Function Documentation

◆ Create()

static RNTupleCollectionView ROOT::RNTupleCollectionView::Create ( ROOT::DescriptorId_t fieldId,
ROOT::Internal::RPageSource * source )
inlinestaticprivate

Definition at line 335 of file RNTupleView.hxx.

◆ GetCardinalityValue()

std::uint64_t ROOT::RNTupleCollectionView::GetCardinalityValue ( ) const
inlineprivate

Definition at line 361 of file RNTupleView.hxx.

◆ GetCollectionRange() [1/2]

ROOT::RNTupleLocalRange ROOT::RNTupleCollectionView::GetCollectionRange ( RNTupleLocalIndex localIndex)
inline

Definition at line 395 of file RNTupleView.hxx.

◆ GetCollectionRange() [2/2]

ROOT::RNTupleLocalRange ROOT::RNTupleCollectionView::GetCollectionRange ( ROOT::NTupleSize_t globalIndex)
inline

Definition at line 386 of file RNTupleView.hxx.

◆ GetCollectionView()

RNTupleCollectionView ROOT::RNTupleCollectionView::GetCollectionView ( std::string_view fieldName)
inline

Provides access to a collection field, that can itself generate new RNTupleViews for its nested fields.

Raises an exception if:

  • there is no field with the given name or,
  • the field is not a collection
See also
ROOT::RNTupleReader::GetCollectionView(std::string_view)

Definition at line 438 of file RNTupleView.hxx.

◆ GetDirectAccessView()

template<typename T >
RNTupleDirectAccessView< T > ROOT::RNTupleCollectionView::GetDirectAccessView ( std::string_view fieldName)
inline

Provides direct access to the I/O buffers of a mappable (sub)field.

Raises an exception if there is no field with the given name. Attempting to access the values of a direct-access view for non-mappable fields will yield compilation errors.

See also
ROOT::RNTupleReader::DirectAccessView(std::string_view)

Definition at line 424 of file RNTupleView.hxx.

◆ GetFieldId()

ROOT::DescriptorId_t ROOT::RNTupleCollectionView::GetFieldId ( std::string_view fieldName)
inlineprivate

Definition at line 350 of file RNTupleView.hxx.

◆ GetView()

template<typename T >
RNTupleView< T > ROOT::RNTupleCollectionView::GetView ( std::string_view fieldName)
inline

Provides access to an individual (sub)field.

Raises an exception if there is no field with the given name.

See also
ROOT::RNTupleReader::GetView(std::string_view)

Definition at line 410 of file RNTupleView.hxx.

◆ operator()() [1/2]

std::uint64_t ROOT::RNTupleCollectionView::operator() ( RNTupleLocalIndex localIndex)
inline
See also
RNTupleView::operator()(RNTupleLocalIndex)

Definition at line 451 of file RNTupleView.hxx.

◆ operator()() [2/2]

std::uint64_t ROOT::RNTupleCollectionView::operator() ( ROOT::NTupleSize_t globalIndex)
inline

◆ operator=() [1/2]

RNTupleCollectionView & ROOT::RNTupleCollectionView::operator= ( const RNTupleCollectionView & other)
delete

◆ operator=() [2/2]

RNTupleCollectionView & ROOT::RNTupleCollectionView::operator= ( RNTupleCollectionView && other)
inline

Definition at line 375 of file RNTupleView.hxx.

Friends And Related Symbol Documentation

◆ ROOT::RNTupleReader

friend class ROOT::RNTupleReader
friend

Definition at line 320 of file RNTupleView.hxx.

Member Data Documentation

◆ fField

ROOT::RField<RNTupleCardinality<std::uint64_t> > ROOT::RNTupleCollectionView::fField
private

Definition at line 324 of file RNTupleView.hxx.

◆ fSource

ROOT::Internal::RPageSource* ROOT::RNTupleCollectionView::fSource
private

Definition at line 323 of file RNTupleView.hxx.

◆ fValue

ROOT::RFieldBase::RValue ROOT::RNTupleCollectionView::fValue
private

Definition at line 325 of file RNTupleView.hxx.

Libraries for ROOT::RNTupleCollectionView:

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