Logo ROOT   6.10/09
Reference Guide
TBufferSQL2.h
Go to the documentation of this file.
1 // @(#)root/sql
2 // Author: Sergey Linev 20/11/2005
3 
4 
5 #ifndef ROOT_TBufferSQL2
6 #define ROOT_TBufferSQL2
7 
8 #include "TBufferFile.h"
9 
10 #include "TString.h"
11 
12 #include "TObjArray.h"
13 
14 class TMap;
15 class TExMap;
17 class TStreamerElement;
18 class TObjArray;
19 class TMemberStreamer;
20 class TSQLStackObj;
21 
22 class TSQLServer;
23 class TSQLResult;
24 class TSQLRow;
25 class TSQLFile;
26 class TSQLStructure;
27 class TSQLObjectData;
28 class TSQLClassInfo;
29 
30 class TBufferSQL2 : public TBufferFile {
31 
32 friend class TSQLStructure;
33 
34 protected:
35 
36  TSQLFile* fSQL; ///<! instance of TSQLFile
37  TSQLStructure* fStructure; ///<! structures, created by object storing
38  TSQLStructure* fStk; ///<! pointer on current active structure (stack head)
39  TExMap* fObjMap; ///<! Map between stored objects and object id
40  TString fReadBuffer; ///<! Buffer for read value
41  Int_t fErrorFlag; ///<! Error id value
42  Bool_t fExpectedChain; ///<! flag to resolve situation when several elements of same basic type stored as FastArray
43  Int_t fCompressLevel; ///<! compress level used to minimize size of data in database
44  Int_t fReadVersionBuffer; ///<! buffer, used to by ReadVersion method
45  Long64_t fObjIdCounter; ///<! counter of objects id
46  Bool_t fIgnoreVerification; ///<! ignore verification of names
48  TObjArray* fObjectsInfos; ///<! array of objects info for selected key
49  Long64_t fFirstObjId; ///<! id of first object to be read from the database
50  Long64_t fLastObjId; ///<! id of last object correspond to this key
51  TMap* fPoolsMap; ///<! map of pools with data from different tables
52 
53  // TBufferSQL2 objects cannot be copied or assigned
54  TBufferSQL2(const TBufferSQL2 &); // not implemented
55  void operator=(const TBufferSQL2 &); // not implemented
56 
57  TBufferSQL2();
58 
59  // redefined protected virtual functions
60 
61  virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass);
62 
63  // end redefined protected virtual functions
64 
67  TSQLStructure* Stack(Int_t depth = 0);
68 
69  void WorkWithClass(const char* classname, Version_t classversion);
70  void WorkWithElement(TStreamerElement* elem, Int_t comp_type);
71 
73  Bool_t SqlObjectInfo(Long64_t objid, TString& clname, Version_t& version);
75 
78  Bool_t SqlWriteBasic(Int_t value);
89  Bool_t SqlWriteValue(const char* value, const char* tname);
90 
91  void SqlReadBasic(Char_t& value);
92  void SqlReadBasic(Short_t& value);
93  void SqlReadBasic(Int_t& value);
94  void SqlReadBasic(Long_t& value);
95  void SqlReadBasic(Long64_t& value);
96  void SqlReadBasic(Float_t& value);
97  void SqlReadBasic(Double_t& value);
98  void SqlReadBasic(Bool_t& value);
99  void SqlReadBasic(UChar_t& value);
100  void SqlReadBasic(UShort_t& value);
101  void SqlReadBasic(UInt_t& value);
102  void SqlReadBasic(ULong_t& value);
103  void SqlReadBasic(ULong64_t& value);
104  const char* SqlReadValue(const char* tname);
105  const char* SqlReadCharStarValue();
106 
107  Int_t SqlWriteObject(const void* obj, const TClass* objClass, TMemberStreamer *streamer = 0, Int_t streamer_index = 0);
108  void* SqlReadObject(void* obj, TClass** cl = 0, TMemberStreamer *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass=0);
109  void* SqlReadObjectDirect(void* obj, TClass** cl, Long64_t objid, TMemberStreamer *streamer = 0, Int_t streamer_index = 0, const TClass *onFileClass = 0);
110 
111 public:
112 
115  virtual ~TBufferSQL2();
116 
117  void SetCompressionLevel(int level) { fCompressLevel = level; }
118 
119  TSQLStructure* GetStructure() const { return fStructure; }
120 
121  Int_t GetErrorFlag() const { return fErrorFlag; }
122 
123  void SetIgnoreVerification() { fIgnoreVerification = kTRUE; }
124 
125  TSQLStructure* SqlWriteAny(const void* obj, const TClass* cl, Long64_t objid);
126 
127  void* SqlReadAny(Long64_t keyid, Long64_t objid, TClass** cl, void* obj = 0);
128 
129  // suppress class writing/reading
130 
131  virtual TClass* ReadClass(const TClass* cl = 0, UInt_t* objTag = 0);
132  virtual void WriteClass(const TClass* cl);
133 
134  // redefined virtual functions of TBuffer
135 
136  virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss); // SL
137  virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const char *classname); // SL
138  virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion = kFALSE); // SL
139 
140  virtual void SkipVersion(const TClass *cl = 0);
141  virtual Version_t ReadVersion(UInt_t *start = 0, UInt_t *bcnt = 0, const TClass *cl = 0); // SL
142  virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt = kFALSE); // SL
143 
144  virtual void* ReadObjectAny(const TClass* clCast);
145  virtual void SkipObjectAny();
146 
147  virtual void IncrementLevel(TVirtualStreamerInfo*);
148  virtual void SetStreamerElementNumber(TStreamerElement *elem, Int_t comp_type);
149  virtual void DecrementLevel(TVirtualStreamerInfo*);
150 
151  virtual void ClassBegin(const TClass*, Version_t = -1);
152  virtual void ClassEnd(const TClass*);
153  virtual void ClassMember(const char* name, const char* typeName = 0, Int_t arrsize1 = -1, Int_t arrsize2 = -1);
154 
155  virtual void WriteObject(const TObject *obj);
156 
157  virtual void ReadFloat16 (Float_t *f, TStreamerElement *ele=0);
158  virtual void WriteFloat16(Float_t *f, TStreamerElement *ele=0);
159  virtual void ReadDouble32 (Double_t *d, TStreamerElement *ele=0);
160  virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=0);
161  virtual void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue);
162  virtual void ReadWithNbits(Float_t *ptr, Int_t nbits);
163  virtual void ReadWithFactor(Double_t *ptr, Double_t factor, Double_t minvalue);
164  virtual void ReadWithNbits(Double_t *ptr, Int_t nbits);
165 
166  virtual Int_t ReadArray(Bool_t *&b);
167  virtual Int_t ReadArray(Char_t *&c);
168  virtual Int_t ReadArray(UChar_t *&c);
169  virtual Int_t ReadArray(Short_t *&h);
170  virtual Int_t ReadArray(UShort_t *&h);
171  virtual Int_t ReadArray(Int_t *&i);
172  virtual Int_t ReadArray(UInt_t *&i);
173  virtual Int_t ReadArray(Long_t *&l);
174  virtual Int_t ReadArray(ULong_t *&l);
175  virtual Int_t ReadArray(Long64_t *&l);
176  virtual Int_t ReadArray(ULong64_t *&l);
177  virtual Int_t ReadArray(Float_t *&f);
178  virtual Int_t ReadArray(Double_t *&d);
179  virtual Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele=0);
180  virtual Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele=0);
181 
182  virtual Int_t ReadStaticArray(Bool_t *b);
183  virtual Int_t ReadStaticArray(Char_t *c);
184  virtual Int_t ReadStaticArray(UChar_t *c);
185  virtual Int_t ReadStaticArray(Short_t *h);
186  virtual Int_t ReadStaticArray(UShort_t *h);
187  virtual Int_t ReadStaticArray(Int_t *i);
188  virtual Int_t ReadStaticArray(UInt_t *i);
189  virtual Int_t ReadStaticArray(Long_t *l);
190  virtual Int_t ReadStaticArray(ULong_t *l);
191  virtual Int_t ReadStaticArray(Long64_t *l);
192  virtual Int_t ReadStaticArray(ULong64_t *l);
193  virtual Int_t ReadStaticArray(Float_t *f);
194  virtual Int_t ReadStaticArray(Double_t *d);
197 
198  virtual void ReadFastArray(Bool_t *b, Int_t n);
199  virtual void ReadFastArray(Char_t *c, Int_t n);
200  virtual void ReadFastArray(UChar_t *c, Int_t n);
201  virtual void ReadFastArray(Short_t *h, Int_t n);
202  virtual void ReadFastArray(UShort_t *h, Int_t n);
203  virtual void ReadFastArray(Int_t *i, Int_t n);
204  virtual void ReadFastArray(UInt_t *i, Int_t n);
205  virtual void ReadFastArray(Long_t *l, Int_t n);
206  virtual void ReadFastArray(ULong_t *l, Int_t n);
207  virtual void ReadFastArray(Long64_t *l, Int_t n);
208  virtual void ReadFastArray(ULong64_t *l, Int_t n);
209  virtual void ReadFastArray(Float_t *f, Int_t n);
210  virtual void ReadFastArray(Double_t *d, Int_t n);
211  virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0);
212  virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0);
213  virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue) ;
214  virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits);
215  virtual void ReadFastArrayWithFactor(Double_t *ptr, Int_t n, Double_t factor, Double_t minvalue);
216  virtual void ReadFastArrayWithNbits(Double_t *ptr, Int_t n, Int_t nbits) ;
217 
218  virtual void WriteArray(const Bool_t *b, Int_t n);
219  virtual void WriteArray(const Char_t *c, Int_t n);
220  virtual void WriteArray(const UChar_t *c, Int_t n);
221  virtual void WriteArray(const Short_t *h, Int_t n);
222  virtual void WriteArray(const UShort_t *h, Int_t n);
223  virtual void WriteArray(const Int_t *i, Int_t n);
224  virtual void WriteArray(const UInt_t *i, Int_t n);
225  virtual void WriteArray(const Long_t *l, Int_t n);
226  virtual void WriteArray(const ULong_t *l, Int_t n);
227  virtual void WriteArray(const Long64_t *l, Int_t n);
228  virtual void WriteArray(const ULong64_t *l, Int_t n);
229  virtual void WriteArray(const Float_t *f, Int_t n);
230  virtual void WriteArray(const Double_t *d, Int_t n);
231  virtual void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0);
232  virtual void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0);
233  virtual void 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, TMemberStreamer *s=0, const TClass *onFileClass=0);
235 
236  virtual void WriteFastArray(const Bool_t *b, Int_t n);
237  virtual void WriteFastArray(const Char_t *c, Int_t n);
238  virtual void WriteFastArray(const UChar_t *c, Int_t n);
239  virtual void WriteFastArray(const Short_t *h, Int_t n);
240  virtual void WriteFastArray(const UShort_t *h, Int_t n);
241  virtual void WriteFastArray(const Int_t *i, Int_t n);
242  virtual void WriteFastArray(const UInt_t *i, Int_t n);
243  virtual void WriteFastArray(const Long_t *l, Int_t n);
244  virtual void WriteFastArray(const ULong_t *l, Int_t n);
245  virtual void WriteFastArray(const Long64_t *l, Int_t n);
246  virtual void WriteFastArray(const ULong64_t *l, Int_t n);
247  virtual void WriteFastArray(const Float_t *f, Int_t n);
248  virtual void WriteFastArray(const Double_t *d, Int_t n);
249  virtual void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0);
250  virtual void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0);
251  virtual void WriteFastArray(void *start, const TClass *cl, Int_t n=1, TMemberStreamer *s=0);
252  virtual Int_t WriteFastArray(void **startp, const TClass *cl, Int_t n=1, Bool_t isPreAlloc=kFALSE, TMemberStreamer *s=0);
253 
254  virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass* onFileClass = 0);
255  virtual void StreamObject(void *obj, const char *className, const TClass* onFileClass = 0 );
256  virtual void StreamObject(void *obj, const TClass *cl, const TClass* onFileClass = 0 );
257  virtual void StreamObject(TObject *obj);
258  virtual void StreamObject(void *obj, TMemberStreamer *streamer, const TClass *cl, Int_t n = 0, const TClass *onFileClass = 0);
259 
260  virtual void ReadBool(Bool_t &b);
261  virtual void ReadChar(Char_t &c);
262  virtual void ReadUChar(UChar_t &c);
263  virtual void ReadShort(Short_t &s);
264  virtual void ReadUShort(UShort_t &s);
265  virtual void ReadInt(Int_t &i);
266  virtual void ReadUInt(UInt_t &i);
267  virtual void ReadLong(Long_t &l);
268  virtual void ReadULong(ULong_t &l);
269  virtual void ReadLong64(Long64_t &l);
270  virtual void ReadULong64(ULong64_t &l);
271  virtual void ReadFloat(Float_t &f);
272  virtual void ReadDouble(Double_t &d);
273  virtual void ReadCharP(Char_t *c);
274  virtual void ReadTString(TString &s);
275  virtual void ReadStdString(std::string *s);
277  virtual void ReadCharStar(char* &s);
278 
279  virtual void WriteBool(Bool_t b);
280  virtual void WriteChar(Char_t c);
281  virtual void WriteUChar(UChar_t c);
282  virtual void WriteShort(Short_t s);
283  virtual void WriteUShort(UShort_t s);
284  virtual void WriteInt(Int_t i);
285  virtual void WriteUInt(UInt_t i);
286  virtual void WriteLong(Long_t l);
287  virtual void WriteULong(ULong_t l);
288  virtual void WriteLong64(Long64_t l);
289  virtual void WriteULong64(ULong64_t l);
290  virtual void WriteFloat(Float_t f);
291  virtual void WriteDouble(Double_t d);
292  virtual void WriteCharP(const Char_t *c);
293  virtual void WriteTString(const TString &s);
294  virtual void WriteStdString(const std::string *s);
296  virtual void WriteCharStar(char *s);
297 
298  virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object);
299  virtual Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection);
300  virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection);
301 
302  static void SetFloatFormat(const char* fmt = "%e");
303  static const char* GetFloatFormat();
304 
305  // end of redefined virtual functions
306 
307  ClassDef(TBufferSQL2, 0); //a specialized TBuffer to convert data to SQL statements or read data from SQL tables
308 };
309 
310 #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:121
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:39
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.
Int_t SqlWriteObject(const void *obj, const TClass *objClass, TMemberStreamer *streamer=0, Int_t streamer_index=0)
Write object to buffer.
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:43
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:44
virtual void ReadUShort(UShort_t &s)
Reads UShort_t value from buffer.
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass)
Write object to buffer. Only used from TBuffer.
Basic string class.
Definition: TString.h:129
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:41
TSQLStructure * fStructure
! structures, created by object storing
Definition: TBufferSQL2.h:37
TSQLObjectData * SqlObjectData(Long64_t objid, TSQLClassInfo *sqlinfo)
Creates TSQLObjectData for specifed 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 SqlReadArraySize()
Reads array size, written in raw data table.
Bool_t fIgnoreVerification
! ignore verification of names
Definition: TBufferSQL2.h:46
Int_t fReadVersionBuffer
! buffer, used to by ReadVersion method
Definition: TBufferSQL2.h:44
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:297
TSQLFile * fSQL
! instance of TSQLFile
Definition: TBufferSQL2.h:36
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 hierarhical structure, which is created when data is written by TBufferSQL2.
virtual void ReadStdString(std::string *s)=0
virtual void WriteUShort(UShort_t s)
Writes UShort_t value to buffer.
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:119
virtual void WriteLong(Long_t l)
Writes Long_t value to buffer.
TSQLStructure * fStk
! pointer on current active structure (stack head)
Definition: TBufferSQL2.h:38
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
TLine * l
Definition: textangle.C:4
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:71
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:92
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:30
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...
double f(double x)
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.
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:117
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 ...
virtual void WriteObject(const TObject *obj)
Convert object into sql structures.
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:45
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:49
TString fReadBuffer
! Buffer for read value
Definition: TBufferSQL2.h:40
virtual void WriteStdString(const std::string *s)=0
void SetIgnoreVerification()
Definition: TBufferSQL2.h:123
Long64_t fLastObjId
! id of last object correspond to this key
Definition: TBufferSQL2.h:50
const Bool_t kTRUE
Definition: RtypesCore.h:91
TObjArray * fObjectsInfos
! array of objects info for selected key
Definition: TBufferSQL2.h:48
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:42
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:51
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:47
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.