|
ROOT
Reference Guide |
|
Go to the documentation of this file.
16 #ifndef ROOT7_RNTupleView
17 #define ROOT7_RNTupleView
25 #include <type_traits>
27 #include <unordered_map>
30 namespace Experimental {
119 template <
class FieldT>
125 template<
class C,
typename ... ArgsT>
126 using MapOverloadT = decltype(std::declval<C>().
Map(std::declval<ArgsT>() ...)) (
C::*)(ArgsT ...);
151 template <
typename T>
165 :
fField(pageSource->GetDescriptor().GetFieldDescriptor(fieldId).GetFieldName()),
fValue(
fField.GenerateValue())
179 template <
typename C = T>
180 typename std::enable_if_t<Internal::IsMappable<FieldT>::value,
const C&>
183 template <
typename C = T>
184 typename std::enable_if_t<!Internal::IsMappable<FieldT>::value,
const C&>
190 template <
typename C = T>
191 typename std::enable_if_t<Internal::IsMappable<FieldT>::value,
const C&>
194 template <
typename C = T>
195 typename std::enable_if_t<!Internal::IsMappable<FieldT>::value,
const C&>
245 template <
typename T>
static RFailure Test(...)
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C & > operator()(const RClusterIndex &clusterIndex)
RNTupleView & operator=(const RNTupleView &other)=delete
RNTupleClusterRange(DescriptorId_t clusterId, ClusterSize_t::ValueType start, ClusterSize_t::ValueType end)
bool operator!=(const iterator &rh) const
static void ConnectRecursively(DescriptorId_t fieldId, RPageSource &pageSource, RFieldBase &field)
Connect the field columns and all sub field columns.
friend class RNTupleViewCollection
const ClusterSize_t::ValueType fStart
std::enable_if_t< Internal::IsMappable< FieldT >::value, const C & > operator()(NTupleSize_t globalIndex)
~RNTupleViewCollection()=default
RNTupleViewCollection GetViewCollection(std::string_view fieldName)
RNTupleView(const RNTupleView &other)=delete
NTupleSize_t GetNElements() const
static RSuccess Test(MapOverloadT< C, NTupleSize_t >)
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
RNTupleClusterRange GetCollectionRange(NTupleSize_t globalIndex)
basic_string_view< char > string_view
bool operator==(const iterator &rh) 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.
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
ClusterSize_t operator()(NTupleSize_t globalIndex)
RIterator(NTupleSize_t index)
An RNTupleView provides read-only access to a single field of the ntuple.
RNTupleViewCollection & operator=(RNTupleViewCollection &&other)=default
RNTupleViewCollection & operator=(const RNTupleViewCollection &other)=delete
const NTupleSize_t fStart
Used to loop over entries of collections in a single cluster.
ClusterSize_t::ValueType GetIndex() const
RNTupleView & operator=(RNTupleView &&other)=default
RNTupleViewCollection(const RNTupleViewCollection &other)=delete
RNTupleView< T > GetView(std::string_view fieldName)
FieldT fField
fFieldId has fParent always set to null; views access nested fields without looking at the parent
static constexpr bool value
const ClusterSize_t::ValueType fEnd
constexpr NTupleSize_t kInvalidNTupleIndex
DescriptorId_t GetClusterId() const
A view for a collection, that can itself generate new ntuple views for its nested fields.
DescriptorId_t FindFieldId(std::string_view fieldName, DescriptorId_t parentId) const
decltype(std::declval< C >().Map(std::declval< ArgsT >() ...))(C::*)(ArgsT ...) MapOverloadT
const RNTupleDescriptor & GetDescriptor() const
RNTupleView(DescriptorId_t fieldId, Detail::RPageSource *pageSource)
NTupleSize_t difference_type
RNTupleGlobalRange GetFieldRange() const
std::forward_iterator_tag iterator_category
Used to loop over indexes (entries or collections) between start and end.
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...
bool operator!=(const iterator &rh) const
Template specializations for concrete C++ types.
RNTupleViewCollection(DescriptorId_t fieldId, Detail::RPageSource *source)
Detail::RFieldValue fValue
Used as a Read() destination for fields that are not mappable.
const DescriptorId_t fClusterId
std::enable_if_t<!Internal::IsMappable< FieldT >::value, const C & > operator()(NTupleSize_t globalIndex)
std::enable_if_t<!Internal::IsMappable< FieldT >::value, const C & > operator()(const RClusterIndex &clusterIndex)
RIterator(const RClusterIndex &index)
RNTupleView(RNTupleView &&other)=default
RNTupleViewCollection(RNTupleViewCollection &&other)=default
std::forward_iterator_tag iterator_category
ClusterSize_t operator()(const RClusterIndex &clusterIndex)
void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size)
Special help for offset fields.
Detail::RPageSource * fSource
void Read(NTupleSize_t globalIndex, RFieldValue *value)
Populate a single value with data from the tree, which needs to be of the fitting type.
DescriptorId_t fCollectionFieldId
bool operator==(const iterator &rh) const
RNTupleClusterRange GetCollectionRange(const RClusterIndex &clusterIndex)
auto Map(Args &&... args) -> decltype(ROOT::Detail::VecOps::MapFromTuple(std::forward_as_tuple(args...), std::make_index_sequence< sizeof...(args) - 1 >()))
Create new collection applying a callable to the elements of the input collection.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
RNTupleGlobalRange(NTupleSize_t start, NTupleSize_t end)
An RNTuple that is used to read data from storage.