#ifndef ROOT_TTreeCacheUnzip
#define ROOT_TTreeCacheUnzip
#ifndef ROOT_TTreeCache
#include "TTreeCache.h"
#endif
class TTree;
class TBranch;
class TThread;
class TCondition;
class TBasket;
class TMutex;
class TTreeCacheUnzip : public TTreeCache {
public:
enum EParUnzipMode { kEnable, kDisable, kForce };
protected:
TMutex *fMutexCache;
TThread *fUnzipThread;
Bool_t fActiveThread;
TCondition *fUnzipCondition;
Bool_t fNewTransfer;
Bool_t fParallel;
TMutex *fMutexBuffer;
TMutex *fMutexList;
Int_t fTmpBufferSz;
char *fTmpBuffer;
static TTreeCacheUnzip::EParUnzipMode fgParallel;
Long64_t fPosWrite;
Int_t *fUnzipLen;
Int_t *fUnzipPos;
Int_t fNseekMax;
Long64_t fUnzipBufferSize;
char *fUnzipBuffer;
Bool_t fSkipZip;
static Double_t fgRelBuffSize;
Int_t fUnzipStart;
Int_t fUnzipEnd;
Int_t fUnzipNext;
Int_t fNUnzip;
Int_t fNFound;
Int_t fNMissed;
private:
TTreeCacheUnzip(const TTreeCacheUnzip &);
TTreeCacheUnzip& operator=(const TTreeCacheUnzip &);
void Init();
Int_t StartThreadUnzip();
Int_t StopThreadUnzip();
public:
TTreeCacheUnzip();
TTreeCacheUnzip(TTree *tree, Int_t buffersize=0);
virtual ~TTreeCacheUnzip();
virtual void AddBranch(TBranch *b, Bool_t subbranches = kFALSE);
virtual void AddBranch(const char *branch, Bool_t subbranches = kFALSE);
Bool_t FillBuffer();
void SetEntryRange(Long64_t emin, Long64_t emax);
virtual void StopLearningPhase();
void UpdateBranches(TTree *tree, Bool_t owner = kFALSE);
static EParUnzipMode GetParallelUnzip();
static Bool_t IsParallelUnzip();
Bool_t IsActiveThread();
Bool_t IsQueueEmpty();
Int_t ProcessQueue();
void SendSignal();
static Int_t SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option = TTreeCacheUnzip::kEnable);
void WaitForSignal();
Int_t GetRecordHeader(char *buf, Int_t maxbytes, Int_t &nbytes, Int_t &objlen, Int_t &keylen);
virtual Bool_t GetSkipZip() { return fSkipZip; }
virtual void ResetCache();
Int_t GetUnzipBuffer(char **buf, Long64_t pos, Int_t len, Bool_t *free);
void SetUnzipBufferSize(Long64_t bufferSize);
virtual void SetSkipZip(Bool_t skip = kTRUE) { fSkipZip = skip; }
Int_t UnzipBuffer(char **dest, char *src);
Int_t UnzipCache();
Int_t GetNUnzip() { return fNUnzip; }
Int_t GetNFound() { return fNFound; }
Int_t GetNMissed(){ return fNMissed; }
static void* UnzipLoop(void *arg);
ClassDef(TTreeCacheUnzip,0)
};
#endif
Last change: Wed Jun 25 08:54:19 2008
Last generated: 2008-06-25 08:54
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.