34 class TBasket :
public TKey {
38 TBasket(
const TBasket&);
39 TBasket& operator=(
const TBasket&);
42 Int_t ReadBasketBuffersUnzip(
char*, Int_t, Bool_t, TFile*);
43 Int_t ReadBasketBuffersUncompressedCase();
46 void InitializeCompressedBuffer(Int_t len, TFile* file);
49 void ResetEntryOffset();
52 Int_t *GetCalculatedEntryOffset();
55 Bool_t CanGenerateOffsetArray();
59 void AdoptBuffer(TBuffer *user_buffer);
66 Bool_t fHeaderOnly{kFALSE};
68 Bool_t fOwnsCompressedBuffer{kFALSE};
69 Bool_t fReadEntryOffset{kFALSE};
70 Int_t *fDisplacement{
nullptr};
71 Int_t *fEntryOffset{
nullptr};
73 TBranch *fBranch{
nullptr};
74 TBuffer *fCompressedBufferRef{
nullptr};
75 Int_t fLastWriteBufferSize[3] = {0,0,0};
76 Bool_t fResetAllocation{
false};
77 UChar_t fNextBufferSizeRecord{0};
78 #ifdef R__TRACK_BASKET_ALLOC_TIME
79 ULong64_t fResetAllocationTime{0};
95 enum class EIOBits : Char_t {
98 kGenerateOffsetMap = BIT(0),
100 kSupported = kGenerateOffsetMap
107 enum class EUnsupportedIOBits : Char_t { kUnsupported = 0 };
109 static constexpr
int kIOBitCount = 1;
112 TBasket(TDirectory *motherDir);
113 TBasket(
const char *name,
const char *title, TBranch *branch);
116 virtual void AdjustSize(Int_t newsize);
117 virtual void DeleteEntryOffset();
118 virtual Int_t DropBuffers();
119 TBranch *GetBranch()
const {
return fBranch;}
120 Int_t GetBufferSize()
const {
return fBufferSize;}
121 Int_t *GetDisplacement()
const {
return fDisplacement;}
122 Int_t *GetEntryOffset()
124 return R__likely(fEntryOffset != reinterpret_cast<Int_t *>(-1)) ? fEntryOffset : GetCalculatedEntryOffset();
126 Int_t GetEntryPointer(Int_t Entry);
127 Int_t GetNevBuf()
const {
return fNevBuf;}
128 Int_t GetNevBufSize()
const {
return fNevBufSize;}
129 Int_t GetLast()
const {
return fLast;}
130 virtual void MoveEntries(Int_t dentries);
131 virtual void PrepareBasket(Long64_t ) {};
132 Int_t ReadBasketBuffers(Long64_t pos, Int_t len, TFile *file);
133 Int_t ReadBasketBytes(Long64_t pos, TFile *file);
134 virtual void Reset();
137 #ifdef R__TRACK_BASKET_ALLOC_TIME
138 ULong64_t GetResetAllocationTime()
const {
return fResetAllocationTime; }
141 Bool_t GetResetAllocationCount()
const {
return fResetAllocation; }
143 Int_t LoadBasketBuffers(Long64_t pos, Int_t len, TFile *file, TTree *tree = 0);
144 Long64_t CopyTo(TFile *to);
146 void SetBranch(TBranch *branch) { fBranch = branch; }
147 void SetNevBufSize(Int_t n) { fNevBufSize=n; }
148 virtual void SetReadMode();
149 virtual void SetWriteMode();
150 inline void Update(Int_t newlast) { Update(newlast,newlast); };
151 virtual void Update(Int_t newlast, Int_t skipped);
152 virtual Int_t WriteBuffer();
154 ClassDef(TBasket, 3);