![]() |
Project
|
#include <ReadPlan.h>
Public Member Functions | |
| ReadPlan (std::shared_ptr< ByteSource > source, Options const &options, std::shared_ptr< ReadBufferPool > pool=nullptr) | |
| Without a pool, the plan allocates its own buffers. | |
| ~ReadPlan () | |
| ReadPlan (ReadPlan const &)=delete | |
| ReadPlan & | operator= (ReadPlan const &)=delete |
| void | add (uint64_t offset, size_t length) |
| void | add (TreeInfo const &tree) |
| Registers every basket of tree which is not embedded in its TBranch. | |
| std::span< const uint8_t > | find (uint64_t offset, size_t length) |
| void | fetch () |
| Fetches the pending ranges now, rather than on the first find(). | |
| size_t | bytesHeld () const |
The baskets of the trees a DF is read from, fetched in as few reads as possible: ranges are registered first, and the first lookup of one which is not in memory yet fetches every pending range, merging those closer than Options::coalesceGap. The fetched bytes are held until the plan goes away.
Definition at line 49 of file ReadPlan.h.
| o2::aod::native::ReadPlan::ReadPlan | ( | std::shared_ptr< ByteSource > | source, |
| Options const & | options, | ||
| std::shared_ptr< ReadBufferPool > | pool = nullptr |
||
| ) |
Without a pool, the plan allocates its own buffers.
Definition at line 50 of file ReadPlan.cxx.
| o2::aod::native::ReadPlan::~ReadPlan | ( | ) |
Definition at line 55 of file ReadPlan.cxx.
|
delete |
Registers every basket of tree which is not embedded in its TBranch.
Definition at line 72 of file ReadPlan.cxx.
| void o2::aod::native::ReadPlan::add | ( | uint64_t | offset, |
| size_t | length | ||
| ) |
Definition at line 62 of file ReadPlan.cxx.
| size_t o2::aod::native::ReadPlan::bytesHeld | ( | ) | const |
Definition at line 162 of file ReadPlan.cxx.
| void o2::aod::native::ReadPlan::fetch | ( | ) |
Fetches the pending ranges now, rather than on the first find().
Definition at line 154 of file ReadPlan.cxx.
| std::span< const uint8_t > o2::aod::native::ReadPlan::find | ( | uint64_t | offset, |
| size_t | length | ||
| ) |
The bytes of [offset, offset + length), if a registered range covers them, fetching the pending ranges first if needed. Empty otherwise. The span stays valid as long as the plan.
Definition at line 143 of file ReadPlan.cxx.