File indexing completed on 2025-01-18 10:11:47
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TFPBlock
0013 #define ROOT_TFPBlock
0014
0015 #include "TObject.h"
0016
0017
0018
0019
0020
0021
0022 class TFPBlock : public TObject{
0023
0024 private:
0025 char *fBuffer;
0026 Int_t fNblock;
0027 Long64_t fDataSize;
0028 Long64_t fCapacity;
0029 Int_t *fLen;
0030 Long64_t *fPos;
0031 Long64_t *fRelOffset;
0032
0033 TFPBlock(const TFPBlock&) = delete;
0034 TFPBlock &operator=(const TFPBlock&) = delete;
0035
0036 public:
0037
0038 TFPBlock(Long64_t*, Int_t*, Int_t);
0039 ~TFPBlock() override;
0040
0041 Long64_t GetPos(Int_t) const;
0042 Int_t GetLen(Int_t) const;
0043
0044 Long64_t *GetPos() const;
0045 Int_t *GetLen() const;
0046 Long64_t GetDataSize() const;
0047 Long64_t GetCapacity() const;
0048 Int_t GetNoElem() const;
0049 char *GetBuffer() const;
0050 char *GetPtrToPiece(Int_t index) const;
0051
0052 void SetBuffer(char*);
0053 void SetPos(Int_t, Long64_t);
0054 void ReallocBlock(Long64_t*, Int_t*, Int_t);
0055
0056 ClassDefOverride(TFPBlock, 0);
0057 };
0058
0059
0060 inline Long64_t* TFPBlock::GetPos() const
0061 {
0062 return fPos;
0063 }
0064
0065
0066 inline Int_t* TFPBlock::GetLen() const
0067 {
0068 return fLen;
0069 }
0070
0071
0072 inline Long64_t TFPBlock::GetDataSize() const
0073 {
0074 return fDataSize;
0075 }
0076
0077
0078 inline Long64_t TFPBlock::GetCapacity() const
0079 {
0080 return fCapacity;
0081 }
0082
0083
0084 inline Int_t TFPBlock::GetNoElem() const
0085 {
0086 return fNblock;
0087 }
0088
0089
0090 inline Long64_t TFPBlock::GetPos(Int_t i) const
0091 {
0092 return fPos[i];
0093 }
0094
0095
0096 inline Int_t TFPBlock::GetLen(Int_t i) const
0097 {
0098 return fLen[i];
0099 }
0100
0101
0102 inline char* TFPBlock::GetBuffer() const
0103 {
0104 return fBuffer;
0105 }
0106
0107
0108 inline char* TFPBlock::GetPtrToPiece(Int_t index) const
0109 {
0110 return (fBuffer + fRelOffset[index]);
0111 }
0112
0113 #endif