Logo ROOT   6.12/07
Reference Guide
TBufferSQL2.h
Go to the documentation of this file.
1 // @(#)root/sql
2 // Author: Sergey Linev 20/11/2005
3 
4 #ifndef ROOT_TBufferSQL2
5 #define ROOT_TBufferSQL2
6 
7 #include "TBufferFile.h"
8 
9 #include "TString.h"
10 
11 #include "TObjArray.h"
12 
13 class TMap;
14 class TExMap;
16 class TStreamerElement;
17 class TObjArray;
18 class TMemberStreamer;
19 class TSQLStackObj;
20 
21 class TSQLServer;
22 class TSQLResult;
23 class TSQLRow;
24 class TSQLFile;
25 class TSQLStructure;
26 class TSQLObjectData;
27 class TSQLClassInfo;
28 
29 class TBufferSQL2 : public TBufferFile {
30 
31  friend class TSQLStructure;
32 
33 protected:
34  TSQLFile *fSQL; ///<! instance of TSQLFile
35  TSQLStructure *fStructure; ///<! structures, created by object storing
36  TSQLStructure *fStk; ///<! pointer on current active structure (stack head)
37  TExMap *fObjMap; ///<! Map between stored objects and object id
38  TString fReadBuffer; ///<! Buffer for read value
39  Int_t fErrorFlag; ///<! Error id value
40  Bool_t fExpectedChain; ///<! flag to resolve situation when several elements of same basic type stored as FastArray
41  Int_t fCompressLevel; ///<! compress level used to minimize size of data in database
42  Int_t fReadVersionBuffer; ///<! buffer, used to by ReadVersion method
43  Long64_t fObjIdCounter; ///<! counter of objects id
44  Bool_t fIgnoreVerification; ///<! ignore verification of names
46  TObjArray *fObjectsInfos; ///<! array of objects info for selected key
47  Long64_t fFirstObjId; ///<! id of first object to be read from the database
48  Long64_t fLastObjId; ///<! id of last object correspond to this key
49  TMap *fPoolsMap; ///<! map of pools with data from different tables
50 
51  // TBufferSQL2 objects cannot be copied or assigned
52  TBufferSQL2(const TBufferSQL2 &); // not implemented
53  void operator=(const TBufferSQL2 &); // not implemented
54 
55  TBufferSQL2();
56 
57  // redefined protected virtual functions
58 
59  virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse);
60 
61  // end redefined protected virtual functions
62 
65  TSQLStructure *Stack(Int_t depth = 0);
66 
67  void WorkWithClass(const char *classname, Version_t classversion);
68  void WorkWithElement(TStreamerElement *elem, Int_t comp_type);
69 
71  Bool_t SqlObjectInfo(Long64_t objid, TString &clname, Version_t &version);
73 
76  Bool_t SqlWriteBasic(Int_t value);
87  Bool_t SqlWriteValue(const char *value, const char *tname);
88 
89  void SqlReadBasic(Char_t &value);
90  void SqlReadBasic(Short_t &value);
91  void SqlReadBasic(Int_t &value);
92  void SqlReadBasic(Long_t &value);
93  void SqlReadBasic(Long64_t &value);
94  void SqlReadBasic(Float_t &value);
95  void SqlReadBasic(Double_t &value);
96  void SqlReadBasic(Bool_t &value);
97  void SqlReadBasic(UChar_t &value);
98  void SqlReadBasic(UShort_t &value);
99  void SqlReadBasic(UInt_t &value);
100  void SqlReadBasic(ULong_t &value);
101  void SqlReadBasic(ULong64_t &value);
102  const char *SqlReadValue(const char *tname);
103  const char *SqlReadCharStarValue();
104 
105  Int_t
106  SqlWriteObject(const void *obj, const TClass *objClass, Bool_t cacheReuse, TMemberStreamer *streamer = 0, Int_t streamer_index = 0);
107  void *SqlReadObject(void *obj, TClass **cl = 0, TMemberStreamer *streamer = 0, Int_t streamer_index = 0,
108  const TClass *onFileClass = 0);
109  void *SqlReadObjectDirect(void *obj, TClass **cl, Long64_t objid, TMemberStreamer *streamer = 0,
110  Int_t streamer_index = 0, const TClass *onFileClass = 0);
111 
112 
113 public:
116  virtual ~TBufferSQL2();
117 
118  void SetCompressionLevel(int level) { fCompressLevel = level; }
119 
120  TSQLStructure *GetStructure() const { return fStructure; }
121 
122  Int_t GetErrorFlag() const { return fErrorFlag; }
123 
124  void SetIgnoreVerification() { fIgnoreVerification = kTRUE; }
125 
126  TSQLStructure *SqlWriteAny(const void *obj, const TClass *cl, Long64_t objid);
127 
128  void *SqlReadAny(Long64_t keyid, Long64_t objid, TClass **cl, void *obj = 0);
129 
130  // suppress class writing/reading
131 
132  virtual TClass *ReadClass(const TClass *cl = 0, UInt_t *objTag = 0);
133  virtual void WriteClass(const TClass *cl);
134 
135  // redefined virtual functions of TBuffer
136 
137  virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss); // SL
138  virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const char *classname); // SL
139  virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion = kFALSE); // SL
140 
141  virtual void SkipVersion(const TClass *cl = 0);
142  virtual Version_t ReadVersion(UInt_t *start = 0, UInt_t *bcnt = 0, const TClass *cl = 0); // SL
143  virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt = kFALSE); // SL
144 
145  virtual void *ReadObjectAny(const TClass *clCast);
146  virtual void SkipObjectAny();
147 
148  virtual void IncrementLevel(TVirtualStreamerInfo *);
149  virtual void SetStreamerElementNumber(TStreamerElement *elem, Int_t comp_type);
150  virtual void DecrementLevel(TVirtualStreamerInfo *);
151 
152  virtual void ClassBegin(const TClass *, Version_t = -1);
153  virtual void ClassEnd(const TClass *);
154  virtual void ClassMember(const char *name, const char *typeName = 0, Int_t arrsize1 = -1, Int_t arrsize2 = -1);
155 
156  virtual void ReadFloat16(Float_t *f, TStreamerElement *ele = 0);
157  virtual void WriteFloat16(Float_t *f, TStreamerElement *ele = 0);
158  virtual void ReadDouble32(Double_t *d, TStreamerElement *ele = 0);
159  virtual void WriteDouble32(Double_t *d, TStreamerElement *ele = 0);
160  virtual void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue);
161  virtual void ReadWithNbits(Float_t *ptr, Int_t nbits);
162  virtual void ReadWithFactor(Double_t *ptr, Double_t factor, Double_t minvalue);
163  virtual void ReadWithNbits(Double_t *ptr, Int_t nbits);
164 
165  virtual Int_t ReadArray(Bool_t *&b);
166  virtual Int_t ReadArray(Char_t *&c);
167  virtual Int_t ReadArray(UChar_t *&c);
168  virtual Int_t ReadArray(Short_t *&h);
169  virtual Int_t ReadArray(UShort_t *&h);
170  virtual Int_t ReadArray(Int_t *&i);
171  virtual Int_t ReadArray(UInt_t *&i);
172  virtual Int_t ReadArray(Long_t *&l);
173  virtual Int_t ReadArray(ULong_t *&l);
174  virtual Int_t ReadArray(Long64_t *&l);
175  virtual Int_t ReadArray(ULong64_t *&l);
176  virtual Int_t ReadArray(Float_t *&f);
177  virtual Int_t ReadArray(Double_t *&d);
178  virtual Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele = 0);
179  virtual Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele = 0);
180 
181  virtual Int_t ReadStaticArray(Bool_t *b);
182  virtual Int_t ReadStaticArray(Char_t *c);
183  virtual Int_t ReadStaticArray(UChar_t *c);
184  virtual Int_t ReadStaticArray(Short_t *h);
185  virtual Int_t ReadStaticArray(UShort_t *h);
186  virtual Int_t ReadStaticArray(Int_t *i);
187  virtual Int_t ReadStaticArray(UInt_t *i);
188  virtual Int_t ReadStaticArray(Long_t *l);
189  virtual Int_t ReadStaticArray(ULong_t *l);
190  virtual Int_t ReadStaticArray(Long64_t *l);
191  virtual Int_t ReadStaticArray(ULong64_t *l);
192  virtual Int_t ReadStaticArray(Float_t *f);
193  virtual Int_t ReadStaticArray(Double_t *d);
196 
197  virtual void ReadFastArray(Bool_t *b, Int_t n);
198  virtual void ReadFastArray(Char_t *c, Int_t n);
199  virtual void ReadFastArray(UChar_t *c, Int_t n);
200  virtual void ReadFastArray(Short_t *h, Int_t n);
201  virtual void ReadFastArray(UShort_t *h, Int_t n);
202  virtual void ReadFastArray(Int_t *i, Int_t n);
203  virtual void ReadFastArray(UInt_t *i, Int_t n);
204  virtual void ReadFastArray(Long_t *l, Int_t n);
205  virtual void ReadFastArray(ULong_t *l, Int_t n);
206  virtual void ReadFastArray(Long64_t *l, Int_t n);
207  virtual void ReadFastArray(ULong64_t *l, Int_t n);
208  virtual void ReadFastArray(Float_t *f, Int_t n);
209  virtual void ReadFastArray(Double_t *d, Int_t n);
210  virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele = 0);
211  virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele = 0);
212  virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue);
213  virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits);
214  virtual void ReadFastArrayWithFactor(Double_t *ptr, Int_t n, Double_t factor, Double_t minvalue);
215  virtual void ReadFastArrayWithNbits(Double_t *ptr, Int_t n, Int_t nbits);
216 
217  virtual void WriteArray(const Bool_t *b, Int_t n);
218  virtual void WriteArray(const Char_t *c, Int_t n);
219  virtual void WriteArray(const UChar_t *c, Int_t n);
220  virtual void WriteArray(const Short_t *h, Int_t n);
221  virtual void WriteArray(const UShort_t *h, Int_t n);
222  virtual void WriteArray(const Int_t *i, Int_t n);
223  virtual void WriteArray(const UInt_t *i, Int_t n);
224  virtual void WriteArray(const Long_t *l, Int_t n);
225  virtual void WriteArray(const ULong_t *l, Int_t n);
226  virtual void WriteArray(const Long64_t *l, Int_t n);
227  virtual void WriteArray(const ULong64_t *l, Int_t n);
228  virtual void WriteArray(const Float_t *f, Int_t n);
229  virtual void WriteArray(const Double_t *d, Int_t n);
230  virtual void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele = 0);
231  virtual void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele = 0);
232  virtual void
233  ReadFastArray(void *start, const TClass *cl, Int_t n = 1, TMemberStreamer *s = 0, const TClass *onFileClass = 0);
234  virtual void ReadFastArray(void **startp, const TClass *cl, Int_t n = 1, Bool_t isPreAlloc = kFALSE,
235  TMemberStreamer *s = 0, const TClass *onFileClass = 0);
236 
237  virtual void WriteFastArray(const Bool_t *b, Int_t n);
238  virtual void WriteFastArray(const Char_t *c, Int_t n);
239  virtual void WriteFastArray(const UChar_t *c, Int_t n);
240  virtual void WriteFastArray(const Short_t *h, Int_t n);
241  virtual void WriteFastArray(const UShort_t *h, Int_t n);
242  virtual void WriteFastArray(const Int_t *i, Int_t n);
243  virtual void WriteFastArray(const UInt_t *i, Int_t n);
244  virtual void WriteFastArray(const Long_t *l, Int_t n);
245  virtual void WriteFastArray(const ULong_t *l, Int_t n);
246  virtual void WriteFastArray(const Long64_t *l, Int_t n);
247  virtual void WriteFastArray(const ULong64_t *l, Int_t n);
248  virtual void WriteFastArray(const Float_t *f, Int_t n);
249  virtual void WriteFastArray(const Double_t *d, Int_t n);
250  virtual void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele = 0);
251  virtual void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele = 0);
252  virtual void WriteFastArray(void *start, const TClass *cl, Int_t n = 1, TMemberStreamer *s = 0);
253  virtual Int_t
254  WriteFastArray(void **startp, const TClass *cl, Int_t n = 1, Bool_t isPreAlloc = kFALSE, TMemberStreamer *s = 0);
255 
256  virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass = 0);
257  virtual void StreamObject(void *obj, const char *className, const TClass *onFileClass = 0);
258  virtual void StreamObject(void *obj, const TClass *cl, const TClass *onFileClass = 0);
259  virtual void StreamObject(TObject *obj);
260  virtual void
261  StreamObject(void *obj, TMemberStreamer *streamer, const TClass *cl, Int_t n = 0, const TClass *onFileClass = 0);
262 
263  virtual void ReadBool(Bool_t &b);
264  virtual void ReadChar(Char_t &c);
265  virtual void ReadUChar(UChar_t &c);
266  virtual void ReadShort(Short_t &s);
267  virtual void ReadUShort(UShort_t &s);
268  virtual void ReadInt(Int_t &i);
269  virtual void ReadUInt(UInt_t &i);
270  virtual void ReadLong(Long_t &l);
271  virtual void ReadULong(ULong_t &l);
272  virtual void ReadLong64(Long64_t &l);
273  virtual void ReadULong64(ULong64_t &l);
274  virtual void ReadFloat(Float_t &f);
275  virtual void ReadDouble(Double_t &d);
276  virtual void ReadCharP(Char_t *c);
277  virtual void ReadTString(TString &s);
278  virtual void ReadStdString(std::string *s);
280  virtual void ReadCharStar(char *&s);
281 
282  virtual void WriteBool(Bool_t b);
283  virtual void WriteChar(Char_t c);
284  virtual void WriteUChar(UChar_t c);
285  virtual void WriteShort(Short_t s);
286  virtual void WriteUShort(UShort_t s);
287  virtual void WriteInt(Int_t i);
288  virtual void WriteUInt(UInt_t i);
289  virtual void WriteLong(Long_t l);
290  virtual void WriteULong(ULong_t l);
291  virtual void WriteLong64(Long64_t l);
292  virtual void WriteULong64(ULong64_t l);
293  virtual void WriteFloat(Float_t f);
294  virtual void WriteDouble(Double_t d);
295  virtual void WriteCharP(const Char_t *c);
296  virtual void WriteTString(const TString &s);
297  virtual void WriteStdString(const std::string *s);
299  virtual void WriteCharStar(char *s);
300 
301  virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object);
302  virtual Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection,
303  void *end_collection);
304  virtual Int_t
305  ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection);
306 
307  static void SetFloatFormat(const char *fmt = "%e");
308  static const char *GetFloatFormat();
309 
310  // end of redefined virtual functions
311 
312  ClassDef(TBufferSQL2, 0); // a specialized TBuffer to convert data to SQL statements or read data from SQL tables
313 };
314 
315 #endif
virtual void IncrementLevel(TVirtualStreamerInfo *)
Function is called from TStreamerInfo WriteBuffer and Readbuffer functions and indent new level in da...
Int_t GetErrorFlag() const
Definition: TBufferSQL2.h:122
void * SqlReadAny(Long64_t keyid, Long64_t objid, TClass **cl, void *obj=0)
Recreate object from sql structure.
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)
Read array of Double32_t from buffer.
virtual void ReadFloat(Float_t &f)
Reads Float_t value from buffer.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)
Read version value from buffer actually version is normally defined by table name and kept in interme...
An array of TObjects.
Definition: TObjArray.h:37
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
Definition: TBufferFile.h:47
long long Long64_t
Definition: RtypesCore.h:69
short Version_t
Definition: RtypesCore.h:61
virtual void WriteCharStar(char *s)
Write a char* string.
virtual void ClassBegin(const TClass *, Version_t=-1)
This method inform buffer data of which class now will be streamed.
float Float_t
Definition: RtypesCore.h:53
virtual void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0)
Write array of Double32_t to buffer.
TExMap * fObjMap
! Map between stored objects and object id
Definition: TBufferSQL2.h:37
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)
Read array of Float16_t from buffer.
virtual void ClassMember(const char *name, const char *typeName=0, Int_t arrsize1=-1, Int_t arrsize2=-1)
Method indicates name and typename of class memeber, which should be now streamed in custom streamer ...
virtual void WriteLong64(Long64_t l)
Writes Long64_t value to buffer.
virtual void ReadLong64(Long64_t &l)
Reads Long64_t value from buffer.
virtual void ReadDouble32(Double_t *d, TStreamerElement *ele=0)
Read Double32 value.
virtual void ReadTString(TString &s)
Read a TString.
static void SetFloatFormat(const char *fmt="%e")
set printf format for float/double members, default "%e" changes global TSQLServer variable ...
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)
Read array of Float16_t from buffer.
unsigned short UShort_t
Definition: RtypesCore.h:36
TH1 * h
Definition: legend2.C:5
virtual void ReadFloat16(Float_t *f, TStreamerElement *ele=0)
Read Float16 value.
Int_t fCompressLevel
! compress level used to minimize size of data in database
Definition: TBufferSQL2.h:41
virtual void SkipVersion(const TClass *cl=0)
Skip class version from I/O buffer.
Contains information about tables specific to one class and version.
Definition: TSQLClassInfo.h:42
virtual void ReadUShort(UShort_t &s)
Reads UShort_t value from buffer.
Basic string class.
Definition: TString.h:125
virtual void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0)
Write array of Float16_t to buffer.
virtual void ReadBool(Bool_t &b)
Reads Bool_t value from buffer.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Int_t fErrorFlag
! Error id value
Definition: TBufferSQL2.h:39
TSQLStructure * fStructure
! structures, created by object storing
Definition: TBufferSQL2.h:35
TSQLObjectData * SqlObjectData(Long64_t objid, TSQLClassInfo *sqlinfo)
Creates TSQLObjectData for specified object id and specified class.
virtual void WriteFastArray(const Bool_t *b, Int_t n)
Write array of Bool_t to buffer.
virtual void WriteUChar(UChar_t c)
Writes UChar_t value to buffer.
Int_t SqlWriteObject(const void *obj, const TClass *objClass, Bool_t cacheReuse, TMemberStreamer *streamer=0, Int_t streamer_index=0)
Write object to buffer.
Int_t SqlReadArraySize()
Reads array size, written in raw data table.
Bool_t fIgnoreVerification
! ignore verification of names
Definition: TBufferSQL2.h:44
Int_t fReadVersionBuffer
! buffer, used to by ReadVersion method
Definition: TBufferSQL2.h:42
TSQLStructure * PushStack()
Push stack with structurual information about streamed object.
virtual void WriteStdString(const std::string *s)
Write a std::string.
TSQLObjectData is used in TBufferSQL2 class in reading procedure.
virtual void ReadUInt(UInt_t &i)
Reads UInt_t value from buffer.
void WorkWithElement(TStreamerElement *elem, Int_t comp_type)
This function is a part of SetStreamerElementNumber method.
virtual Int_t ReadArray(Bool_t *&b)
Read array of Bool_t from buffer.
virtual void ReadInt(Int_t &i)
Reads Int_t value from buffer.
virtual void WriteDouble(Double_t d)
Writes Double_t value to buffer.
#define ClassDef(name, id)
Definition: Rtypes.h:320
TSQLFile * fSQL
! instance of TSQLFile
Definition: TBufferSQL2.h:34
virtual void WriteShort(Short_t s)
Writes Short_t value to buffer.
virtual void WriteBool(Bool_t b)
Writes Bool_t value to buffer.
virtual void WriteULong(ULong_t l)
Writes ULong_t value to buffer.
void * SqlReadObject(void *obj, TClass **cl=0, TMemberStreamer *streamer=0, Int_t streamer_index=0, const TClass *onFileClass=0)
Read object from the buffer.
This is hierarchical structure, which is created when data is written by TBufferSQL2.
Definition: TSQLStructure.h:94
virtual void ReadStdString(std::string *s)=0
virtual void WriteUShort(UShort_t s)
Writes UShort_t value to buffer.
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse)
Write object to buffer. Only used from TBuffer.
void operator=(const TBufferSQL2 &)
virtual void WriteClass(const TClass *cl)
Suppressed function of TBuffer.
virtual void WriteTString(const TString &s)
Write a TString.
Bool_t SqlWriteBasic(Char_t value)
converts Char_t to string and creates correspondent sql structure
virtual void WriteULong64(ULong64_t l)
Writes ULong64_t value to buffer.
virtual Int_t ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele=0)
Read array of Double32_t from buffer.
TBufferSQL2()
Default constructor, should not be used.
Definition: TBufferSQL2.cxx:68
static const char * GetFloatFormat()
return current printf format for float/double members, default "%e" return format, hold by TSQLServer
virtual void ReadCharP(Char_t *c)
Reads array of characters from buffer.
virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=0)
Stream object to/from buffer.
virtual void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0)
Write array of Double32_t to buffer.
Access an SQL db via the TFile interface.
Definition: TSQLFile.h:30
TSQLStructure * GetStructure() const
Definition: TBufferSQL2.h:120
virtual void WriteLong(Long_t l)
Writes Long_t value to buffer.
TSQLStructure * fStk
! pointer on current active structure (stack head)
Definition: TBufferSQL2.h:36
virtual Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele=0)
Read array of Float16_t from buffer.
virtual Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele=0)
Read array of Double32_t from buffer.
unsigned int UInt_t
Definition: RtypesCore.h:42
TSQLStructure * Stack(Int_t depth=0)
returns head of stack
short Short_t
Definition: RtypesCore.h:35
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
virtual void WriteArray(const Bool_t *b, Int_t n)
Write array of Bool_t to buffer.
virtual TClass * ReadClass(const TClass *cl=0, UInt_t *objTag=0)
Suppressed function of TBuffer.
virtual Int_t ReadStaticArray(Bool_t *b)
Read array of Bool_t from buffer.
virtual void ClassEnd(const TClass *)
Method indicates end of streaming of classdata in custom streamer.
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue)
Read a Double32_t from the buffer when the factor and minimun value have been specified see comments ...
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)
Read array of Float16_t from buffer.
Converts data to SQL statements or read data from SQL tables.
Definition: TBufferSQL2.h:29
long Long_t
Definition: RtypesCore.h:50
virtual void ReadDouble(Double_t &d)
Reads Double_t value from buffer.
virtual void ReadWithNbits(Float_t *ptr, Int_t nbits)
Read a Float16_t from the buffer when the number of bits is specified (explicitly or not) see comment...
void SqlReadBasic(Char_t &value)
Read current value from table and convert it to Char_t value.
double Double_t
Definition: RtypesCore.h:55
virtual void ReadStdString(std::string *s)
Read a std::string.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:40
unsigned long long ULong64_t
Definition: RtypesCore.h:70
const char * SqlReadCharStarValue()
Read CharStar value, if it has special code, request it from large table.
unsigned long ULong_t
Definition: RtypesCore.h:51
Bool_t SqlWriteValue(const char *value, const char *tname)
virtual void SkipObjectAny()
?????? Skip any kind of object from buffer !!!!!! fix me, not yet implemented Should be just skip of ...
virtual void WriteFloat(Float_t f)
Writes Float_t value to buffer.
static constexpr double s
void WorkWithClass(const char *classname, Version_t classversion)
This function is a part of IncrementLevel method.
virtual void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0)
Write array of Float16_t to buffer.
void SetCompressionLevel(int level)
Definition: TBufferSQL2.h:118
virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=0)
Write Double32 value.
virtual void ReadChar(Char_t &c)
Reads Char_t value from buffer.
virtual void WriteInt(Int_t i)
Writes Int_t value to buffer.
Mother of all ROOT objects.
Definition: TObject.h:37
char Char_t
Definition: RtypesCore.h:29
virtual void DecrementLevel(TVirtualStreamerInfo *)
Function is called from TStreamerInfo WriteBuffer and Readbuffer functions and decrease level in sql ...
Bool_t SqlObjectInfo(Long64_t objid, TString &clname, Version_t &version)
Returns object info like classname and version Should be taken from buffer, which is produced in the ...
auto * l
Definition: textangle.C:4
Definition: file.py:1
virtual void ReadShort(Short_t &s)
Reads Short_t value from buffer.
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
Definition: TRolke.cxx:630
Long64_t fObjIdCounter
! counter of objects id
Definition: TBufferSQL2.h:43
virtual void * ReadObjectAny(const TClass *clCast)
Read object from buffer. Only used from TBuffer.
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)
Copies class version to buffer, but not writes it to sql immidiately Version will be used to produce ...
unsigned char UChar_t
Definition: RtypesCore.h:34
virtual ~TBufferSQL2()
Destroy sql buffer.
TSQLStructure * SqlWriteAny(const void *obj, const TClass *cl, Long64_t objid)
Convert object of any class to sql structures Return pointer on created TSQLStructure TSQLStructure o...
virtual void ReadULong(ULong_t &l)
Reads ULong_t value from buffer.
virtual void ReadULong64(ULong64_t &l)
Reads ULong64_t value from buffer.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)
Suppressed function of TBuffer.
virtual void WriteCharP(const Char_t *c)
Writes array of characters to buffer.
Abstract Interface class describing Streamer information for one class.
virtual void ReadCharStar(char *&s)
Read a char* string.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)
Suppressed function of TBuffer.
Long64_t fFirstObjId
! id of first object to be read from the database
Definition: TBufferSQL2.h:47
TString fReadBuffer
! Buffer for read value
Definition: TBufferSQL2.h:38
virtual void WriteStdString(const std::string *s)=0
void SetIgnoreVerification()
Definition: TBufferSQL2.h:124
Long64_t fLastObjId
! id of last object correspond to this key
Definition: TBufferSQL2.h:48
const Bool_t kTRUE
Definition: RtypesCore.h:87
TObjArray * fObjectsInfos
! array of objects info for selected key
Definition: TBufferSQL2.h:46
virtual Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
Bool_t fExpectedChain
! flag to resolve situation when several elements of same basic type stored as FastArray ...
Definition: TBufferSQL2.h:40
const Int_t n
Definition: legend1.C:16
virtual void WriteUInt(UInt_t i)
Writes UInt_t value to buffer.
TMap * fPoolsMap
! map of pools with data from different tables
Definition: TBufferSQL2.h:49
char name[80]
Definition: TGX11.cxx:109
This class stores a (key,value) pair using an external hash.
Definition: TExMap.h:33
TSQLStructure * PopStack()
Pop stack.
void * SqlReadObjectDirect(void *obj, TClass **cl, Long64_t objid, TMemberStreamer *streamer=0, Int_t streamer_index=0, const TClass *onFileClass=0)
Read object data.
virtual Int_t ReadStaticArrayFloat16(Float_t *f, TStreamerElement *ele=0)
Read array of Float16_t from buffer.
virtual void ReadUChar(UChar_t &c)
Reads UChar_t value from buffer.
TSQLObjectData * fCurrentData
!
Definition: TBufferSQL2.h:45
const char * SqlReadValue(const char *tname)
Read string value from current stack node.
virtual void WriteFloat16(Float_t *f, TStreamerElement *ele=0)
Write Float16 value.
virtual void ReadFastArray(Bool_t *b, Int_t n)
Read array of Bool_t from buffer.
virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
virtual void ReadLong(Long_t &l)
Reads Long_t value from buffer.
virtual void SetStreamerElementNumber(TStreamerElement *elem, Int_t comp_type)
Function is called from TStreamerInfo WriteBuffer and Readbuffer functions and add/verify next elemen...
virtual void WriteChar(Char_t c)
Writes Char_t value to buffer.