|
ROOT
Reference Guide |
|
Go to the documentation of this file.
36 namespace Experimental {
94 std::unique_ptr<Detail::RPageStorage::RTaskScheduler>
fUnzipTasks;
96 std::unique_ptr<Detail::RPageSource>
fSource;
98 std::unique_ptr<RNTupleModel>
fModel;
107 void InitPageSource();
135 static std::unique_ptr<RNTupleReader> Open(std::unique_ptr<RNTupleModel>
model,
144 RNTupleReader(std::unique_ptr<RNTupleModel>
model, std::unique_ptr<Detail::RPageSource> source);
146 explicit RNTupleReader(std::unique_ptr<Detail::RPageSource> source);
147 std::unique_ptr<RNTupleReader>
Clone() {
return std::make_unique<RNTupleReader>(fSource->Clone()); }
161 std::ostream &
output = std::cout);
170 fModel = fSource->GetDescriptor().GenerateModel();
171 ConnectModel(*fModel);
174 for (
auto& value : entry) {
175 value.GetField()->Read(index, &value);
184 template <
typename T>
186 auto fieldId = fSource->GetDescriptor().FindFieldId(fieldName);
190 auto fieldId = fSource->GetDescriptor().FindFieldId(fieldName);
216 std::unique_ptr<Detail::RPageSink>
fSink;
224 static std::unique_ptr<RNTupleWriter> Recreate(std::unique_ptr<RNTupleModel>
model,
228 static std::unique_ptr<RNTupleWriter> Append(std::unique_ptr<RNTupleModel>
model,
232 RNTupleWriter(std::unique_ptr<RNTupleModel>
model, std::unique_ptr<Detail::RPageSink> sink);
242 for (
auto& value : entry) {
243 value.GetField()->Append(value);
246 if ((fNEntries % fClusterSizeEntries) == 0)
250 void CommitCluster();
276 for (
auto& treeValue : *entry) {
277 treeValue.GetField()->Append(treeValue);
Common user-tunable settings for storing ntuples.
A virtual ntuple for collections that can be used to some extent like a real ntuple.
void Fill(REntry &entry)
Multiple entries can have been instantiated from the tnuple model.
ENTupleInfo
Listing of the different options that can be printed by RNTupleReader::GetInfo()
RNTupleView< T > GetView(std::string_view fieldName)
Provides access to an individual field that can contain either a scalar value or a collection,...
void LoadEntry(NTupleSize_t index, REntry &entry)
Fills a user provided entry after checking that the entry has been instantiated from the ntuple model...
RCollectionNTuple(const RCollectionNTuple &)=delete
A collection of Counter objects with a name, a unit, and a description.
The interface of a task scheduler to schedule page (de)compression tasks.
void Reset() final
Start a new set of tasks.
RNTupleGlobalRange GetEntryRange()
std::unique_ptr< RNTupleModel > fModel
Needs to be destructed before fSink.
RNTupleWriter & operator=(const RNTupleWriter &)=delete
RCollectionNTuple & operator=(const RCollectionNTuple &)=delete
~RCollectionNTuple()=default
void Fill()
The simplest user interface if the default entry that comes with the ntuple model is used.
NTupleSize_t fLastCommitted
ENTupleShowFormat
Listing of the different entry output formats of RNTupleReader::Show()
static void output(int code)
basic_string_view< char > string_view
std::unique_ptr< RNTupleModel > fModel
Needs to be destructed before fSource.
NTupleSize_t GetNEntries() const
void LoadEntry(NTupleSize_t index)
Analogous to Fill(), fills the default entry of the model.
void Wait() final
Blocks until all scheduled tasks finished.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Common user-tunable settings for reading ntuples.
const RNTupleDescriptor & GetDescriptor() const
std::unique_ptr< Detail::RPageSink > fSink
An RNTupleView provides read-only access to a single field of the ntuple.
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
std::forward_iterator_tag iterator_category
NTupleSize_t fClusterSizeEntries
bool operator==(const iterator &rh) const
The on-storage meta-data of an ntuple.
std::unique_ptr< REntry > fDefaultEntry
RIterator(NTupleSize_t index)
constexpr NTupleSize_t kInvalidNTupleIndex
An RNTuple that gets filled with entries (data) and writes them to storage.
A view for a collection, that can itself generate new ntuple views for its nested fields.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
#define R__unlikely(expr)
The RNTupleModel encapulates the schema of an ntuple.
virtual ~RNTupleImtTaskScheduler()=default
ClusterSize_t * GetOffsetPtr()
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
std::unique_ptr< Detail::RPageSource > fSource
Used to loop over indexes (entries or collections) between start and end.
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...
RNTupleWriter(const RNTupleWriter &)=delete
std::unique_ptr< TTaskGroup > fTaskGroup
Detail::RNTupleMetrics fMetrics
std::unique_ptr< RNTupleReader > Clone()
std::unique_ptr< RNTupleReader > fDisplayReader
We use a dedicated on-demand reader for Show() and Scan().
bool operator!=(const iterator &rh) const
std::unique_ptr< Detail::RPageStorage::RTaskScheduler > fUnzipTasks
Set as the page source's scheduler for parallel page decompression if IMT is on Needs to be destructe...
REveVectorT< TT > operator*(const REveVectorT< TT > &a, TT b)
RNTupleViewCollection GetViewCollection(std::string_view fieldName)
const Detail::RNTupleMetrics & GetMetrics() const
void AddTask(const std::function< void(void)> &taskFunc) final
Take a callable that represents a task.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
NTupleSize_t difference_type
An RNTuple that is used to read data from storage.