24 switch (
field.GetValueSize()) {
25 case 1:
value = *
reinterpret_cast<std::uint8_t *
>(
valuePtr);
break;
26 case 2:
value = *
reinterpret_cast<std::uint16_t *
>(
valuePtr);
break;
27 case 4:
value = *
reinterpret_cast<std::uint32_t *
>(
valuePtr);
break;
28 case 8:
value = *
reinterpret_cast<std::uint64_t *
>(
valuePtr);
break;
41 auto desc =
fPageSource->GetSharedDescriptorGuard();
65std::unique_ptr<ROOT::Experimental::Internal::RNTupleIndex>
82 static const std::unordered_set<std::string>
allowedTypes = {
"std::int8_t",
"std::int16_t",
"std::int32_t",
83 "std::int64_t",
"std::uint8_t",
"std::uint16_t",
84 "std::uint32_t",
"std::uint64_t"};
89 for (
const auto &
field : fIndexFields) {
92 field->GetTypeName() +
"\" for indexing. Only integral types are allowed."));
100 for (
unsigned i = 0; i < fPageSource->GetNEntries(); ++i) {
124const std::vector<ROOT::Experimental::NTupleSize_t> *
127 if (
valuePtrs.size() != fIndexFields.size())
128 throw RException(
R__FAIL(
"Number of value pointers must match number of indexed fields."));
135 for (
unsigned i = 0; i <
valuePtrs.size(); ++i) {
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Container for the hashes of the indexed fields.
Builds an index on one or several fields of an RNTuple so it can be joined onto other RNTuples.
std::unique_ptr< RPageSource > fPageSource
The page source belonging to the RNTuple for which to build the index.
static std::unique_ptr< RNTupleIndex > Create(const std::vector< std::string > &fieldNames, const RPageSource &pageSource, bool deferBuild=false)
Create an RNTupleIndex from an existing RNTuple.
const std::vector< NTupleSize_t > * GetAllEntryNumbers(const std::vector< void * > &valuePtrs) const
Get all entry numbers for the given index.
NTupleSize_t GetFirstEntryNumber(const std::vector< void * > &valuePtrs) const
Get the first entry number containing the given index value.
RNTupleIndex(const std::vector< std::string > &fieldNames, const RPageSource &pageSource)
Create an a new RNTupleIndex for the RNTuple represented by the provided page source.
void EnsureBuilt() const
Ensure the RNTupleIndex has been built.
std::vector< std::unique_ptr< RFieldBase > > fIndexFields
The fields for which the index is built. Used to compute the hashes for each entry value.
std::uint64_t NTupleIndexValue_t
void Build()
Build the index.
Abstract interface to read data from an ntuple.
Base class for all ROOT issued exceptions.
A field translates read and write calls from/to underlying columns to/from tree values.
const_iterator end() const
void CallConnectPageSourceOnField(RFieldBase &, RPageSource &)
constexpr NTupleSize_t kInvalidNTupleIndex
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr DescriptorId_t kInvalidDescriptorId