Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TTreeCacheUnzip::UnzipState Struct Reference

Definition at line 47 of file TTreeCacheUnzip.h.

Public Member Functions

 UnzipState ()
 
 ~UnzipState ()
 
void Clear (Int_t size)
 Clear all baskets' state arrays.
 
bool IsFinished (Int_t index) const
 
bool IsProgress (Int_t index) const
 
bool IsUntouched (Int_t index) const
 
bool IsUnzipped (Int_t index) const
 Check if the basket is unzipped already.
 
void Reset (Int_t oldSize, Int_t newSize)
 Reset all baskets' state arrays.
 
void SetFinished (Int_t index)
 Set cache as finished.
 
void SetMissed (Int_t index)
 
void SetProgress (Int_t index)
 
void SetUntouched (Int_t index)
 
void SetUnzipped (Int_t index, char *buf, Int_t len)
 
bool TryUnzipping (Int_t index)
 Start unzipping the basket if it is untouched yet.
 

Public Attributes

std::unique_ptr< char[]> * fUnzipChunks
 ! [fNseek] Individual unzipped chunks. Their summed size is kept under control.
 
std::vector< Int_tfUnzipLen
 ! [fNseek] Length of the unzipped buffers
 
std::atomic< Byte_t > * fUnzipStatus
 ! [fNSeek]
 

#include <TTreeCacheUnzip.h>

Constructor & Destructor Documentation

◆ UnzipState()

TTreeCacheUnzip::UnzipState::UnzipState ( )
inline

Definition at line 55 of file TTreeCacheUnzip.h.

◆ ~UnzipState()

TTreeCacheUnzip::UnzipState::~UnzipState ( )
inline

Definition at line 59 of file TTreeCacheUnzip.h.

Member Function Documentation

◆ Clear()

void TTreeCacheUnzip::UnzipState::Clear ( Int_t  size)

Clear all baskets' state arrays.

Definition at line 53 of file TTreeCacheUnzip.cxx.

◆ IsFinished()

bool TTreeCacheUnzip::UnzipState::IsFinished ( Int_t  index) const

Definition at line 77 of file TTreeCacheUnzip.cxx.

◆ IsProgress()

bool TTreeCacheUnzip::UnzipState::IsProgress ( Int_t  index) const

Definition at line 71 of file TTreeCacheUnzip.cxx.

◆ IsUntouched()

bool TTreeCacheUnzip::UnzipState::IsUntouched ( Int_t  index) const

Definition at line 65 of file TTreeCacheUnzip.cxx.

◆ IsUnzipped()

bool TTreeCacheUnzip::UnzipState::IsUnzipped ( Int_t  index) const

Check if the basket is unzipped already.

We must make sure the length in fUnzipLen is larger than 0.

Definition at line 85 of file TTreeCacheUnzip.cxx.

◆ Reset()

void TTreeCacheUnzip::UnzipState::Reset ( Int_t  oldSize,
Int_t  newSize 
)

Reset all baskets' state arrays.

This function is only called by main thread and parallel processing from upper layers should be disabled such as IMT in TTree::GetEntry(). Other threads should not call this function since it is not thread-safe.

Definition at line 95 of file TTreeCacheUnzip.cxx.

◆ SetFinished()

void TTreeCacheUnzip::UnzipState::SetFinished ( Int_t  index)

Set cache as finished.

There are three scenarios that a basket is set as finished:

  1. The basket has already been unzipped.
  2. The thread is aborted from unzipping process.
  3. To avoid other tasks/threads work on this basket, main thread marks the basket as finished and designates itself to unzip this basket.

Definition at line 126 of file TTreeCacheUnzip.cxx.

◆ SetMissed()

void TTreeCacheUnzip::UnzipState::SetMissed ( Int_t  index)

Definition at line 134 of file TTreeCacheUnzip.cxx.

◆ SetProgress()

void TTreeCacheUnzip::UnzipState::SetProgress ( Int_t  index)

◆ SetUntouched()

void TTreeCacheUnzip::UnzipState::SetUntouched ( Int_t  index)

◆ SetUnzipped()

void TTreeCacheUnzip::UnzipState::SetUnzipped ( Int_t  index,
char *  buf,
Int_t  len 
)

Definition at line 141 of file TTreeCacheUnzip.cxx.

◆ TryUnzipping()

bool TTreeCacheUnzip::UnzipState::TryUnzipping ( Int_t  index)

Start unzipping the basket if it is untouched yet.

Definition at line 151 of file TTreeCacheUnzip.cxx.

Member Data Documentation

◆ fUnzipChunks

std::unique_ptr<char[]>* TTreeCacheUnzip::UnzipState::fUnzipChunks

! [fNseek] Individual unzipped chunks. Their summed size is kept under control.

Definition at line 51 of file TTreeCacheUnzip.h.

◆ fUnzipLen

std::vector<Int_t> TTreeCacheUnzip::UnzipState::fUnzipLen

! [fNseek] Length of the unzipped buffers

Definition at line 52 of file TTreeCacheUnzip.h.

◆ fUnzipStatus

std::atomic<Byte_t>* TTreeCacheUnzip::UnzipState::fUnzipStatus

! [fNSeek]

Definition at line 53 of file TTreeCacheUnzip.h.

Collaboration diagram for TTreeCacheUnzip::UnzipState:
[legend]

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