16#ifndef ROOT7_RNTupleModel
17#define ROOT7_RNTupleModel
30namespace Experimental {
32class RCollectionNTuple;
59 static std::unique_ptr<RNTupleModel>
Create() {
return std::make_unique<RNTupleModel>(); }
62 template <
typename T,
typename... ArgsT>
64 auto field = std::make_unique<RField<T>>(fieldName);
65 auto ptr =
fDefaultEntry->AddValue<
T>(field.get(), std::forward<ArgsT>(args)...);
71 void AddField(std::unique_ptr<Detail::RFieldBase> field);
75 auto field = std::make_unique<RField<T>>(fieldName);
88 std::unique_ptr<RNTupleModel> collectionModel);
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
The container field for a tree model, which itself has no physical representation.
The RNTupleModel encapulates the schema of an ntuple.
std::shared_ptr< RCollectionNTuple > MakeCollection(std::string_view fieldName, std::unique_ptr< RNTupleModel > collectionModel)
Ingests a model for a sub collection and attaches it to the current model.
T * Get(std::string_view fieldName)
RNTupleModel(const RNTupleModel &)=delete
REntry * GetDefaultEntry()
std::unique_ptr< RFieldRoot > fRootField
Hierarchy of fields consisting of simple types and collections (sub trees)
void AddField(std::string_view fieldName, T *fromWhere)
std::unique_ptr< REntry > CreateEntry()
std::unique_ptr< REntry > fDefaultEntry
Contains field values corresponding to the created top-level fields.
std::shared_ptr< T > MakeField(std::string_view fieldName, ArgsT &&... args)
Creates a new field and a corresponding tree value that is managed by a shared pointer.
RFieldRoot * GetRootField()
static std::unique_ptr< RNTupleModel > Create()
RNTupleModel & operator=(const RNTupleModel &)=delete
void AddField(std::unique_ptr< Detail::RFieldBase > field)
Adds a field whose type is not known at compile time. Thus there is no shared pointer returned.
basic_string_view< char > string_view
Namespace for new ROOT classes and functions.