Projected fields are fields whose columns are reused from existing fields.
Projected fields are not attached to the models zero field. Only the real source fields are written to, projected fields are stored as meta-data (header) information only. Only top-level projected fields are supported because otherwise the layout of types could be altered in unexpected ways. All projected fields and the source fields used to back them are kept in this class.
Definition at line 100 of file RNTupleModel.hxx.
Public Types | |
using | FieldMap_t = std::unordered_map< const RFieldBase *, const RFieldBase * > |
The map keys are the projected target fields, the map values are the backing source fields Note that sub fields are treated individually and indepently of their parent field. | |
Public Member Functions | |
RProjectedFields (const RNTupleModel *model) | |
RProjectedFields (const RProjectedFields &)=delete | |
RProjectedFields (RProjectedFields &&)=default | |
~RProjectedFields ()=default | |
RResult< void > | Add (std::unique_ptr< RFieldBase > field, const FieldMap_t &fieldMap) |
Adds a new projected field. | |
std::unique_ptr< RProjectedFields > | Clone (const RNTupleModel *newModel) const |
The new model needs to be a clone of fModel. | |
RFieldZero * | GetFieldZero () const |
const RFieldBase * | GetSourceField (const RFieldBase *target) const |
bool | IsEmpty () const |
RProjectedFields & | operator= (const RProjectedFields &)=delete |
RProjectedFields & | operator= (RProjectedFields &&)=default |
Private Member Functions | |
RProjectedFields (std::unique_ptr< RFieldZero > fieldZero) | |
RResult< void > | EnsureValidMapping (const RFieldBase *target, const FieldMap_t &fieldMap) |
Asserts that the passed field is a valid target of the source field provided in the field map. | |
Private Attributes | |
FieldMap_t | fFieldMap |
Maps the source fields from fModel to the target projected fields attached to fFieldZero. | |
std::unique_ptr< RFieldZero > | fFieldZero |
The projected fields are attached to this zero field. | |
const RNTupleModel * | fModel |
The model this set of projected fields belongs to. | |
#include <ROOT/RNTupleModel.hxx>
using ROOT::Experimental::RNTupleModel::RProjectedFields::FieldMap_t = std::unordered_map<const RFieldBase *, const RFieldBase *> |
The map keys are the projected target fields, the map values are the backing source fields Note that sub fields are treated individually and indepently of their parent field.
Definition at line 104 of file RNTupleModel.hxx.
|
inlineexplicitprivate |
Definition at line 107 of file RNTupleModel.hxx.
|
inlineexplicit |
Definition at line 120 of file RNTupleModel.hxx.
|
delete |
|
default |
|
default |
ROOT::Experimental::RResult< void > ROOT::Experimental::RNTupleModel::RProjectedFields::Add | ( | std::unique_ptr< RFieldBase > | field, |
const FieldMap_t & | fieldMap | ||
) |
Adds a new projected field.
The field map needs to provide valid source fields of fModel for 'field' and each of its sub fields.
Definition at line 96 of file RNTupleModel.cxx.
std::unique_ptr< ROOT::Experimental::RNTupleModel::RProjectedFields > ROOT::Experimental::RNTupleModel::RProjectedFields::Clone | ( | const RNTupleModel * | newModel | ) | const |
The new model needs to be a clone of fModel.
Definition at line 121 of file RNTupleModel.cxx.
|
private |
Asserts that the passed field is a valid target of the source field provided in the field map.
Checks the field without looking into sub fields.
Definition at line 37 of file RNTupleModel.cxx.
|
inline |
Definition at line 132 of file RNTupleModel.hxx.
const ROOT::Experimental::RFieldBase * ROOT::Experimental::RNTupleModel::RProjectedFields::GetSourceField | ( | const RFieldBase * | target | ) | const |
Definition at line 113 of file RNTupleModel.cxx.
|
inline |
Definition at line 137 of file RNTupleModel.hxx.
|
delete |
|
default |
|
private |
Maps the source fields from fModel to the target projected fields attached to fFieldZero.
Definition at line 111 of file RNTupleModel.hxx.
|
private |
The projected fields are attached to this zero field.
Definition at line 109 of file RNTupleModel.hxx.
|
private |
The model this set of projected fields belongs to.
Definition at line 113 of file RNTupleModel.hxx.