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 227 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 |
| 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>
| 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 234 of file RNTupleTypes.hxx.
|
default |
|
inline |
Definition at line 268 of file RNTupleTypes.hxx.
|
inline |
Note that for GetPosition() / SetPosition(), the locator type must correspond (kTypeFile, kTypeDAOS).
Definition at line 282 of file RNTupleTypes.hxx.
|
inline |
We currently only support one of the 8 available reserved bits (none are used so far).
Definition at line 273 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 263 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 218 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 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 255 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 258 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 248 of file RNTupleTypes.hxx.
Definition at line 250 of file RNTupleTypes.hxx.
|
staticconstexprprivate |
Definition at line 249 of file RNTupleTypes.hxx.