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

Generic information about the physical location of data.

Values depend on the concrete storage type. E.g., for a local file fPosition is a 64bit file offset. Referenced objects on storage can be compressed and therefore we need to store their actual size. Note that we use a representation optimized for memory consumption that slightly differs from the on-disk representation.

Definition at line 226 of file RNTupleTypes.hxx.

Public Types

enum  ELocatorType : std::uint8_t {
  kTypeFile = 0x00 , kTypeDAOS = 0x02 , kLastSerializableType = 0x7f , kTypePageZero = kLastSerializableType + 1 ,
  kTypeUnknown
}
 Values for the Type field in non-disk locators. More...

Public Member Functions

 RNTupleLocator ()=default
std::uint64_t GetNBytesOnStorage () const
template<typename T>
GetPosition () const
 Note that for GetPosition() / SetPosition(), the locator type must correspond (kTypeFile, kTypeDAOS).
std::uint8_t GetReserved () const
 We currently only support one of the 8 available reserved bits (none are used so far).
ELocatorType GetType () const
 For non-disk locators, the value for the Type field.
bool operator== (const RNTupleLocator &other) const
void SetNBytesOnStorage (std::uint64_t nBytesOnStorage)
void SetPosition (RNTupleLocatorObject64 position)
void SetPosition (std::uint64_t position)
void SetReserved (std::uint8_t reserved)
 See GetReserved(): we ignore the reserved flag since we don't use it anywhere currently.
void SetType (ELocatorType type)

Private Attributes

std::uint64_t fFlagsAndNBytes = 0
 To save memory, we use the most significant bits to store the locator type (file, DAOS, zero page, unkown, kTestLocatorType) as well as one "reserved bit" that can be used in future locators.
std::uint64_t fPosition = 0
 Simple on-disk locators consisting of a 64-bit offset use variant type uint64_t; Object store locators use RNTupleLocatorObject64 but can still use the same 64 bit int for information storage.

Static Private Attributes

static constexpr std::uint64_t kMaskFlags = 0x0FULL << 60
 The 4 most significant bits of fFlagsAndNBytes carry the locator type (3 bits) plus one bit for a reserved bit of an extended locator.
static constexpr std::uint64_t kMaskReservedBit = 1ull << 60
static constexpr std::uint64_t kMaskType = 0x07ULL << 61

Friends

struct Internal::RNTupleLocatorHelper< RNTupleLocatorObject64 >

#include <ROOT/RNTupleTypes.hxx>

Member Enumeration Documentation

◆ ELocatorType

Values for the Type field in non-disk locators.

Serializable types must have the MSb == 0; see doc/BinaryFormatSpecification.md for details

Enumerator
kTypeFile 
kTypeDAOS 
kLastSerializableType 
kTypePageZero 
kTypeUnknown 

Definition at line 233 of file RNTupleTypes.hxx.

Constructor & Destructor Documentation

◆ RNTupleLocator()

ROOT::RNTupleLocator::RNTupleLocator ( )
default

Member Function Documentation

◆ GetNBytesOnStorage()

std::uint64_t ROOT::RNTupleLocator::GetNBytesOnStorage ( ) const
inline

Definition at line 267 of file RNTupleTypes.hxx.

◆ GetPosition()

template<typename T>
T ROOT::RNTupleLocator::GetPosition ( ) const
inline

Note that for GetPosition() / SetPosition(), the locator type must correspond (kTypeFile, kTypeDAOS).

Definition at line 281 of file RNTupleTypes.hxx.

◆ GetReserved()

std::uint8_t ROOT::RNTupleLocator::GetReserved ( ) const
inline

We currently only support one of the 8 available reserved bits (none are used so far).

Definition at line 272 of file RNTupleTypes.hxx.

◆ GetType()

ROOT::RNTupleLocator::ELocatorType ROOT::RNTupleLocator::GetType ( ) const

For non-disk locators, the value for the Type field.

This makes it possible to have different type values even if the payload structure is identical.

Definition at line 39 of file RNTupleTypes.cxx.

◆ operator==()

bool ROOT::RNTupleLocator::operator== ( const RNTupleLocator & other) const
inline

Definition at line 262 of file RNTupleTypes.hxx.

◆ SetNBytesOnStorage()

void ROOT::RNTupleLocator::SetNBytesOnStorage ( std::uint64_t nBytesOnStorage)

Definition at line 30 of file RNTupleTypes.cxx.

◆ SetPosition() [1/2]

void ROOT::RNTupleLocator::SetPosition ( RNTupleLocatorObject64 position)

Definition at line 79 of file RNTupleTypes.cxx.

◆ SetPosition() [2/2]

void ROOT::RNTupleLocator::SetPosition ( std::uint64_t position)

Definition at line 72 of file RNTupleTypes.cxx.

◆ SetReserved()

void ROOT::RNTupleLocator::SetReserved ( std::uint8_t reserved)

See GetReserved(): we ignore the reserved flag since we don't use it anywhere currently.

Definition at line 21 of file RNTupleTypes.cxx.

◆ SetType()

void ROOT::RNTupleLocator::SetType ( ELocatorType type)

Definition at line 54 of file RNTupleTypes.cxx.

◆ Internal::RNTupleLocatorHelper< RNTupleLocatorObject64 >

Definition at line 217 of file RNTupleTypes.hxx.

Member Data Documentation

◆ fFlagsAndNBytes

std::uint64_t ROOT::RNTupleLocator::fFlagsAndNBytes = 0
private

To save memory, we use the most significant bits to store the locator type (file, DAOS, zero page, unkown, kTestLocatorType) as well as one "reserved bit" that can be used in future locators.

Consequently, we can only store sizes up to 60 bits (1 EB), which in practice won't be an issue.

Definition at line 254 of file RNTupleTypes.hxx.

◆ fPosition

std::uint64_t ROOT::RNTupleLocator::fPosition = 0
private

Simple on-disk locators consisting of a 64-bit offset use variant type uint64_t; Object store locators use RNTupleLocatorObject64 but can still use the same 64 bit int for information storage.

Definition at line 257 of file RNTupleTypes.hxx.

◆ kMaskFlags

std::uint64_t ROOT::RNTupleLocator::kMaskFlags = 0x0FULL << 60
staticconstexprprivate

The 4 most significant bits of fFlagsAndNBytes carry the locator type (3 bits) plus one bit for a reserved bit of an extended locator.

Definition at line 247 of file RNTupleTypes.hxx.

◆ kMaskReservedBit

std::uint64_t ROOT::RNTupleLocator::kMaskReservedBit = 1ull << 60
staticconstexprprivate

Definition at line 249 of file RNTupleTypes.hxx.

◆ kMaskType

std::uint64_t ROOT::RNTupleLocator::kMaskType = 0x07ULL << 61
staticconstexprprivate

Definition at line 248 of file RNTupleTypes.hxx.


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