20 : fReader(std::move(reader))
30 const auto &metaDesc =
fReader->GetDescriptor();
31 const auto &metaFieldIds = metaDesc.GetFieldZero().GetLinkIds();
35 std::to_string(metaFieldIds.size())));
38 const auto fieldId = metaFieldIds[i];
39 const auto &metaField = metaDesc.GetFieldDescriptor(fieldId);
47 for (
const auto fieldId : userFieldRoot.GetLinkIds()) {
48 const auto &fdesc = metaDesc.GetFieldDescriptor(fieldId);
49 auto userField =
RFieldBase::Create(fdesc.GetFieldName(), fdesc.GetTypeName()).Unwrap();
58 for (
auto i :
fReader->GetEntryRange()) {
59 auto start = entryRangeStartView(i);
60 auto len = entryRangeLenView(i);
65 [](
const auto &
a,
const auto &
b) { return a.first.GetStart() < b.first.GetStart(); });
72 return fReader->GetDescriptor();
90 const auto userFields = userRootField->GetMutableSubfields();
91 assert(entry.
fValues.size() == userFields.size());
92 for (std::size_t i = 0; i < userFields.size(); ++i) {
93 auto *field = userFields[i];
94 field->Read(
index, entry.
fValues[i].GetPtr<
void>().get());
105 auto &entry = fUserModel->GetDefaultEntry();
106 return LoadEntry(
index, entry);
111 return fUserModel->CreateEntry();
118 if (endEntry <= startEntry) {
120 <<
"empty range given when getting attributes from Attribute Set '" << GetDescriptor().GetName()
121 <<
"' (range given: [" << startEntry <<
", " << endEntry <<
")).";
135 if (endEntry <= startEntry) {
137 <<
"empty range given when getting attributes from Attribute Set '" << GetDescriptor().GetName()
138 <<
"' (range given: [" << startEntry <<
", " << endEntry <<
")).";
166 if (fFilter->fIsContained) {
167 return fFilter->fRange.GetStart() <= range.
GetStart() && range.
GetEnd() <= fFilter->fRange.GetEnd();
169 return range.
GetStart() <= fFilter->fRange.GetStart() && fFilter->fRange.GetEnd() <= range.
GetEnd();
181 for (
auto it = fCur; it != fEnd; ++it) {
182 const auto &[range,
index] = *it;
183 const auto &firstLast = range.GetFirstLast();
189 const auto &[first, last] = *firstLast;
190 if (first >= fFilter->fRange.GetEnd()) {
#define R__unlikely(expr)
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__LOG_WARNING(...)
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 char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
The REntry is a collection of values in an RNTuple corresponding to a complete row in the data set.
std::vector< ROOT::RFieldBase::RValue > fValues
Corresponds to the fields of the linked model.
std::uint64_t GetModelId() const
Base class for all ROOT issued exceptions.
std::vector< RFieldBase * > GetMutableSubfields()
static RResult< std::unique_ptr< RFieldBase > > Create(const std::string &fieldName, const std::string &typeName, const ROOT::RCreateFieldOptions &options, const ROOT::RNTupleDescriptor *desc, ROOT::DescriptorId_t fieldId)
Factory method to resurrect a field from the stored on-disk type information.
bool FullyContained(RNTupleAttrRange range) const
decltype(std::declval< RNTupleAttrSetReader >().fEntryRanges.begin()) Iter_t
Iter_t SkipFiltered() const
Iterable class used to loop over attribute entries.
A range of main entries referred to by an attribute entry.
ROOT::NTupleSize_t GetEnd() const
Returns one past the last valid index of the range, equal to GetStart() + GetLength().
static RNTupleAttrRange FromStartEnd(ROOT::NTupleSize_t start, ROOT::NTupleSize_t end)
Creates an AttributeRange from [start, end), where end is one past the last valid entry of the range ...
static RNTupleAttrRange FromStartLength(ROOT::NTupleSize_t start, ROOT::NTupleSize_t length)
ROOT::NTupleSize_t GetStart() const
Returns the beginning of the range.
const ROOT::RNTupleDescriptor & GetDescriptor() const
Returns the read-only descriptor of this attribute set.
std::vector< std::pair< RNTupleAttrRange, NTupleSize_t > > fEntryRanges
List containing pairs { entryRange, entryIndex }, used to quickly find out which entries in the Attri...
std::unique_ptr< REntry > CreateEntry()
Creates an entry suitable for use with LoadEntry.
RNTupleAttrEntryIterable GetAttributesInRange(NTupleSize_t startEntry, NTupleSize_t endEntry)
Returns all the attributes whose range is fully contained in [startEntry, endEntry)
std::unique_ptr< RNTupleReader > fReader
The internal Reader used to read the AttributeSet RNTuple.
std::unique_ptr< ROOT::RNTupleModel > fUserModel
The reconstructed user model.
RNTupleAttrSetReader(std::unique_ptr< RNTupleReader > reader, std::uint16_t vSchemaMajor)
RNTupleAttrEntryIterable GetAttributesContainingRange(NTupleSize_t startEntry, NTupleSize_t endEntry)
Returns all the attributes whose range fully contains [startEntry, endEntry)
RNTupleAttrRange LoadEntry(NTupleSize_t index)
Loads the attribute entry at position index into the default entry.
RNTupleAttrEntryIterable GetAttributes()
Returns all the attributes in this Set. The returned attributes are sorted by entry range start.
The on-storage metadata of an RNTuple.
The RNTupleModel encapulates the schema of an RNTuple.
REntry & GetDefaultEntry()
Retrieves the default entry of this model.
static std::unique_ptr< RNTupleModel > Create()
@ kMetaFieldIndex_UserData
@ kMetaFieldIndex_RangeLen
@ kMetaFieldIndex_RangeStart
const std::uint16_t kSchemaVersionMajor
constexpr const char * kMetaFieldNames[]
ROOT::RFieldZero & GetFieldZeroOfModel(RNTupleModel &model)
ROOT::RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.