|
ROOT
Reference Guide |
|
Go to the documentation of this file.
30 namespace Experimental {
69 template <
typename CppT, EColumnType ColumnT>
97 for (
unsigned i = 0; i < count; ++i) {
139 ReadV(globalIndex + nBatch, count - nBatch, &elemTail);
161 template <
typename CppT, EColumnType ColumnT>
166 return reinterpret_cast<CppT*
>(
171 template <
typename CppT, EColumnType ColumnT>
176 return reinterpret_cast<CppT*
>(
199 auto idxStart = (globalIndex == 0) ? 0 : *Map<ClusterSize_t, EColumnType::kIndex>(globalIndex - 1);
200 auto idxEnd = *Map<ClusterSize_t, EColumnType::kIndex>(globalIndex);
202 if (globalIndex == selfOffset) {
206 *collectionSize = idxEnd - idxStart;
213 auto index = clusterIndex.
GetIndex();
214 auto idxStart = (index == 0) ? 0 : *Map<ClusterSize_t, EColumnType::kIndex>(clusterIndex - 1);
215 auto idxEnd = *Map<ClusterSize_t, EColumnType::kIndex>(clusterIndex);
216 *collectionSize = idxEnd - idxStart;
222 auto varSwitch = Map<RColumnSwitch, EColumnType::kSwitch>(globalIndex);
224 *tag = varSwitch->GetTag();
RClusterIndex GetClusterIndex(NTupleSize_t globalIndex)
static RColumn * Create(const RColumnModel &model, std::uint32_t index)
RPage fCurrentPage
The currently mapped page for reading.
void Connect(DescriptorId_t fieldId, RPageStorage *pageStorage)
const RColumnModel & GetModel() const
RPageStorage::ColumnHandle_t fHandleSource
A page is a slice of a column that is mapped into memory.
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.
CppT * Map(const NTupleSize_t globalIndex)
void * TryGrow(ClusterSize_t::ValueType nElements)
Return a pointer after the last element that has space for nElements new elements.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
Common functionality of an ntuple storage for both reading and writing.
std::size_t GetSize() const
std::uint32_t fIndex
Columns belonging to the same field are distinguished by their order.
std::uint32_t GetIndex() const
NTupleSize_t GetNElements() const
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Abstract interface to read data from an ntuple.
NTupleSize_t GetId() const
RPageStorage::ColumnHandle_t fHandleSink
ColumnId_t GetColumnIdSource() const
void GetSwitchInfo(NTupleSize_t globalIndex, RClusterIndex *varIndex, std::uint32_t *tag)
Get the currently active cluster id.
void AppendV(const RColumnElementBase &elemArray, std::size_t count)
void Append(const RColumnElementBase &element)
ClusterSize_t::ValueType GetIndex() const
RColumn & operator=(const RColumn &)=delete
void ReadV(const NTupleSize_t globalIndex, const ClusterSize_t::ValueType count, RColumnElementBase *elemArray)
For forward and backward compatibility, attach version information to the consitituents of the file f...
NTupleSize_t GetGlobalIndex(const RClusterIndex &clusterIndex)
const RClusterInfo & GetClusterInfo() const
NTupleSize_t fNElements
The number of elements written resp. available in the column.
Pairs of C++ type and column type, like float and EColumnType::kReal32.
std::unique_ptr< RColumnElementBase > fElement
Used to pack and unpack pages on writing/reading.
RNTupleVersion GetVersion() const
NTupleSize_t GetGlobalRangeFirst() const
void Read(const RClusterIndex &clusterIndex, RColumnElementBase *element)
DescriptorId_t GetClusterId() const
void ReadFrom(void *source, std::size_t count)
Set the column element or an array of elements from the memory location source.
ColumnId_t fColumnIdSource
The column id is used to find matching pages with content when reading.
RColumn(const RColumnModel &model, std::uint32_t index)
ClusterSize_t::ValueType GetClusterRangeLast() const
Holds the static meta-data of a column in a tree.
Abstract interface to write data into an ntuple.
bool Contains(NTupleSize_t globalIndex) const
NTupleSize_t GetIndexOffset() const
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...
RPageStorage::ColumnHandle_t GetHandleSource() const
NTupleSize_t GetGlobalRangeLast() const
void MapPage(const NTupleSize_t index)
RPageSource * GetPageSource() const
ClusterSize_t::ValueType GetClusterRangeFirst() const
void Read(const NTupleSize_t globalIndex, RColumnElementBase *element)
RPage fHeadPage
Open page into which new elements are being written.
RPageStorage::ColumnHandle_t GetHandleSink() const
RColumnElementBase * GetElement() const
ClusterSize_t::ValueType GetNElements() const
RColumn(const RColumn &)=delete
std::int64_t ColumnId_t
Uniquely identifies a physical column within the scope of the current process, used to tag pages.
CppT * Map(const RClusterIndex &clusterIndex)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
void WriteTo(void *destination, std::size_t count) const
Write one or multiple column elements into destination.
void GetCollectionInfo(const RClusterIndex &clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *collectionSize)
void ReadV(const RClusterIndex &clusterIndex, const ClusterSize_t::ValueType count, RColumnElementBase *elemArray)
RPageSource * fPageSource