File indexing completed on 2025-01-18 10:12:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGLSelectBuffer
0013 #define ROOT_TGLSelectBuffer
0014
0015 #include <Rtypes.h>
0016
0017 class TGLSelectRecordBase;
0018
0019 #include <vector>
0020 #include <utility>
0021
0022
0023
0024
0025
0026 class TGLSelectBuffer
0027 {
0028 protected:
0029 Int_t fBufSize;
0030 UInt_t* fBuf;
0031
0032 Int_t fNRecords;
0033
0034 typedef std::pair<UInt_t, UInt_t*> RawRecord_t;
0035 typedef std::vector<RawRecord_t> vRawRecord_t;
0036
0037 vRawRecord_t fSortedRecords;
0038
0039 static Int_t fgMaxBufSize;
0040
0041 public:
0042 TGLSelectBuffer();
0043 virtual ~TGLSelectBuffer();
0044
0045 Int_t GetBufSize() const { return fBufSize; }
0046 UInt_t* GetBuf() const { return fBuf; }
0047 Int_t GetNRecords() const { return fNRecords; }
0048
0049 Bool_t CanGrow();
0050 void Grow();
0051
0052 void ProcessResult(Int_t glResult);
0053
0054 UInt_t* RawRecord(Int_t i) { return fSortedRecords[i].second; }
0055
0056 Int_t SelectRecord(TGLSelectRecordBase& rec, Int_t i);
0057
0058 ClassDef(TGLSelectBuffer, 0)
0059 };
0060
0061 #endif