Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RFieldSequenceContainer.hxx
Go to the documentation of this file.
1/// \file ROOT/RField/SequenceContainer.hxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2018-10-09
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#ifndef ROOT7_RField_SequenceContainer
17#define ROOT7_RField_SequenceContainer
18
19#ifndef ROOT7_RField
20#error "Please include RField.hxx!"
21#endif
22
23#include <ROOT/RFieldBase.hxx>
24#include <ROOT/RNTupleUtil.hxx>
25#include <ROOT/RVec.hxx>
26
27#include <array>
28#include <memory>
29#include <vector>
30
31namespace ROOT {
32namespace Experimental {
33
34namespace Detail {
35class RFieldVisitor;
36} // namespace Detail
37
38////////////////////////////////////////////////////////////////////////////////
39/// Template specializations for C++ std::array and C-style arrays
40////////////////////////////////////////////////////////////////////////////////
41
42/// The generic field for fixed size arrays, which do not need an offset column
43class RArrayField : public RFieldBase {
44private:
45 class RArrayDeleter : public RDeleter {
46 private:
47 std::size_t fItemSize = 0;
48 std::size_t fArrayLength = 0;
49 std::unique_ptr<RDeleter> fItemDeleter;
50
51 public:
52 RArrayDeleter(std::size_t itemSize, std::size_t arrayLength, std::unique_ptr<RDeleter> itemDeleter)
53 : fItemSize(itemSize), fArrayLength(arrayLength), fItemDeleter(std::move(itemDeleter))
54 {
55 }
56 void operator()(void *objPtr, bool dtorOnly) final;
57 };
58
59 std::size_t fItemSize;
60 std::size_t fArrayLength;
61
62protected:
63 std::unique_ptr<RFieldBase> CloneImpl(std::string_view newName) const final;
64
65 void ConstructValue(void *where) const override;
66 std::unique_ptr<RDeleter> GetDeleter() const final;
67
68 std::size_t AppendImpl(const void *from) final;
69 void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final;
70 void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final;
71
72public:
73 RArrayField(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField, std::size_t arrayLength);
74 RArrayField(RArrayField &&other) = default;
75 RArrayField &operator=(RArrayField &&other) = default;
76 ~RArrayField() override = default;
77
78 std::vector<RValue> SplitValue(const RValue &value) const final;
79 size_t GetLength() const { return fArrayLength; }
80 size_t GetValueSize() const final { return fItemSize * fArrayLength; }
81 size_t GetAlignment() const final { return fSubFields[0]->GetAlignment(); }
82 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
83};
84
85template <typename ItemT, std::size_t N>
86class RField<std::array<ItemT, N>> : public RArrayField {
87 using ContainerT = typename std::array<ItemT, N>;
88
89protected:
90 void ConstructValue(void *where) const final { new (where) ContainerT(); }
91
92public:
93 static std::string TypeName() { return "std::array<" + RField<ItemT>::TypeName() + "," + std::to_string(N) + ">"; }
94 explicit RField(std::string_view name) : RArrayField(name, std::make_unique<RField<ItemT>>("_0"), N) {}
95 RField(RField &&other) = default;
96 RField &operator=(RField &&other) = default;
97 ~RField() override = default;
98};
99
100template <typename ItemT, std::size_t N>
101class RField<ItemT[N]> final : public RField<std::array<ItemT, N>> {
102public:
103 explicit RField(std::string_view name) : RField<std::array<ItemT, N>>(name) {}
104 RField(RField &&other) = default;
105 RField &operator=(RField &&other) = default;
106 ~RField() override = default;
107};
108
109////////////////////////////////////////////////////////////////////////////////
110/// Template specializations for ROOT's RVec
111////////////////////////////////////////////////////////////////////////////////
112
113/// The type-erased field for a RVec<Type>
114class RRVecField : public RFieldBase {
115public:
116 /// the RRVecDeleter is also used by RArrayAsRVecField and therefore declared public
117 class RRVecDeleter : public RDeleter {
118 private:
119 std::size_t fItemAlignment;
120 std::size_t fItemSize = 0;
121 std::unique_ptr<RDeleter> fItemDeleter;
122
123 public:
124 explicit RRVecDeleter(std::size_t itemAlignment) : fItemAlignment(itemAlignment) {}
125 RRVecDeleter(std::size_t itemAlignment, std::size_t itemSize, std::unique_ptr<RDeleter> itemDeleter)
126 : fItemAlignment(itemAlignment), fItemSize(itemSize), fItemDeleter(std::move(itemDeleter))
127 {
128 }
129 void operator()(void *objPtr, bool dtorOnly) final;
130 };
131
132 std::unique_ptr<RDeleter> fItemDeleter;
133
134protected:
135 std::size_t fItemSize;
137 std::size_t fValueSize;
138
139 std::unique_ptr<RFieldBase> CloneImpl(std::string_view newName) const override;
141 void GenerateColumns() final;
142 void GenerateColumns(const RNTupleDescriptor &desc) final;
143
144 void ConstructValue(void *where) const override;
145 std::unique_ptr<RDeleter> GetDeleter() const override;
146
147 std::size_t AppendImpl(const void *from) override;
148 void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) override;
149 std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec) final;
150
151 void CommitClusterImpl() final { fNWritten = 0; }
152
153public:
154 RRVecField(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField);
155 RRVecField(RRVecField &&) = default;
157 RRVecField(const RRVecField &) = delete;
159 ~RRVecField() override = default;
160
161 std::vector<RValue> SplitValue(const RValue &value) const final;
162 size_t GetValueSize() const override;
163 size_t GetAlignment() const override;
164 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
165 void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
166 {
167 fPrincipalColumn->GetCollectionInfo(globalIndex, collectionStart, size);
168 }
169 void GetCollectionInfo(RClusterIndex clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
170 {
171 fPrincipalColumn->GetCollectionInfo(clusterIndex, collectionStart, size);
172 }
173};
174
175template <typename ItemT>
176class RField<ROOT::VecOps::RVec<ItemT>> final : public RRVecField {
178
179protected:
180 std::unique_ptr<RFieldBase> CloneImpl(std::string_view newName) const final
181 {
182 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
183 return std::make_unique<RField<ROOT::VecOps::RVec<ItemT>>>(newName, std::move(newItemField));
184 }
185
186 void ConstructValue(void *where) const final { new (where) ContainerT(); }
187 std::unique_ptr<RDeleter> GetDeleter() const final { return std::make_unique<RTypedDeleter<ContainerT>>(); }
188
189 std::size_t AppendImpl(const void *from) final
190 {
191 auto typedValue = static_cast<const ContainerT *>(from);
192 auto nbytes = 0;
193 auto count = typedValue->size();
194 for (unsigned i = 0; i < count; ++i) {
195 nbytes += CallAppendOn(*fSubFields[0], &typedValue->data()[i]);
196 }
197 this->fNWritten += count;
198 fPrincipalColumn->Append(&this->fNWritten);
199 return nbytes + fPrincipalColumn->GetElement()->GetPackedSize();
200 }
201 void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
202 {
203 auto typedValue = static_cast<ContainerT *>(to);
204 ClusterSize_t nItems;
205 RClusterIndex collectionStart;
206 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
207 typedValue->resize(nItems);
208 for (unsigned i = 0; i < nItems; ++i) {
209 CallReadOn(*fSubFields[0], collectionStart + i, &typedValue->data()[i]);
210 }
211 }
212
213public:
214 RField(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField)
215 : RRVecField(fieldName, std::move(itemField))
216 {
217 }
218
219 explicit RField(std::string_view name) : RField(name, std::make_unique<RField<ItemT>>("_0")) {}
220 RField(RField &&other) = default;
221 RField &operator=(RField &&other) = default;
222 ~RField() override = default;
223
224 static std::string TypeName() { return "ROOT::VecOps::RVec<" + RField<ItemT>::TypeName() + ">"; }
225
226 size_t GetValueSize() const final { return sizeof(ContainerT); }
227 size_t GetAlignment() const final { return std::alignment_of<ContainerT>(); }
228};
229
230////////////////////////////////////////////////////////////////////////////////
231/// Template specializations for C++ std::vector
232////////////////////////////////////////////////////////////////////////////////
233
234/// The generic field for a (nested) std::vector<Type> except for std::vector<bool>
235/// The field can be constructed as untyped collection through CreateUntyped().
236class RVectorField : public RFieldBase {
237private:
238 class RVectorDeleter : public RDeleter {
239 private:
240 std::size_t fItemSize = 0;
241 std::unique_ptr<RDeleter> fItemDeleter;
242
243 public:
244 RVectorDeleter() = default;
245 RVectorDeleter(std::size_t itemSize, std::unique_ptr<RDeleter> itemDeleter)
246 : fItemSize(itemSize), fItemDeleter(std::move(itemDeleter))
247 {
248 }
249 void operator()(void *objPtr, bool dtorOnly) final;
250 };
251
252 std::size_t fItemSize;
254 std::unique_ptr<RDeleter> fItemDeleter;
255
256protected:
257 RVectorField(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField, bool isUntyped);
258
259 std::unique_ptr<RFieldBase> CloneImpl(std::string_view newName) const override;
260
262 void GenerateColumns() final;
263 void GenerateColumns(const RNTupleDescriptor &desc) final;
264
265 void ConstructValue(void *where) const override { new (where) std::vector<char>(); }
266 std::unique_ptr<RDeleter> GetDeleter() const final;
267
268 std::size_t AppendImpl(const void *from) final;
269 void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final;
270
271 void CommitClusterImpl() final { fNWritten = 0; }
272
273public:
274 RVectorField(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField);
275 RVectorField(RVectorField &&other) = default;
277 ~RVectorField() override = default;
278
279 static std::unique_ptr<RVectorField>
280 CreateUntyped(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField);
281
282 std::vector<RValue> SplitValue(const RValue &value) const final;
283 size_t GetValueSize() const override { return sizeof(std::vector<char>); }
284 size_t GetAlignment() const final { return std::alignment_of<std::vector<char>>(); }
285 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
286 void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
287 {
288 fPrincipalColumn->GetCollectionInfo(globalIndex, collectionStart, size);
289 }
290 void GetCollectionInfo(RClusterIndex clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
291 {
292 fPrincipalColumn->GetCollectionInfo(clusterIndex, collectionStart, size);
293 }
294};
295
296template <typename ItemT>
297class RField<std::vector<ItemT>> final : public RVectorField {
298 using ContainerT = typename std::vector<ItemT>;
299
300protected:
301 void ConstructValue(void *where) const final { new (where) ContainerT(); }
302
303public:
304 static std::string TypeName() { return "std::vector<" + RField<ItemT>::TypeName() + ">"; }
305 explicit RField(std::string_view name) : RVectorField(name, std::make_unique<RField<ItemT>>("_0")) {}
306 RField(RField &&other) = default;
307 RField &operator=(RField &&other) = default;
308 ~RField() override = default;
309
310 size_t GetValueSize() const final { return sizeof(ContainerT); }
311};
312
313// std::vector<bool> is a template specialization and needs special treatment
314template <>
315class RField<std::vector<bool>> final : public RFieldBase {
316private:
317 ClusterSize_t fNWritten{0};
318
319protected:
320 std::unique_ptr<RFieldBase> CloneImpl(std::string_view newName) const final
321 {
322 return std::make_unique<RField>(newName);
323 }
324
325 const RColumnRepresentations &GetColumnRepresentations() const final;
326 void GenerateColumns() final;
327 void GenerateColumns(const RNTupleDescriptor &desc) final;
328
329 void ConstructValue(void *where) const final { new (where) std::vector<bool>(); }
330 std::unique_ptr<RDeleter> GetDeleter() const final { return std::make_unique<RTypedDeleter<std::vector<bool>>>(); }
331
332 std::size_t AppendImpl(const void *from) final;
333 void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final;
334
335 void CommitClusterImpl() final { fNWritten = 0; }
336
337public:
338 static std::string TypeName() { return "std::vector<bool>"; }
339 explicit RField(std::string_view name);
340 RField(RField &&other) = default;
341 RField &operator=(RField &&other) = default;
342 ~RField() override = default;
343
344 std::vector<RValue> SplitValue(const RValue &value) const final;
345
346 size_t GetValueSize() const final { return sizeof(std::vector<bool>); }
347 size_t GetAlignment() const final { return std::alignment_of<std::vector<bool>>(); }
348 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
349 void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
350 {
351 fPrincipalColumn->GetCollectionInfo(globalIndex, collectionStart, size);
352 }
353 void GetCollectionInfo(RClusterIndex clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
354 {
355 fPrincipalColumn->GetCollectionInfo(clusterIndex, collectionStart, size);
356 }
357};
358
359////////////////////////////////////////////////////////////////////////////////
360/// Additional classes related to sequence containers
361////////////////////////////////////////////////////////////////////////////////
362
363/**
364\class ROOT::Experimental::RArrayAsRVecField
365\brief A field for fixed-size arrays that are represented as RVecs in memory.
366\ingroup NTuple
367This class is used only for reading. In particular, it helps exposing
368arbitrarily-nested std::array on-disk fields as RVecs for usage in RDataFrame.
369*/
370class RArrayAsRVecField final : public RFieldBase {
371private:
372 std::unique_ptr<RDeleter> fItemDeleter; /// Sub field deleter or nullptr for simple fields
373 std::size_t fItemSize; /// The size of a child field's item
374 std::size_t fArrayLength; /// The length of the arrays in this field
375 std::size_t fValueSize; /// The size of a value of this field, i.e. an RVec
376
377protected:
378 std::unique_ptr<RFieldBase> CloneImpl(std::string_view newName) const final;
379
380 void GenerateColumns() final { R__ASSERT(false && "RArrayAsRVec fields must only be used for reading"); }
382
383 void ConstructValue(void *where) const final;
384 /// Returns an RRVecField::RRVecDeleter
385 std::unique_ptr<RDeleter> GetDeleter() const final;
386
387 void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final;
388 void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final;
389
390public:
391 /**
392 Constructor of the field. the \p itemField argument represents the inner
393 item of the on-disk array, i.e. for an `std::array<float>` it is the `float`
394 field and not the `std::array` itself.
395 */
396 RArrayAsRVecField(std::string_view fieldName, std::unique_ptr<RFieldBase> itemField, std::size_t arrayLength);
397 RArrayAsRVecField(const RArrayAsRVecField &other) = delete;
398 RArrayAsRVecField &operator=(const RArrayAsRVecField &other) = delete;
400 RArrayAsRVecField &operator=(RArrayAsRVecField &&other) = default;
401 ~RArrayAsRVecField() final = default;
402
403 std::size_t GetValueSize() const final { return fValueSize; }
404 std::size_t GetAlignment() const final;
405
406 std::vector<RFieldBase::RValue> SplitValue(const RFieldBase::RValue &value) const final;
407 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
408};
409
410} // namespace Experimental
411} // namespace ROOT
412
413#endif
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Definition TError.h:125
#define N
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
char name[80]
Definition TGX11.cxx:110
Abstract base class for classes implementing the visitor design pattern.
std::size_t GetPackedSize(std::size_t nElements=1U) const
RColumnElementBase * GetElement() const
Definition RColumn.hxx:329
void Append(const void *from)
Definition RColumn.hxx:124
void GetCollectionInfo(const NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *collectionSize)
For offset columns only, look at the two adjacent values that define a collection's coordinates.
Definition RColumn.hxx:275
Additional classes related to sequence containers.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
The size of a value of this field, i.e. an RVec.
Definition RField.cxx:3116
std::size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
Definition RField.cxx:3220
std::size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
std::size_t fArrayLength
The size of a child field's item.
std::size_t fValueSize
The length of the arrays in this field.
std::unique_ptr< RDeleter > GetDeleter() const final
Returns an RRVecField::RRVecDeleter.
Definition RField.cxx:3173
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
Definition RField.cxx:3122
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
Definition RField.cxx:3238
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponsing to the field type ...
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
Definition RField.cxx:3182
std::size_t fItemSize
Sub field deleter or nullptr for simple fields.
void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final
Definition RField.cxx:3199
std::vector< RFieldBase::RValue > SplitValue(const RFieldBase::RValue &value) const final
Creates the list of direct child values given a value for this field.
Definition RField.cxx:3226
void operator()(void *objPtr, bool dtorOnly) final
Definition RField.cxx:3063
RArrayDeleter(std::size_t itemSize, std::size_t arrayLength, std::unique_ptr< RDeleter > itemDeleter)
Template specializations for C++ std::array and C-style arrays.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
Definition RField.cxx:3081
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
Definition RField.cxx:3025
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
Definition RField.cxx:3093
void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final
Definition RField.cxx:3043
std::unique_ptr< RDeleter > GetDeleter() const final
Definition RField.cxx:3073
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
Definition RField.cxx:3019
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
Definition RField.cxx:3035
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
Definition RField.cxx:3052
size_t GetValueSize() const override
The number of bytes taken by a value of the appropriate type.
Definition RField.cxx:1880
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
Definition RField.cxx:1806
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
Definition RField.cxx:1815
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
Definition RField.cxx:1799
void AcceptVisitor(Detail::RFieldVisitor &visitor) const override
Definition RField.cxx:1895
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
Definition RField.hxx:150
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
Definition RField.cxx:1868
std::unique_ptr< RDeleter > GetDeleter() const final
Definition RField.hxx:135
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
Some fields have multiple possible column representations, e.g.
A functor to release the memory acquired by CreateValue (memory and constructor).
Points to an object with RNTuple I/O support and keeps a pointer to the corresponding field.
A field translates read and write calls from/to underlying columns to/from tree values.
virtual void GenerateColumns()
Implementations in derived classes should create the backing columns corresponsing to the field type ...
const std::string & GetFieldName() const
static std::size_t CallAppendOn(RFieldBase &other, const void *from)
Allow derived classes to call Append and Read on other (sub) fields.
static void CallReadOn(RFieldBase &other, RClusterIndex clusterIndex, void *to)
std::vector< std::unique_ptr< RFieldBase > > fSubFields
Collections and classes own sub fields.
Internal::RColumn * fPrincipalColumn
All fields that have columns have a distinct main column.
virtual const RColumnRepresentations & GetColumnRepresentations() const
Implementations in derived classes should return a static RColumnRepresentations object.
Definition RField.cxx:920
RField & operator=(RField &&other)=default
RField(RField &&other)=default
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
RField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField)
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
Classes with dictionaries that can be inspected by TClass.
Definition RField.hxx:238
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
Definition RField.hxx:240
RField & operator=(RField &&other)=default
static std::string TypeName()
Definition RField.hxx:251
~RField() override=default
The on-storage meta-data of an ntuple.
the RRVecDeleter is also used by RArrayAsRVecField and therefore declared public
void operator()(void *objPtr, bool dtorOnly) final
Definition RField.cxx:2876
RRVecDeleter(std::size_t itemAlignment, std::size_t itemSize, std::unique_ptr< RDeleter > itemDeleter)
Template specializations for ROOT's RVec.
void GetCollectionInfo(RClusterIndex clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
Definition RField.cxx:2683
std::unique_ptr< RDeleter > fItemDeleter
std::unique_ptr< RDeleter > GetDeleter() const override
Definition RField.cxx:2891
RRVecField(RRVecField &&)=default
~RRVecField() override=default
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
Definition RField.cxx:2867
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
Definition RField.cxx:2922
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
Definition RField.cxx:2899
size_t GetAlignment() const override
As a rule of thumb, the alignment is equal to the size of the type.
Definition RField.cxx:2917
RRVecField(const RRVecField &)=delete
RRVecField & operator=(RRVecField &&)=default
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponsing to the field type ...
Definition RField.cxx:2857
size_t GetValueSize() const override
The number of bytes taken by a value of the appropriate type.
Definition RField.cxx:2912
RRVecField & operator=(RRVecField &)=delete
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
Definition RField.cxx:2849
std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec) final
General implementation of bulk read.
Definition RField.cxx:2783
void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
std::size_t AppendImpl(const void *from) override
Operations on values of complex types, e.g.
Definition RField.cxx:2689
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) override
Definition RField.cxx:2709
RVectorDeleter(std::size_t itemSize, std::unique_ptr< RDeleter > itemDeleter)
void operator()(void *objPtr, bool dtorOnly) final
Definition RField.cxx:2627
Template specializations for C++ std::vector.
static std::unique_ptr< RVectorField > CreateUntyped(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField)
Definition RField.cxx:2537
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
Definition RField.cxx:2543
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
Definition RField.cxx:2649
~RVectorField() override=default
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
Definition RField.cxx:2663
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
Definition RField.cxx:2550
size_t GetValueSize() const override
The number of bytes taken by a value of the appropriate type.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponsing to the field type ...
Definition RField.cxx:2617
std::unique_ptr< RDeleter > GetDeleter() const final
Definition RField.cxx:2641
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
Definition RField.cxx:2609
void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
RVectorField & operator=(RVectorField &&other)=default
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
void GetCollectionInfo(RClusterIndex clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
Definition RField.cxx:2571
RVectorField(RVectorField &&other)=default
A "std::vector"-like collection of values implementing handy operation to analyse them.
Definition RVec.hxx:1529
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
RClusterSize ClusterSize_t
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Wrap the integer in a struct in order to avoid template specialization clash with std::uint64_t.