21 return R__FAIL(
"The Model used to create an AttributeSet cannot contain projected fields.");
25 return R__FAIL(std::string(
"The Model used to create an AttributeSet cannot contain Streamer field '") +
26 field.GetQualifiedFieldName() +
"'");
56std::unique_ptr<ROOT::Experimental::RNTupleAttrSetWriter>
58 std::unique_ptr<ROOT::Internal::RPageSink>
sink,
75 std::vector<std::unique_ptr<RFieldBase>>
fields;
87 return std::unique_ptr<RNTupleAttrSetWriter>(
93 std::unique_ptr<ROOT::Internal::RPageSink>
sink,
108 const auto start = fMainFillContext->GetNEntries();
122 if (
pendingRange.GetModelId() != fFillContext.GetModel().GetModelId())
124 "' was not created by it or was already committed."));
127 const auto end = fMainFillContext->GetNEntries();
128 auto &
metaEntry = fFillContext.fModel->GetDefaultEntry();
133 fFillContext.FillImpl(pair);
138 CommitRange(std::move(
pendingRange), fUserModel->GetDefaultEntry());
143 fFillContext.FlushCluster();
144 fFillContext.fSink->CommitClusterGroup();
145 return fFillContext.fSink->CommitDataset();
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
static ROOT::RResult< void > ValidateAttributeModel(const ROOT::RNTupleModel &model)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
A not-yet-finalized Attribute Range used for writing.
ROOT::DescriptorId_t GetModelId() const
Class used to write an RNTupleAttrSet in the context of an RNTupleWriter.
static std::unique_ptr< RNTupleAttrSetWriter > Create(const RNTupleFillContext &mainFillContext, std::unique_ptr< ROOT::Internal::RPageSink > sink, std::unique_ptr< RNTupleModel > userModel)
Creates an RNTupleAttrSetWriter associated to the RNTupleWriter owning mainFillContext and writing us...
ROOT::Internal::RNTupleLink Commit()
Commits the attributes written so far to disk and disables writing any new ones.
RNTupleAttrPendingRange BeginRange()
Begins an attribute range.
RNTupleAttrSetWriter(const RNTupleFillContext &mainFillContext, std::unique_ptr< ROOT::Internal::RPageSink > sink, std::unique_ptr< RNTupleModel > metaModel, std::unique_ptr< RNTupleModel > userModel, std::shared_ptr< ROOT::NTupleSize_t > rangeStartPtr, std::shared_ptr< ROOT::NTupleSize_t > rangeLenPtr)
void CommitRange(RNTupleAttrPendingRange range)
Ends an attribute range and associates the current values of the fields of the attribute model's defa...
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.
Base class for all ROOT issued exceptions.
std::vector< RFieldBase * > GetMutableSubfields()
A context for filling entries (data) into clusters of an RNTuple.
The RNTupleModel encapulates the schema of an RNTuple.
const ROOT::RFieldZero & GetConstFieldZero() const
Retrieves the field zero of this model, i.e. the root of the field hierarchy.
static std::unique_ptr< RNTupleModel > Create()
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
constexpr std::size_t kUserModelIndex
const char *const kUserModelName
constexpr std::size_t kRangeStartIndex
constexpr std::size_t kRangeLenIndex
const char *const kRangeStartName
const char *const kRangeLenName
ROOT::RFieldZero & GetFieldZeroOfModel(RNTupleModel &model)
RProjectedFields & GetProjectedFieldsOfModel(RNTupleModel &model)
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
A pair of scoped + meta entry used by the RNTupleAttrSetWriter.
ROOT::RNTupleModel & fMetaModel