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 > | |
| 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>
| enum ROOT::RNTupleLocator::ELocatorType : std::uint8_t |
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.
|
default |
|
inline |
Definition at line 271 of file RNTupleTypes.hxx.
|
inline |
Note that for GetPosition() / SetPosition(), the locator type must correspond (kTypeFile, kTypeDAOS).
Definition at line 285 of file RNTupleTypes.hxx.
|
inline |
The only currently supported reserved bit is the DAOS cage bit.
Definition at line 276 of file RNTupleTypes.hxx.
| 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.
|
inline |
Definition at line 266 of file RNTupleTypes.hxx.
| void ROOT::RNTupleLocator::SetNBytesOnStorage | ( | std::uint64_t | nBytesOnStorage | ) |
Definition at line 31 of file RNTupleTypes.cxx.
| void ROOT::RNTupleLocator::SetPosition | ( | RNTupleLocatorObject64 | position | ) |
Definition at line 80 of file RNTupleTypes.cxx.
| void ROOT::RNTupleLocator::SetPosition | ( | std::uint64_t | position | ) |
Definition at line 73 of file RNTupleTypes.cxx.
| 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.
| void ROOT::RNTupleLocator::SetType | ( | ELocatorType | type | ) |
Definition at line 55 of file RNTupleTypes.cxx.
|
friend |
Definition at line 221 of file RNTupleTypes.hxx.
|
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.
|
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.
|
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.
Definition at line 253 of file RNTupleTypes.hxx.
|
staticconstexprprivate |
Definition at line 252 of file RNTupleTypes.hxx.