12 #ifndef ROOT_TTreeCacheUnzip
13 #define ROOT_TTreeCacheUnzip
28 #ifndef ROOT_TTreeCache
TCondition * fUnzipStartCondition
void Print(Option_t *option="") const
Print cache statistics.
void WaitUnzipStartSignal()
Int_t StopThreadUnzip()
To stop the thread we only need to change the value of the variable fActiveThread to false and the lo...
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 blocks that were found in the cache
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.
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.
Byte_t * fUnzipStatus
[fNseek] Individual unzipped chunks. Their summed size is kept under control.
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.
TThread * fUnzipThread[10]
void SetUnzipBufferSize(Long64_t bufferSize)
Sets the size for the unzipping cache...
Int_t fNFound
number of blocks that were unzipped
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...
std::queue< Int_t > fActiveBlks
number of blocks that were not found in the cache and were unzipped
virtual Int_t ReadBufferExt(char *buf, Long64_t pos, Int_t len, Int_t &loc)
static void * UnzipLoop(void *arg)
This is a static function.
#define ClassDef(name, id)
Int_t fNMissed
number of hits which caused a stall
Specialization of TTreeCache for parallel Unzipping.
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...
static Double_t fgRelBuffSize
Max Size for the ready unzipped blocks (default is 2*fBufferSize)
void SendUnzipStartSignal(Bool_t broadcast)
This will send the signal corresponfing to the queue...
virtual ~TTreeCacheUnzip()
Destructor. (in general called by the TFile destructor)
Int_t fNseekMax
The total sum of the currently unzipped blks.
Manages buffers for branches of a Tree.
static EParUnzipMode GetParallelUnzip()
Static function that returns the parallel option (to indicate an additional thread) ...
TTreeCacheUnzip & operator=(const TTreeCacheUnzip &)
Bool_t IsQueueEmpty()
It says if the queue is empty... useful to see if we have to process it.
Long64_t fUnzipBufferSize
fNseek can change so we need to know its max size
TCondition * fUnzipDoneCondition
void Init()
Initialization procedure common to all the constructors.
static void SetUnzipRelBufferSize(Float_t relbufferSize)
static function: Sets the unzip relatibe buffer size
static TTreeCacheUnzip::EParUnzipMode fgParallel
char ** fUnzipChunks
[fNseek] Length of the unzipped buffers
Bool_t IsActiveThread()
This indicates if the thread is active in this moment...
Int_t StartThreadUnzip(Int_t nthreads)
The Thread is only a part of the TTreeCache but it is the part that waits for info in the queue and p...
#define dest(otri, vertexptr)
A TTree object has a header with a name and a title.
A TTree is a list of TBranches.
Long64_t fTotalUnzipBytes
[fNSeek] For each blk, tells us if it's unzipped or pending
Int_t UnzipCache(Int_t &startindex, Int_t &locbuffsz, char *&locbuff)
This inflates all the buffers in the cache.
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...