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>
unsigned long long ULong64_t
#define ClassDef(name, id)
Converts data to SQL statements or read data from SQL tables.
Long64_t fObjIdCounter
! counter of objects id
virtual void WriteClass(const TClass *cl)
Suppressed function of 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 ...
TSQLStructure * PopStack()
Pop stack.
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 ReadULong64(ULong64_t &l)
Reads ULong64_t value from buffer.
virtual void ReadChar(Char_t &c)
Reads Char_t value from buffer.
virtual void WriteLong(Long_t l)
Writes Long_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.
R__ALWAYS_INLINE void SqlWriteArray(T *arr, Int_t arrsize, Bool_t withsize=kFALSE)
Long64_t fFirstObjId
! id of first object to be read from the database
Bool_t SqlWriteBasic(Char_t value)
converts Char_t to string and creates correspondent sql structure
TSQLObjectData * fCurrentData
!
Int_t fErrorFlag
! Error id value
virtual ~TBufferSQL2()
Destroy sql buffer.
virtual void ReadUInt(UInt_t &i)
Reads UInt_t value from buffer.
Long64_t fLastObjId
! id of last object correspond to this key
TSQLStructure * PushStack()
Push stack with structural information about streamed object.
virtual void WriteDouble(Double_t d)
Writes Double_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 fIOVersion
! I/O version from TSQLFile
TSQLFile * fSQL
! instance of TSQLFile
void SetIgnoreVerification()
virtual void WriteTString(const TString &s)
Write a TString.
void operator=(const TBufferSQL2 &)
Int_t fReadVersionBuffer
! buffer, used to by ReadVersion method
virtual void ClassBegin(const TClass *, Version_t=-1)
This method inform buffer data of which class now will be streamed.
virtual void ReadCharStar(char *&s)
Read a char* string.
virtual void WriteArray(const Bool_t *b, Int_t n)
Write array of Bool_t to buffer.
virtual void ReadBool(Bool_t &b)
Reads Bool_t value from buffer.
Bool_t fIgnoreVerification
! ignore verification of names
virtual void WriteUShort(UShort_t s)
Writes UShort_t value to buffer.
virtual void WriteFastArray(const Bool_t *b, Int_t n)
Write array of Bool_t to buffer.
virtual void IncrementLevel(TVirtualStreamerInfo *)
Function is called from TStreamerInfo WriteBuffer and Readbuffer functions and indent new level in da...
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 ...
void * SqlReadObject(void *obj, TClass **cl=0, TMemberStreamer *streamer=0, Int_t streamer_index=0, const TClass *onFileClass=0)
Read object from the buffer.
virtual void WriteInt(Int_t i)
Writes Int_t value 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.
TSQLStructure * GetStructure() const
virtual void WriteStdString(const std::string *s)
Write a std::string.
virtual TVirtualStreamerInfo * GetInfo()
Return current streamer info element.
R__ALWAYS_INLINE Int_t SqlReadArray(T *&arr, Bool_t is_static=kFALSE)
virtual void * ReadObjectAny(const TClass *clCast)
Read object from buffer. Only used from TBuffer.
TBufferSQL2()
Default constructor, should not be used.
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 ReadULong(ULong_t &l)
Reads ULong_t value from buffer.
TSQLStructure * fStructure
! structures, created by object storing
virtual void ReadLong64(Long64_t &l)
Reads Long64_t value from buffer.
virtual void WriteCharP(const Char_t *c)
Writes array of characters to buffer.
virtual void ReadFloat(Float_t &f)
Reads Float_t value from buffer.
TBufferSQL2(const TBufferSQL2 &)
virtual void ReadTString(TString &s)
Read a TString.
virtual void WriteChar(Char_t c)
Writes Char_t value to buffer.
virtual void ReadCharP(Char_t *c)
Reads array of characters from buffer.
TMap * fPoolsMap
! map of pools with data from different tables
TSQLStructure * Stack(Int_t depth=0)
returns head of stack
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 WriteUInt(UInt_t i)
Writes UInt_t value to buffer.
void SetCompressionLevel(int level)
const char * SqlReadValue(const char *tname)
Read string value from current stack node.
TString fReadBuffer
! Buffer for read value
virtual void ReadUShort(UShort_t &s)
Reads UShort_t value from buffer.
TSQLStructure * fStk
! pointer on current active structure (stack head)
virtual void WriteLong64(Long64_t l)
Writes Long64_t value to buffer.
const char * SqlReadCharStarValue()
Read CharStar value, if it has special code, request it from large table.
Int_t GetErrorFlag() const
virtual void WriteULong64(ULong64_t l)
Writes ULong64_t value to buffer.
Int_t SqlReadArraySize()
Reads array size, written in raw data table.
void WorkWithClass(const char *classname, Version_t classversion)
This function is a part of IncrementLevel method.
virtual void WriteCharStar(char *s)
Write a char* string.
virtual Int_t ReadArray(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.
virtual void ReadUChar(UChar_t &c)
Reads UChar_t value from buffer.
virtual void ReadDouble(Double_t &d)
Reads Double_t value from buffer.
Bool_t SqlWriteValue(const char *value, const char *tname)
virtual void DecrementLevel(TVirtualStreamerInfo *)
Function is called from TStreamerInfo WriteBuffer and Readbuffer functions and decrease level in sql ...
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
Write array of n characters into the I/O buffer.
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse)
Write object to buffer. Only used from TBuffer.
void WorkWithElement(TStreamerElement *elem, Int_t comp_type)
This function is a part of SetStreamerElementNumber method.
TSQLObjectData * SqlObjectData(Long64_t objid, TSQLClassInfo *sqlinfo)
Creates TSQLObjectData for specified object id and specified class.
virtual void WriteBool(Bool_t b)
Writes Bool_t value to 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 ReadInt(Int_t &i)
Reads Int_t value from buffer.
virtual void StreamObject(void *obj, const TClass *cl, const TClass *onFileClass=nullptr)
Stream object to/from 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 SkipObjectAny()
?????? Skip any kind of object from buffer !!!!!! fix me, not yet implemented Should be just skip of ...
virtual void WriteUChar(UChar_t c)
Writes UChar_t value to buffer.
void * SqlReadAny(Long64_t keyid, Long64_t objid, TClass **cl, void *obj=nullptr)
Recreate object from sql structure.
virtual void WriteShort(Short_t s)
Writes Short_t value to buffer.
virtual void ReadFastArrayString(Char_t *c, Int_t n)
Read array of n characters from the I/O buffer.
virtual void ReadStdString(std::string *s)
Read a std::string.
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 WriteULong(ULong_t l)
Writes ULong_t value to buffer.
TObjArray * fObjectsInfos
! array of objects info for selected key
R__ALWAYS_INLINE void SqlReadArrayContent(T *arr, Int_t arrsize, Bool_t withsize)
Template method to read array content.
void SqlReadBasic(Char_t &value)
Read current value from table and convert it to Char_t value.
virtual void ReadShort(Short_t &s)
Reads Short_t value from buffer.
virtual void WriteFloat(Float_t f)
Writes Float_t value to buffer.
Int_t fCompressLevel
! compress level used to minimize size of data in database
virtual void ReadLong(Long_t &l)
Reads Long_t value from buffer.
virtual void ReadFastArray(Bool_t *b, Int_t n)
Read array of Bool_t from buffer.
Base class for text-based streamers like TBufferJSON or TBufferXML Special actions list will use meth...
virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=nullptr)
stream object to/from buffer
virtual void WriteStdString(const std::string *s)=0
virtual void ReadStdString(std::string *s)=0
The ROOT global object gROOT contains a list of all defined classes.
This class stores a (key,value) pair using an external hash.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Contains information about tables specific to one class and version.
Access an SQL db via the TFile interface.
TSQLObjectData is used in TBufferSQL2 class in reading procedure.
This is hierarchical structure, which is created when data is written by TBufferSQL2.
Abstract Interface class describing Streamer information for one class.
static constexpr double s