Project
Loading...
Searching...
No Matches
o2::aod::native::ReadPlan Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ReadPlan() [1/2]

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.

◆ ~ReadPlan()

o2::aod::native::ReadPlan::~ReadPlan ( )

Definition at line 55 of file ReadPlan.cxx.

◆ ReadPlan() [2/2]

o2::aod::native::ReadPlan::ReadPlan ( ReadPlan const &  )
delete

Member Function Documentation

◆ add() [1/2]

void o2::aod::native::ReadPlan::add ( TreeInfo const &  tree)

Registers every basket of tree which is not embedded in its TBranch.

Definition at line 72 of file ReadPlan.cxx.

◆ add() [2/2]

void o2::aod::native::ReadPlan::add ( uint64_t  offset,
size_t  length 
)

Definition at line 62 of file ReadPlan.cxx.

◆ bytesHeld()

size_t o2::aod::native::ReadPlan::bytesHeld ( ) const

Definition at line 162 of file ReadPlan.cxx.

◆ fetch()

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.

◆ find()

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.

◆ operator=()

ReadPlan & o2::aod::native::ReadPlan::operator= ( ReadPlan const &  )
delete

The documentation for this class was generated from the following files: