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 230 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
 The only currently supported reserved bit is the DAOS cage bit.
 
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 the one "reserved bit" that we currently process, the DAOS cage bit.
 
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 237 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 271 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 285 of file RNTupleTypes.hxx.

◆ GetReserved()

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

The only currently supported reserved bit is the DAOS cage bit.

Definition at line 276 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 40 of file RNTupleTypes.cxx.

◆ operator==()

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

Definition at line 266 of file RNTupleTypes.hxx.

◆ SetNBytesOnStorage()

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

Definition at line 31 of file RNTupleTypes.cxx.

◆ SetPosition() [1/2]

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

Definition at line 80 of file RNTupleTypes.cxx.

◆ SetPosition() [2/2]

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

Definition at line 73 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 22 of file RNTupleTypes.cxx.

◆ SetType()

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

Definition at line 55 of file RNTupleTypes.cxx.

Friends And Related Symbol Documentation

◆ Internal::RNTupleLocatorHelper< RNTupleLocatorObject64 >

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 the one "reserved bit" that we currently process, the DAOS cage bit.

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

Definition at line 258 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 261 of file RNTupleTypes.hxx.

◆ kMaskFlags

constexpr 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 251 of file RNTupleTypes.hxx.

◆ kMaskReservedBit

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

Definition at line 253 of file RNTupleTypes.hxx.

◆ kMaskType

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

Definition at line 252 of file RNTupleTypes.hxx.

Libraries for ROOT::RNTupleLocator:

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