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

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

Definition at line 76 of file RNTupleProcessor.hxx.

Public Member Functions

void BindRawPtr (T *valuePtr)
 Bind the value to valuePtr.
std::shared_ptr< T > GetPtr () const
 Get a shared pointer to the field value managed by the processor's entry.
T * GetRawPtr () const
 Get a non-owning pointer to the field value managed by the processor's entry.
bool HasValue () const
 Check if the pointer currently holds a valid value.
const T & operator* () const
 Get a reference to the field value managed by the processor's entry.
const T * operator-> () const
 Access the field value managed by the processor's entry.

Private Member Functions

 RNTupleProcessorOptionalPtr (Internal::RNTupleProcessorEntry *processorEntry, Internal::RNTupleProcessorEntry::FieldIndex_t fieldIdx)

Private Attributes

Internal::RNTupleProcessorEntry::FieldIndex_t fFieldIndex
Internal::RNTupleProcessorEntryfProcessorEntry

Friends

class RNTupleProcessor

#include <ROOT/RNTupleProcessor.hxx>

Constructor & Destructor Documentation

◆ RNTupleProcessorOptionalPtr()

template<typename T>
ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::RNTupleProcessorOptionalPtr ( Internal::RNTupleProcessorEntry * processorEntry,
Internal::RNTupleProcessorEntry::FieldIndex_t fieldIdx )
inlineprivate

Definition at line 83 of file RNTupleProcessor.hxx.

Member Function Documentation

◆ BindRawPtr()

template<typename T>
void ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::BindRawPtr ( T * valuePtr)
inline

Bind the value to valuePtr.

Parameters
[in]valuePtrPointer to bind the value to.
Warning
Use this function with care! Values may not always be valid for every entry during processing, for example when a field is not present in one of the chained processors or when during a join operation, no matching entry in the auxiliary processor can be found. Reading valuePtr as-is therefore comes with the risk of reading invalid data. After binding a pointer to an RNTupleProcessorOptionalPtr, we strongly recommend only accessing its data through this interface, to ensure that only valid data can be read.

Definition at line 122 of file RNTupleProcessor.hxx.

◆ GetPtr()

template<typename T>
std::shared_ptr< T > ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::GetPtr ( ) const
inline

Get a shared pointer to the field value managed by the processor's entry.

Returns
A std::shared_ptr<T> if the field is valid in the current entry, or a nullptr otherwise.

Definition at line 98 of file RNTupleProcessor.hxx.

◆ GetRawPtr()

template<typename T>
T * ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::GetRawPtr ( ) const
inline

Get a non-owning pointer to the field value managed by the processor's entry.

Returns
A T* if the field is valid in the current entry, or a nullptr otherwise.

Definition at line 110 of file RNTupleProcessor.hxx.

◆ HasValue()

template<typename T>
bool ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::HasValue ( ) const
inline

Check if the pointer currently holds a valid value.

Definition at line 92 of file RNTupleProcessor.hxx.

◆ operator*()

template<typename T>
const T & ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::operator* ( ) const
inline

Get a reference to the field value managed by the processor's entry.

Throws an exception if the field is invalid in the processor's current entry.

Definition at line 128 of file RNTupleProcessor.hxx.

◆ operator->()

template<typename T>
const T * ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::operator-> ( ) const
inline

Access the field value managed by the processor's entry.

Throws an exception if the field is invalid in the processor's current entry.

Definition at line 141 of file RNTupleProcessor.hxx.

◆ RNTupleProcessor

template<typename T>
friend class RNTupleProcessor
friend

Definition at line 77 of file RNTupleProcessor.hxx.

Member Data Documentation

◆ fFieldIndex

Definition at line 81 of file RNTupleProcessor.hxx.

◆ fProcessorEntry

template<typename T>
Internal::RNTupleProcessorEntry* ROOT::Experimental::RNTupleProcessorOptionalPtr< T >::fProcessorEntry
private

Definition at line 80 of file RNTupleProcessor.hxx.


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