7#ifndef ROOT7_RNTuple_Attr_Writing
8#define ROOT7_RNTuple_Attr_Writing
84 std::swap(
fStart, other.fStart);
86 other.fWasCommitted =
true;
96 "is not explicitly called before closing the main "
97 "Writer, the attributes will not be saved to storage!";
170 std::unique_ptr<ROOT::Internal::RPageSink> sink,
171 std::unique_ptr<RNTupleModel> userModel);
174 std::unique_ptr<RNTupleModel> metaModel, std::unique_ptr<RNTupleModel> userModel,
175 std::shared_ptr<ROOT::NTupleSize_t> rangeStartPtr,
176 std::shared_ptr<ROOT::NTupleSize_t> rangeLenPtr);
#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(...)
A not-yet-finalized Attribute Range used for writing.
RNTupleAttrPendingRange()=default
RNTupleAttrPendingRange(ROOT::NTupleSize_t start, ROOT::DescriptorId_t modelId)
RNTupleAttrPendingRange(RNTupleAttrPendingRange &&other)
ROOT::NTupleSize_t fStart
RNTupleAttrPendingRange & operator=(RNTupleAttrPendingRange &&other)
ROOT::NTupleSize_t GetStart() const
RNTupleAttrPendingRange & operator=(const RNTupleAttrPendingRange &)=delete
~RNTupleAttrPendingRange()
ROOT::DescriptorId_t GetModelId() const
RNTupleAttrPendingRange(const RNTupleAttrPendingRange &)=delete
std::weak_ptr< RNTupleAttrSetWriter > fWriter
RNTupleAttrSetWriterHandle & operator=(RNTupleAttrSetWriterHandle &&other)=default
RNTupleAttrSetWriterHandle(RNTupleAttrSetWriterHandle &&)=default
RNTupleAttrSetWriterHandle & operator=(const RNTupleAttrSetWriterHandle &)=delete
RNTupleAttrSetWriter * operator->()
Retrieves the underlying pointer to the AttrSetWriter, throwing if it's invalid.
RNTupleAttrSetWriterHandle(const std::shared_ptr< RNTupleAttrSetWriter > &range)
RNTupleAttrSetWriterHandle(const RNTupleAttrSetWriterHandle &)=delete
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...
std::shared_ptr< ROOT::NTupleSize_t > fRangeLenPtr
std::unique_ptr< RNTupleModel > fUserModel
The model that the user provided on creation. Used to create user-visible entries.
const RNTupleFillContext * fMainFillContext
Fill context of the main RNTuple being written (i.e. the RNTuple whose attributes we are).
ROOT::Internal::RNTupleLink Commit()
Commits the attributes written so far to disk and disables writing any new ones.
std::unique_ptr< REntry > CreateEntry()
Creates an REntry fit to pass to CommitRange(RNTupleAttrPendingRange range, REntry entry).
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)
const ROOT::RNTupleModel & GetModel() const
Returns the user-defined model used to create this attribute set.
std::shared_ptr< ROOT::NTupleSize_t > fRangeStartPtr
void CommitRange(RNTupleAttrPendingRange range)
Ends an attribute range and associates the current values of the fields of the attribute model's defa...
RNTupleFillContext fFillContext
Our own fill context.
const ROOT::RNTupleDescriptor & GetDescriptor() const
Returns the descriptor of the underlying attribute RNTuple.
The REntry is a collection of values in an RNTuple corresponding to a complete row in the data set.
Base class for all ROOT issued exceptions.
The on-storage metadata of an RNTuple.
A context for filling entries (data) into clusters of an RNTuple.
The RNTupleModel encapulates the schema of an RNTuple.
An RNTuple that gets filled with entries (data) and writes them to storage.
Representation of an RNTuple data set in a ROOT file.
Namespace for ROOT features in testing.
ROOT::RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
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
ROOT::DescriptorId_t GetModelId() const