12 #ifndef ROOT_TTreeCacheUnzip 13 #define ROOT_TTreeCacheUnzip 62 fUnzipChunks =
nullptr;
63 fUnzipStatus =
nullptr;
std::unique_ptr< char[]> * fUnzipChunks
! [fNseek] Individual unzipped chunks. Their summed size is kept under control.
Bool_t IsProgress(Int_t index) const
Int_t fNUnzip
! number of blocks that were unzipped
void SetUnzipGroupSize(Int_t groupSize)
void UpdateBranches(TTree *tree)
update pointer to current Tree and recompute pointers to the branches in the cache ...
virtual void ResetCache()
This will delete the list of buffers that are in the unzipping cache and will reset certain values in...
Int_t fNStalls
! number of hits which caused a stall
Int_t GetRecordHeader(char *buf, Int_t maxbytes, Int_t &nbytes, Int_t &objlen, Int_t &keylen)
Read the logical record header from the buffer buf.
Bool_t TryUnzipping(Int_t index)
Start unzipping the basket if it is untouched yet.
virtual void StopLearningPhase()
It's the same as TTreeCache::StopLearningPhase but we guarantee that we start the unzipping just afte...
A specialized TFileCacheRead object for a TTree.
static Int_t SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option=TTreeCacheUnzip::kEnable)
Static function that (de)activates multithreading unzipping.
virtual Int_t SetBufferSize(Int_t buffersize)
Change the underlying buffer size of the cache.
Bool_t FillBuffer()
Fill the cache buffer with the branches in the cache.
void SetProgress(Int_t index)
void Clear(Int_t size)
Clear all baskets' state arrays.
void SetUnzipBufferSize(Long64_t bufferSize)
Sets the size for the unzipping cache...
Int_t fNFound
! number of blocks that were found in the cache
Bool_t IsUnzipped(Int_t index) const
Check if the basket is unzipped already.
static Bool_t IsParallelUnzip()
Static function that tells wether the multithreading unzipping is activated.
Int_t UnzipBuffer(char **dest, char *src)
Unzips a ROOT specific buffer...
virtual Int_t GetUnzipBuffer(char **buf, Long64_t pos, Int_t len, Bool_t *free)
We try to read a buffer that has already been unzipped Returns -1 in case of read failure...
virtual Int_t ReadBufferExt(char *buf, Long64_t pos, Int_t len, Int_t &loc)
std::unique_ptr< ROOT::Experimental::TTaskGroup > fUnzipTaskGroup
#define ClassDef(name, id)
void SetUnzipped(Int_t index, char *buf, Int_t len)
void SetMissed(Int_t index)
Int_t fNMissed
! number of blocks that were not found in the cache and were unzipped
void Print(Option_t *option="") const
Print cache statistics.
Specialization of TTreeCache for parallel Unzipping.
void Reset(Int_t oldSize, Int_t newSize)
Reset all baskets' state arrays.
Bool_t fParallel
Indicate if we want to activate the parallelism (for this instance)
virtual Int_t AddBranch(TBranch *b, Bool_t subbranches=kFALSE)
Add a branch to the list of branches to be stored in the cache this function is called by TBranch::Ge...
Int_t GetUnzipGroupSize()
static Double_t fgRelBuffSize
This is the percentage of the TTreeCacheUnzip that will be used.
virtual ~TTreeCacheUnzip()
Destructor. (in general called by the TFile destructor)
Int_t CreateTasks()
We create a TTaskGroup and asynchronously maps each group of baskets(> 100 kB in total) to a task...
Int_t fNseekMax
! fNseek can change so we need to know its max size
Bool_t IsUntouched(Int_t index) const
Manages buffers for branches of a Tree.
static EParUnzipMode GetParallelUnzip()
Static function that returns the parallel option (to indicate an additional thread) ...
std::atomic< Byte_t > * fUnzipStatus
! [fNSeek]
TTreeCacheUnzip & operator=(const TTreeCacheUnzip &)
Int_t fUnzipGroupSize
! Min accumulated size of a group of baskets ready to be unzipped by a IMT task
Long64_t fUnzipBufferSize
! Max Size for the ready unzipped blocks (default is 2*fBufferSize)
Bool_t IsFinished(Int_t index) const
void Init()
Initialization procedure common to all the constructors.
static void SetUnzipRelBufferSize(Float_t relbufferSize)
static function: Sets the unzip relatibe buffer size
std::vector< Int_t > fUnzipLen
! [fNseek] Length of the unzipped buffers
static TTreeCacheUnzip::EParUnzipMode fgParallel
Indicate if we want to activate the parallelism.
void SetUntouched(Int_t index)
#define dest(otri, vertexptr)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
A TTree object has a header with a name and a title.
void SetFinished(Int_t index)
Set cache as finished.
A TTree is a list of TBranches.
void SetEntryRange(Long64_t emin, Long64_t emax)
Set the minimum and maximum entry number to be processed this information helps to optimize the numbe...
Int_t UnzipCache(Int_t index)
This inflates a basket in the cache.