16#ifndef ROOT7_RNTupleModel
17#define ROOT7_RNTupleModel
26#include <unordered_set>
30namespace Experimental {
32class RCollectionNTuple;
64 std::unique_ptr<RNTupleModel>
Clone()
const;
65 static std::unique_ptr<RNTupleModel>
Create() {
return std::make_unique<RNTupleModel>(); }
68 template <
typename T,
typename... ArgsT>
69 std::shared_ptr<T>
MakeField(std::string_view fieldName, ArgsT&&... args) {
71 auto field = std::make_unique<RField<T>>(fieldName);
72 auto ptr =
fDefaultEntry->AddValue<T>(field.get(), std::forward<ArgsT>(args)...);
78 void AddField(std::unique_ptr<Detail::RFieldBase> field);
81 void AddField(std::string_view fieldName, T* fromWhere) {
83 auto field = std::make_unique<RField<T>>(fieldName);
89 T*
Get(std::string_view fieldName) {
95 std::string_view fieldName,
96 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 an ntuple model, which itself has no physical representation.
The RNTupleModel encapulates the schema of an ntuple.
std::unordered_set< std::string > fFieldNames
Keeps track of which field names are taken.
void EnsureValidFieldName(std::string_view fieldName)
Checks that user-provided field names are valid in the context of this NTuple model.
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
std::string GetDescription() const
std::unique_ptr< RNTupleModel > Clone() const
REntry * GetDefaultEntry()
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.
RNTupleUuid GetUuid() const
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.
RNTupleVersion GetVersion() const
RFieldZero * GetFieldZero() const
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.
std::unique_ptr< RFieldZero > fFieldZero
Hierarchy of fields consisting of simple types and collections (sub trees)
For forward and backward compatibility, attach version information to the consitituents of the file f...
std::string RNTupleUuid
Every NTuple is identified by a UUID. TODO(jblomer): should this be a TUUID?
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...