4 #ifndef ROOT_TBufferSQL2 5 #define ROOT_TBufferSQL2 105 Int_t streamer_index = 0);
107 const TClass *onFileClass = 0);
109 Int_t streamer_index = 0,
const TClass *onFileClass = 0);
112 const TClass *onFileClass =
nullptr);
114 template <
typename T>
117 template <
typename T>
120 template <
typename T>
123 template <
typename T>
R__ALWAYS_INLINE void SqlReadFastArray(T *arr, Int_t arrsize)
Template method to read content of array, which not include size of array.
virtual void IncrementLevel(TVirtualStreamerInfo *)
Function is called from TStreamerInfo WriteBuffer and Readbuffer functions and indent new level in da...
Int_t GetErrorFlag() const
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...
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.
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 ReadTString(TString &s)
Read a TString.
Int_t fCompressLevel
! compress level used to minimize size of data in database
Int_t fIOVersion
! I/O version from TSQLFile
Contains information about tables specific to one class and version.
virtual void ReadUShort(UShort_t &s)
Reads UShort_t value from buffer.
virtual void ReadBool(Bool_t &b)
Reads Bool_t value from buffer.
Int_t fErrorFlag
! Error id value
TSQLStructure * fStructure
! structures, created by object storing
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
Int_t fReadVersionBuffer
! buffer, used to by ReadVersion method
TSQLStructure * PushStack()
Push stack with structural 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 StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=nullptr)
stream object to/from buffer
virtual void WriteDouble(Double_t d)
Writes Double_t value to buffer.
R__ALWAYS_INLINE void SqlReadArrayContent(T *arr, Int_t arrsize, Bool_t withsize)
Template method to read array content.
#define ClassDef(name, id)
TSQLFile * fSQL
! instance of TSQLFile
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.
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.
TBufferSQL2()
Default constructor, should not be used.
virtual void ReadCharP(Char_t *c)
Reads array of characters from buffer.
virtual TVirtualStreamerInfo * GetInfo()
Return current streamer info element.
R__ALWAYS_INLINE Int_t SqlReadArray(T *&arr, Bool_t is_static=kFALSE)
Access an SQL db via the TFile interface.
TSQLStructure * GetStructure() const
virtual void WriteLong(Long_t l)
Writes Long_t value to buffer.
TSQLStructure * fStk
! pointer on current active structure (stack head)
virtual void StreamObject(void *obj, const TClass *cl, const TClass *onFileClass=nullptr)
Stream object to/from buffer.
TSQLStructure * Stack(Int_t depth=0)
returns head of stack
The ROOT global object gROOT contains a list of all defined classes.
virtual void WriteArray(const Bool_t *b, Int_t n)
Write array of Bool_t to buffer.
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
Write array of n characters into the I/O 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.
Converts data to SQL statements or read data from SQL tables.
virtual void ReadDouble(Double_t &d)
Reads Double_t value from buffer.
Base class for text-based streamers like TBufferJSON or TBufferXML Special actions list will use meth...
R__ALWAYS_INLINE void SqlWriteArray(T *arr, Int_t arrsize, Bool_t withsize=kFALSE)
void SqlReadBasic(Char_t &value)
Read current value from table and convert it to Char_t value.
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 ...
unsigned long long ULong64_t
const char * SqlReadCharStarValue()
Read CharStar value, if it has special code, request it from large table.
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.
void SetCompressionLevel(int level)
virtual void ReadChar(Char_t &c)
Reads Char_t value from buffer.
virtual void WriteInt(Int_t i)
Writes Int_t value to buffer.
void StreamObjectExtra(void *obj, TMemberStreamer *streamer, const TClass *cl, Int_t n=0, const TClass *onFileClass=nullptr)
Stream object to/from buffer.
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 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
Long64_t fObjIdCounter
! counter of objects id
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 ...
virtual void ReadFastArrayString(Char_t *c, Int_t n)
Read array of n characters from the I/O buffer.
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 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.
Long64_t fFirstObjId
! id of first object to be read from the database
TString fReadBuffer
! Buffer for read value
virtual void WriteStdString(const std::string *s)=0
void SetIgnoreVerification()
Long64_t fLastObjId
! id of last object correspond to this key
TObjArray * fObjectsInfos
! array of objects info for selected key
virtual void WriteUInt(UInt_t i)
Writes UInt_t value to buffer.
TMap * fPoolsMap
! map of pools with data from different tables
void * SqlReadAny(Long64_t keyid, Long64_t objid, TClass **cl, void *obj=nullptr)
Recreate object from sql structure.
This class stores a (key,value) pair using an external hash.
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 void ReadUChar(UChar_t &c)
Reads UChar_t value from buffer.
TSQLObjectData * fCurrentData
!
const char * SqlReadValue(const char *tname)
Read string value from current stack node.
virtual void ReadFastArray(Bool_t *b, Int_t n)
Read array of Bool_t from buffer.
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.