26constexpr char const *kFileName =
"ntpl016_streaming_vector.root";
28constexpr char const *
kFieldName =
"LargeVector";
40 auto prng = std::make_unique<TRandom3>();
49 std::cout <<
"RNTuple written" << std::endl;
62 std::cout <<
"Simple reading, found " <<
nEntries <<
" entries" << std::endl;
73 std::cout <<
"Size and sum of vector: " <<
vectorSize <<
" " <<
sum << std::endl;
75 std::cout <<
"RNTuple simple read" << std::endl;
115 using iterator = Iterator;
116 using iterator_category = std::input_iterator_tag;
117 using value_type = T;
118 using pointer =
const T *;
119 using reference =
const T &;
126 iterator operator++(
int)
132 iterator &operator++()
137 reference
operator*() {
return fView.operator()(*fRangeItr); }
138 pointer operator->() {
return &fView.operator()(*fRangeItr); }
151 Iterator begin() {
return Iterator(fRange.begin(),
fItemView); }
173 std::cout <<
"Streamed reading, found " <<
nEntries <<
" entries" << std::endl;
189 std::cout <<
"Size and sum of vector: " <<
vectorSize <<
" " <<
sum << std::endl;
191 std::cout <<
"RNTuple streaming read" << std::endl;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
Bool_t operator==(const TDatime &d1, const TDatime &d2)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
TTime operator*(const TTime &t1, const TTime &t2)
A view for a collection, that can itself generate new ntuple views for its nested fields.
Used to loop over entries of collections in a single cluster.
static std::unique_ptr< RNTupleModel > Create()
Common user-tunable settings for reading RNTuples.
void SetClusterCache(EClusterCache val)
static std::unique_ptr< RNTupleReader > Open(std::string_view ntupleName, std::string_view storage, const ROOT::RNTupleReadOptions &options=ROOT::RNTupleReadOptions())
Open an RNTuple for reading.
An RNTupleView for a known type.
static std::unique_ptr< RNTupleWriter > Recreate(std::unique_ptr< ROOT::RNTupleModel > model, std::string_view ntupleName, std::string_view storage, const ROOT::RNTupleWriteOptions &options=ROOT::RNTupleWriteOptions())
Creates an RNTupleWriter backed by storage, overwriting it if one with the same URI exists.
constexpr NTupleSize_t kInvalidNTupleIndex
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr DescriptorId_t kInvalidDescriptorId
static uint64_t sum(uint64_t i)