12 #ifndef ROOT_TTreeCacheUnzip 13 #define ROOT_TTreeCacheUnzip 28 #ifndef ROOT_TTreeCache TCondition * fUnzipStartCondition
Used to signal the threads to start.
Int_t fNUnzip
! number of blocks that were unzipped
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 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.
virtual void StopLearningPhase()
It's the same as TTreeCache::StopLearningPhase but we guarantee that we start the unzipping just afte...
TMutex * fMutexList
Mutex to protect the various lists. Used by the condvars.
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] For each blk, tells us if it's unzipped or pending
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.
Int_t * fUnzipLen
! [fNseek] Length of the unzipped buffers
TThread * fUnzipThread[10]
void SetUnzipBufferSize(Long64_t bufferSize)
Sets the size for the unzipping cache...
Bool_t fActiveThread
Used to terminate gracefully the unzippers.
Int_t fNFound
! number of blocks that were found in the cache
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
The blocks which are active now.
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 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.
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...
static Double_t fgRelBuffSize
This is the percentage of the TTreeCacheUnzip that will be used.
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
! fNseek can change so we need to know its max size
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
! Max Size for the ready unzipped blocks (default is 2*fBufferSize)
TCondition * fUnzipDoneCondition
Used to wait for an unzip tour to finish. Gives the Async feel.
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
Indicate if we want to activate the parallelism.
char ** fUnzipChunks
! [fNseek] Individual unzipped chunks. Their summed size is kept under control.
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)
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.
A TTree is a list of TBranches.
Long64_t fTotalUnzipBytes
! The total sum of the currently unzipped blks
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...