24 case 1:
value = *
reinterpret_cast<std::uint8_t *
>(
valuePtr);
break;
25 case 2:
value = *
reinterpret_cast<std::uint16_t *
>(
valuePtr);
break;
26 case 4:
value = *
reinterpret_cast<std::uint32_t *
>(
valuePtr);
break;
27 case 8:
value = *
reinterpret_cast<std::uint64_t *
>(
valuePtr);
break;
39 static const std::unordered_set<std::string>
allowedTypes = {
"std::int8_t",
"std::int16_t",
"std::int32_t",
40 "std::int64_t",
"std::uint8_t",
"std::uint16_t",
41 "std::uint32_t",
"std::uint64_t"};
44 auto desc =
pageSource.GetSharedDescriptorGuard();
46 std::vector<std::unique_ptr<ROOT::RFieldBase>>
fields;
60 "\" in join table: only integral types are allowed"));
74 for (
unsigned i = 0; i <
pageSource.GetNEntries(); ++i) {
89const std::vector<ROOT::NTupleSize_t> *
90ROOT ::Experimental::Internal::RNTupleJoinTable::REntryMapping::GetEntryIndexes(std::vector<void *>
valuePtrs)
const
93 throw RException(
R__FAIL(
"number of value pointers must match number of join fields"));
98 for (
unsigned i = 0; i <
valuePtrs.size(); ++i) {
103 return &entries->second;
111std::unique_ptr<ROOT::Experimental::Internal::RNTupleJoinTable>
127std::vector<ROOT::NTupleSize_t>
135 std::vector<ROOT::NTupleSize_t>
entryIdxs{};
146std::unordered_map<ROOT::Experimental::Internal::RNTupleJoinTable::PartitionKey_t, std::vector<ROOT::NTupleSize_t>>
150 std::unordered_map<PartitionKey_t, std::vector<ROOT::NTupleSize_t>>
entryIdxs{};
163std::unordered_map<ROOT::Experimental::Internal::RNTupleJoinTable::PartitionKey_t, std::vector<ROOT::NTupleSize_t>>
166 std::unordered_map<PartitionKey_t, std::vector<ROOT::NTupleSize_t>>
entryIdxs{};
#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 value
Provides a mapping from one or several join field values to an entry index.
std::vector< std::size_t > fJoinFieldValueSizes
The size (in bytes) for each join field, corresponding to fJoinFieldNames.
std::vector< std::string > fJoinFieldNames
Names of the join fields used for the mapping to their respective entry indexes.
REntryMapping(ROOT::Internal::RPageSource &pageSource, const std::vector< std::string > &joinFieldNames)
Create a new entry mapping.
std::unordered_map< RCombinedJoinFieldValue, std::vector< ROOT::NTupleSize_t >, RCombinedJoinFieldValueHash > fMapping
The mapping itself.
Builds a join table on one or several fields of an RNTuple so it can be joined onto other RNTuples.
std::unordered_map< PartitionKey_t, std::vector< ROOT::NTupleSize_t > > GetPartitionedEntryIndexes(const std::vector< void * > &valuePtrs, const std::vector< PartitionKey_t > &partitionKeys) const
Get all entry indexes for the given join field value(s) for a specific set of partitions.
std::vector< ROOT::NTupleSize_t > GetEntryIndexes(const std::vector< void * > &valuePtrs, PartitionKey_t partitionKey=kDefaultPartitionKey) const
Get all entry indexes for the given join field value(s) within a partition.
RNTupleJoinTable & Add(ROOT::Internal::RPageSource &pageSource, PartitionKey_t partitionKey=kDefaultPartitionKey)
Add an entry mapping to the join table.
static std::unique_ptr< RNTupleJoinTable > Create(const std::vector< std::string > &joinFieldNames)
Create an RNTupleJoinTable from an existing RNTuple.
std::vector< std::string > fJoinFieldNames
Names of the join fields used for the mapping to their respective entry indexes.
std::uint64_t PartitionKey_t
std::uint64_t JoinValue_t
RNTupleJoinTable(const std::vector< std::string > &joinFieldNames)
Create an a new RNTupleJoinTable for the RNTuple represented by the provided page source.
std::unordered_map< PartitionKey_t, std::vector< std::unique_ptr< REntryMapping > > > fPartitions
Partitions of one or multiple entry mappings.
Abstract interface to read data from an ntuple.
Base class for all ROOT issued exceptions.
const_iterator begin() const
const_iterator end() const
void CallConnectPageSourceOnField(RFieldBase &, ROOT::Internal::RPageSource &)
constexpr DescriptorId_t kInvalidDescriptorId
Container for the combined hashes of join field values.