107 TClass *clActual =
nullptr;
108 void *ptr = (
void *)obj;
118 return ConvertToXML(ptr, clActual, GenericLayout, UseNamespaces);
169 return (
TObject *)(((
char *)obj) + delta);
190 void *obj = buf.
XmlReadAny(xmlnode,
nullptr, cl);
204 TClass *objClass =
nullptr;
207 if (!res || !objClass)
210 if (objClass == expectedClass)
215 ::Error(
"TBufferXML::ConvertFromXMLChecked",
"expected class %s is not base for read class %s",
221 return (
char *)res -
offset;
305 fStack.emplace_back(std::make_unique<TXMLStackObj>(current));
306 return fStack.back().get();
316 return fStack.size() > 0 ?
fStack.back().get() :
nullptr;
325 return stack ? stack->
fNode :
nullptr;
392 if (!node || (
Length() == 0))
398 char *fZipBuffer =
nullptr;
404 if ((
Length() > 512) && (compressionLevel > 0)) {
405 int zipBufferSize =
Length();
406 fZipBuffer =
new char[zipBufferSize + 9];
408 int compressedSize = 0;
409 R__zipMultipleAlgorithm(compressionLevel, &dataSize,
Buffer(), &zipBufferSize, fZipBuffer, &compressedSize,
410 compressionAlgorithm);
411 if (compressedSize > 0) {
413 srcSize = compressedSize;
416 fZipBuffer =
nullptr;
421 constexpr std::size_t sbufSize = 500;
427 while (srcCnt++ < srcSize) {
428 tgt +=
snprintf(tgt, sbufSize - (tgt - sbuf),
" %02x", (
unsigned char)*
src);
430 if (block++ == 100) {
459 char *fUnzipBuffer =
nullptr;
462 Info(
"XmlReadBlock",
"Block size = %d, Length = %d, Compressed = %d", blockSize,
Length(), blockCompressed);
468 Int_t readSize = blockSize;
472 if (blockCompressed) {
474 fUnzipBuffer =
new char[zipSize];
480 char *ptr = (
char *)content.
Data();
483 Info(
"XmlReadBlock",
"Content %s", ptr);
485 for (
int i = 0; i < readSize; i++) {
486 while ((*ptr < 48) || ((*ptr > 57) && (*ptr < 97)) || (*ptr > 102))
489 int b_hi = (*ptr > 57) ? *ptr - 87 : *ptr - 48;
491 int b_lo = (*ptr > 57) ? *ptr - 87 : *ptr - 48;
494 *tgt = b_hi * 16 + b_lo;
498 Info(
"XmlReadBlock",
" Buf[%d] = %d", i, b_hi * 16 + b_lo);
503 int srcsize(0), tgtsize(0), unzipRes(0);
507 R__unzip(&readSize, (
unsigned char *)fUnzipBuffer, &blockSize, (
unsigned char *)
Buffer(), &unzipRes);
509 if (status != 0 || unzipRes != blockSize)
510 Error(
"XmlReadBlock",
"Decompression error %d", unzipRes);
512 Info(
"XmlReadBlock",
"Unzip ok");
514 delete[] fUnzipBuffer;
548 if (refvalue.
Length() > 0) {
588 Error(
"ExtractPointer",
"not found ptr %s result %p %s", ptrid, ptr, (cl ? cl->
GetName() :
"null"));
607 Error(
"ExtractReference",
"Reference tag %s not started from %s", refid,
xmlio::IdBase);
616 Info(
"ExtractReference",
"Find reference %s for object %p class %s", refid, ptr, (cl ? cl->
GetName() :
"null"));
654 if ((!cont || (strcmp(cont,
value) != 0))) {
656 Error(
"VerifyAttr",
"%s : attr %s = %s, expected: %s", errinfo,
name, cont,
value);
775 ((
TClass *)cl)->Streamer((
void *)obj, *
this);
780 Info(
"XmlWriteObject",
"Done write for class: %s", cl ? cl->
GetName() :
"null");
804 TClass *objClass =
nullptr;
819 Error(
"XmlReadObject",
"Cannot find class %s", clname.
Data());
825 Info(
"XmlReadObject",
"Reading object of class %s", clname.
Data());
828 obj = objClass->
New();
834 objClass->
Streamer((
void *)obj, *
this);
841 Info(
"XmlReadObject",
"Reading object of class %s done", clname.
Data());
876 Info(
"IncrementLevel",
"Class: %s", clname.
Data());
886 if (compressClassNode) {
908 if (!compressClassNode) {
921 stack->
fInfo = sinfo;
946 stack->
fInfo =
nullptr;
981 Error(
"SetStreamerElementNumber",
"stack is empty");
994 Error(
"SetStreamerElementNumber",
"Lost of stack");
999 Error(
"SetStreamerElementNumber",
"Problem in Inc/Dec level");
1006 Error(
"SetStreamerElementNumber",
"Problem in Inc/Dec level");
1012 Info(
"SetStreamerElementNumber",
" Next element %s", elem->
GetName());
1025 Info(
"SetStreamerElementNumber",
" Expects base class %s with standard streamer",
1107 if (!
name || (strlen(
name) == 0)) {
1108 Error(
"ClassMember",
"Invalid member name");
1115 Int_t typ_id(-1), comp_type(-1);
1117 if (strcmp(typeName,
"raw:data") == 0)
1128 if (strcmp(
name, typeName) == 0) {
1136 if (tname[tname.
Length() - 1] ==
'*') {
1142 Error(
"ClassMember",
"Invalid class specifier %s", typeName);
1167 }
else if ((typ_id > 0) && (typ_id < 20)) {
1184 Error(
"ClassMember",
"Invalid combination name = %s type = %s",
name, typeName);
1211 if (!elem || !elemnode)
1219 XMLNodePointer_t nodecharstar(
nullptr), nodeuchar(
nullptr), nodeint(
nullptr), nodestring(
nullptr);
1238 nodecharstar = node;
1265 XMLNodePointer_t vnode =
nullptr, idnode =
nullptr, bitsnode =
nullptr, prnode =
nullptr;
1290 if (!vnode || !idnode || !bitsnode)
1294 fXML->
NewAttr(elemnode,
nullptr,
"fUniqueID", str);
1298 sscanf(str.
Data(),
"%u", &bits);
1302 snprintf(sbuf,
sizeof(sbuf),
"%x", bits);
1307 fXML->
NewAttr(elemnode,
nullptr,
"fProcessID", str);
1325 if (!elem || !elemnode)
1376 sscanf(bitsstr.
Data(),
"%x", &bits);
1379 snprintf(sbuf,
sizeof(sbuf),
"%u", bits);
1384 if (prstr.
Length() > 0) {
1405 const char *clname =
nullptr;
1411 Info(
"ReadClass",
"Try to read class %s", clname ? clname :
"---");
1413 return clname ?
gROOT->GetClass(clname) :
nullptr;
1422 Info(
"WriteClass",
"Try to write class %s", cl->
GetName());
1448 Error(
"ReadVersion",
"No correspondent tags to read version");
1453 Info(
"ReadVersion",
"Version = %d", res);
1520 Info(
"WriteObject",
"Class %s", (actualClass ? actualClass->
GetName() :
" null"));
1527template <
typename T>
1530 Int_t indx = 0, cnt, curr;
1531 while (indx < arrsize) {
1538 arr[indx++] = arr[curr];
1546template <
typename T>
1563 ShiftStack(is_static ?
"readstatarr" :
"readarr");
1780template <
typename T>
1814 memcpy(
c, buf,
size);
1924 const TClass *onFileClass)
1928 (*streamer)(*
this, start, 0);
1932 int objectSize = cl->
Size();
1933 char *obj = (
char *)start;
1934 char *end = obj +
n * objectSize;
1936 for (; obj < end; obj += objectSize)
1948 const TClass *onFileClass)
1962 for (
Int_t j = 0; j <
n; j++) {
1964 start[j] = cl->
New();
1968 (*streamer)(*
this, (
void *)start, oldStyle ?
n : 0);
1974 for (
Int_t j = 0; j <
n; j++) {
1977 start[j] = ((
TClass *)cl)->New();
1978 ((
TClass *)cl)->Streamer(start[j], *
this);
1982 void *old = start[j];
2008 for (
Int_t j = 0; j <
n; j++) {
2010 start[j] = ((
TClass *)cl)->New();
2011 ((
TClass *)cl)->Streamer(start[j], *
this, onFileClass);
2016template <
typename T>
2021 while (indx < arrsize) {
2023 Int_t curr = indx++;
2024 while ((indx < arrsize) && (arr[indx] == arr[curr]))
2026 if (indx - curr > 1)
2030 for (
Int_t indx = 0; indx < arrsize; indx++)
2039template <
typename T>
2159template <
typename T>
2189 for (
int i = 0; i <
n; i++) {
2311 (*streamer)(*
this, start, 0);
2315 char *obj = (
char *)start;
2321 ((
TClass *)cl)->Streamer(obj, *
this);
2348 (*streamer)(*
this, (
void *)start, oldStyle ?
n : 0);
2358 for (
Int_t j = 0; j <
n; j++) {
2360 if (!strInfo && !start[j] && !oldStyle) {
2370 ((
TClass *)cl)->Streamer(start[j], *
this);
2378 for (
Int_t j = 0; j <
n; j++) {
2380 start[j] = ((
TClass *)cl)->New();
2381 ((
TClass *)cl)->Streamer(start[j], *
this);
2395 ((
TObject *)obj)->TObject::Streamer(*
this);
2398 ((
TNamed *)obj)->TNamed::Streamer(*
this);
2405 Info(
"StreamObject",
"Class: %s", (cl ? cl->
GetName() :
"none"));
2559 char *
data =
new char[nbig+1];
2580 Error(
"ReadStdString",
"The std::string address is nullptr but should not");
2595 obj->resize(nbig,
'\0');
2598 obj->resize(nwh,
'\0');
2621 s =
new char[nch + 1];
2791 Int_t nbig = obj->length();
2867 std::string buf = std::to_string(
value);
2944 std::string buf = std::to_string(
value);
2975 sscanf(res,
"%d", &
n);
2988 sscanf(res,
"%hd", &
value);
3000 sscanf(res,
"%d", &
value);
3012 sscanf(res,
"%ld", &
value);
3036 sscanf(res,
"%f", &
value);
3048 sscanf(res,
"%lf", &
value);
3073 sscanf(res,
"%ud", &
n);
3086 sscanf(res,
"%hud", &
value);
3098 sscanf(res,
"%u", &
value);
3110 sscanf(res,
"%lu", &
value);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
unsigned long long ULong64_t
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
void R__unzip(Int_t *nin, UChar_t *bufin, Int_t *lout, char *bufout, Int_t *nout)
int R__unzip_header(Int_t *nin, UChar_t *bufin, Int_t *lout)
void InitMap() override
Create the fMap container and initialize them with the null object.
void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force) override
force writing the TStreamerInfo to the file
TExMap * fMap
Map containing object,offset pairs for reading/writing.
void MapObject(const TObject *obj, UInt_t offset=1) override
Add object to the fMap container.
Long64_t GetObjectTag(const void *obj)
Returns tag for specified object from objects map (if exists) Returns 0 if object not included into o...
static R__ALWAYS_INLINE ULong_t Void_Hash(const void *ptr)
Return hash value for provided object.
void GetMappedObject(UInt_t tag, void *&ptr, TClass *&ClassPtr) const override
Retrieve the object stored in the buffer's object map at 'tag' Set ptr and ClassPtr respectively to t...
Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
Base class for text-based streamers like TBufferJSON or TBufferXML Special actions list will use meth...
static const char * ConvertFloat(Float_t v, char *buf, unsigned len, Bool_t not_optimize=kFALSE)
convert float to string with configured format
static const char * ConvertDouble(Double_t v, char *buf, unsigned len, Bool_t not_optimize=kFALSE)
convert float to string with configured format
Class for serializing/deserializing object to/from xml.
Bool_t ProcessPointer(const void *ptr, XMLNodePointer_t node)
Add "ptr" attribute to node, if ptr is null or if ptr is pointer on object, which is already saved in...
void WriteLong(Long_t l) final
Writes Long_t value to buffer.
void SetXML(TXMLEngine *xml)
Int_t GetCompressionSettings() const
TXMLStackObj * PushStack(XMLNodePointer_t current, Bool_t simple=kFALSE)
Add new level to xml stack.
Bool_t VerifyAttr(XMLNodePointer_t node, const char *name, const char *value, const char *errinfo=nullptr)
Checks, that attribute of specified name exists and has specified value.
void WorkWithClass(TStreamerInfo *info, const TClass *cl=nullptr)
Prepares buffer to stream data of specified class.
Bool_t VerifyStackNode(const char *name, const char *errinfo=nullptr)
Check, if stack node has specified name.
Int_t GetCompressionAlgorithm() const
void ReadUShort(UShort_t &s) final
Reads UShort_t value from buffer.
void ReadUInt(UInt_t &i) final
Reads UInt_t value from buffer.
Int_t fCompressLevel
! Compression level and algorithm
void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Used to specify the compression level and algorithm.
TString fValueBuf
! Current value buffer
void StreamObject(void *obj, const TClass *cl, const TClass *onFileClass=nullptr) final
Stream object to/from buffer.
Int_t GetCompressionLevel() const
void WriteStdString(const std::string *s) final
Writes a std::string.
void ReadDouble(Double_t &d) final
Reads Double_t value from buffer.
TBufferXML(TBuffer::EMode mode)
Creates buffer object to serialize/deserialize data to/from xml.
Bool_t VerifyNode(XMLNodePointer_t node, const char *name, const char *errinfo=nullptr)
Check if node has specified name.
void ReadFastArrayString(Char_t *c, Int_t n) final
Read array of n characters from the I/O buffer.
void WriteLong64(Long64_t l) final
Writes Long64_t value to buffer.
void WriteChar(Char_t c) final
Writes Char_t value to buffer.
TXMLEngine * fXML
! instance of TXMLEngine for working with XML structures
std::deque< std::unique_ptr< TXMLStackObj > > fStack
! Stack of processed objects
static TString ConvertToXML(const TObject *obj, Bool_t GenericLayout=kFALSE, Bool_t UseNamespaces=kFALSE)
Converts object, inherited from TObject class, to XML string GenericLayout defines layout choice for ...
void WriteFloat(Float_t f) final
Writes Float_t value to buffer.
void ReadTString(TString &s) final
Reads a TString.
void WriteTString(const TString &s) final
Writes a TString.
void IncrementLevel(TVirtualStreamerInfo *) final
Function is called from TStreamerInfo WriteBuffer and ReadBuffer functions and indent new level in xm...
void SetIOVersion(Int_t v)
void WriteArray(const Bool_t *b, Int_t n) final
Write array of Bool_t to buffer.
XMLNodePointer_t XmlWriteAny(const void *obj, const TClass *cl)
Convert object of any class to xml structures Return pointer on top xml element.
void XmlReadBasic(Char_t &value)
Reads string from current xml node and convert it to Char_t value.
void ReadULong(ULong_t &l) final
Reads ULong_t value from buffer.
Int_t GetIOVersion() const
R__ALWAYS_INLINE void XmlWriteArrayContent(const T *arr, Int_t arrsize)
XMLNodePointer_t XmlWriteValue(const char *value, const char *name)
Create xml node with specified name and adds it to stack node.
void SkipObjectAny() final
Skip any kind of object from buffer Actually skip only one node on current level of xml structure.
Bool_t VerifyStackAttr(const char *name, const char *value, const char *errinfo=nullptr)
Checks stack attribute.
void ReadFloat(Float_t &f) final
Reads Float_t value from buffer.
void ReadULong64(ULong64_t &l) final
Reads ULong64_t value from buffer.
XMLNodePointer_t XmlWriteBasic(Char_t value)
Converts Char_t to string and add xml node to buffer.
void ShiftStack(const char *info=nullptr)
Shift stack node to next.
void PerformPreProcessing(const TStreamerElement *elem, XMLNodePointer_t elemnode)
Function is unpack TObject and TString structures to be able read them from custom streamers of this ...
void ReadShort(Short_t &s) final
Reads Short_t value from buffer.
void BeforeIOoperation()
Function is called before any IO operation of TBuffer Now is used to store version value if no proper...
TClass * ReadClass(const TClass *cl=nullptr, UInt_t *objTag=nullptr) final
Function to read class from buffer, used in old-style streamers.
Int_t fErrorFlag
! Error flag
void ReadChar(Char_t &c) final
Reads Char_t value from buffer.
R__ALWAYS_INLINE void XmlReadArrayContent(T *arr, Int_t arrsize)
Template method to read array content.
void ClassEnd(const TClass *) final
Should be called at the end of custom streamer See TBufferXML::ClassBegin for more details.
void ReadLong64(Long64_t &l) final
Reads Long64_t value from buffer.
Version_t fVersionBuf
! Current version buffer
void ClassBegin(const TClass *, Version_t=-1) final
Should be called at the beginning of custom class streamer.
void XmlReadBlock(XMLNodePointer_t node)
Read binary block of data from xml.
void * XmlReadObject(void *obj, TClass **cl=nullptr)
Read object from the buffer.
void ReadCharP(Char_t *c) final
Reads array of characters from buffer.
R__ALWAYS_INLINE void XmlWriteFastArray(const T *arr, Long64_t n)
Write array without size attribute Also treat situation, when instead of one single array chain of se...
Bool_t fCanUseCompact
! Flag indicate that basic type (like Int_t) can be placed in the same tag
R__ALWAYS_INLINE void XmlWriteArray(const T *arr, Int_t arrsize)
Write array, including it size Content may be compressed.
void ReadStdString(std::string *s) final
Reads a std::string.
void WriteFastArrayString(const Char_t *c, Long64_t n) final
Write array of n characters into the I/O buffer.
void ReadBool(Bool_t &b) final
Reads Bool_t value from buffer.
void Streamer(TBuffer &) override
Stream an object of class TObject.
void WriteUShort(UShort_t s) final
Writes UShort_t value to buffer.
void WriteClass(const TClass *cl) final
Function to write class into buffer, used in old-style streamers.
void WriteCharStar(char *s) final
Write a char* string.
const char * XmlReadValue(const char *name)
read string value from current stack node
Bool_t ExtractPointer(XMLNodePointer_t node, void *&ptr, TClass *&cl)
Searches for "ptr" attribute and returns pointer to object and class, if "ptr" attribute reference to...
void ReadFastArray(Bool_t *b, Int_t n) final
Read array of Bool_t from buffer.
void DecrementLevel(TVirtualStreamerInfo *) final
Function is called from TStreamerInfo WriteBuffer and ReadBuffer functions and decrease level in xml ...
void PerformPostProcessing()
Function is converts TObject and TString structures to more compact representation.
void SetStreamerElementNumber(TStreamerElement *elem, Int_t comp_type) final
Function is called from TStreamerInfo WriteBuffer and ReadBuffer functions and add/verify next elemen...
void WriteCharP(const Char_t *c) final
Writes array of characters to buffer.
static TObject * ConvertFromXML(const char *str, Bool_t GenericLayout=kFALSE, Bool_t UseNamespaces=kFALSE)
Read object from XML, produced by ConvertToXML() method.
void ClassMember(const char *name, const char *typeName=nullptr, Int_t arrsize1=-1, Int_t arrsize2=-1) final
Method indicates name and typename of class member, which should be now streamed in custom streamer.
Int_t ReadStaticArray(Bool_t *b) final
Read array of Bool_t from buffer.
void * XmlReadAny(XMLNodePointer_t node, void *obj, TClass **cl)
Recreate object from xml structure.
XMLNodePointer_t StackNode()
Return pointer on current xml node.
void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse) final
Write object to buffer. Only used from TBuffer.
R__ALWAYS_INLINE void XmlReadFastArray(T *arr, Int_t n)
Template method to read content of array, which not include size of array Also treated situation,...
Bool_t VerifyItemNode(const char *name, const char *errinfo=nullptr)
Checks, if stack node is item and has specified name.
static void * ConvertFromXMLChecked(const char *xml, const TClass *expectedClass, Bool_t GenericLayout=kFALSE, Bool_t UseNamespaces=kFALSE)
Convert from XML and check if object derived from specified class When possible, cast to given class.
void * ReadObjectAny(const TClass *clCast) final
Read object from buffer. Only used from TBuffer.
void ReadLong(Long_t &l) final
Reads Long_t value from buffer.
void ExtractReference(XMLNodePointer_t node, const void *ptr, const TClass *cl)
Analyze if node has "ref" attribute and register it to object map.
void SetCompressionLevel(Int_t level=ROOT::RCompressionSetting::ELevel::kUseMin)
See comments for function SetCompressionSettings.
Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr) final
Read version value from buffer.
void ReadInt(Int_t &i) final
Reads Int_t value from buffer.
Int_t ReadArray(Bool_t *&b) final
Read array of Bool_t from buffer.
void SetCompressionAlgorithm(Int_t algorithm=ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
See comments for function SetCompressionSettings.
void WriteDouble(Double_t d) final
Writes Double_t value to buffer.
void CheckVersionBuf()
Checks buffer, filled by WriteVersion if next data is arriving, version should be stored in buffer.
XMLNodePointer_t XmlWriteObject(const void *obj, const TClass *objClass, Bool_t cacheReuse)
Write object to buffer If object was written before, only pointer will be stored Return pointer to to...
TXMLFile * XmlFile()
Returns pointer to TXMLFile object.
TVirtualStreamerInfo * GetInfo() final
Return current streamer info element.
void WriteUInt(UInt_t i) final
Writes UInt_t value to buffer.
void WorkWithElement(TStreamerElement *elem, Int_t comp_type)
This function is a part of SetStreamerElementNumber method.
void WriteBool(Bool_t b) final
Writes Bool_t value to buffer.
void XmlWriteBlock(XMLNodePointer_t node)
Write binary data block from buffer to xml.
TClass * fExpectedBaseClass
! Pointer to class, which should be stored as parent of current
void WriteShort(Short_t s) final
Writes Short_t value to buffer.
void WriteULong64(ULong64_t l) final
Writes ULong64_t value to buffer.
TXMLStackObj * Stack(UInt_t depth=0)
XMLNodePointer_t CreateItemNode(const char *name)
Create item node of specified name.
void WriteULong(ULong_t l) final
Writes ULong_t value to buffer.
TXMLStackObj * PopStack()
Remove one level from xml stack.
void CreateElemNode(const TStreamerElement *elem)
Create xml node correspondent to TStreamerElement object.
static void * ConvertFromXMLAny(const char *str, TClass **cl=nullptr, Bool_t GenericLayout=kFALSE, Bool_t UseNamespaces=kFALSE)
Read object of any class from XML, produced by ConvertToXML() method.
~TBufferXML() override
Destroy xml buffer.
Bool_t VerifyElemNode(const TStreamerElement *elem)
Checks if stack node correspond to TStreamerElement object.
R__ALWAYS_INLINE Int_t XmlReadArray(T *&arr, bool is_static=false)
Template method to read array with size attribute If necessary, array is created.
void ReadCharStar(char *&s) final
Read a char* string.
void ReadUChar(UChar_t &c) final
Reads UChar_t value from buffer.
void WriteFastArray(const Bool_t *b, Long64_t n) final
Write array of Bool_t to buffer.
UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE) final
Copies class version to buffer, but not writes it to xml Version will be written with next I/O operat...
void WriteUChar(UChar_t c) final
Writes UChar_t value to buffer.
void WriteInt(Int_t i) final
Writes Int_t value to buffer.
TObject * GetParent() const
Return pointer to parent of this buffer.
void Expand(Int_t newsize, Bool_t copy=kTRUE)
Expand (or shrink) the I/O buffer to newsize bytes.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=nullptr) const
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
Int_t Size() const
Return size of object of this class.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=nullptr, bool isDerivedObject=true)
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Version_t GetClassVersion() const
TClass * GetActualClass(const void *object) const
Return a pointer to the real class of the object.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Basic data type descriptor (datatype information is obtained from CINT).
void Add(ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table. The key should be unique.
virtual void SetOnFileClass(const TClass *cl)
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
Int_t IndexOf(const TObject *obj) const override
Mother of all ROOT objects.
@ kIsOnHeap
object is on heap
@ kNotDeleted
object has not been deleted
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual ~TObject()
TObject destructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
virtual void SetMaxIndex(Int_t dim, Int_t max)
set maximum index for array with dimension dim
Describes a persistent version of a class.
TClass * GetClass() const override
TObjArray * GetElements() const override
Int_t Atoi() const
Return integer value of string.
const char * Data() const
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
Abstract Interface class describing Streamer information for one class.
static Bool_t CanDelete()
static function returning true if ReadBuffer can delete object
virtual TClass * GetClass() const =0
XMLNodePointer_t NewChild(XMLNodePointer_t parent, XMLNsPointer_t ns, const char *name, const char *content=nullptr)
create new child element for parent node
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
returns first child of xmlnode
XMLAttrPointer_t NewAttr(XMLNodePointer_t xmlnode, XMLNsPointer_t, const char *name, const char *value)
creates new attribute for xmlnode, namespaces are not supported for attributes
void SaveSingleNode(XMLNodePointer_t xmlnode, TString *res, Int_t layout=1)
convert single xmlnode (and its child node) to string if layout<=0, no any spaces or newlines will be...
XMLAttrPointer_t NewIntAttr(XMLNodePointer_t xmlnode, const char *name, Int_t value)
create node attribute with integer value
Bool_t HasAttr(XMLNodePointer_t xmlnode, const char *name)
checks if node has attribute of specified name
XMLNodePointer_t ReadSingleNode(const char *src)
read single xmlnode from provided string
const char * GetNodeContent(XMLNodePointer_t xmlnode)
get contents (if any) of xmlnode
const char * GetNodeName(XMLNodePointer_t xmlnode)
returns name of xmlnode
void FreeAttr(XMLNodePointer_t xmlnode, const char *name)
remove attribute from xmlnode
const char * GetAttr(XMLNodePointer_t xmlnode, const char *name)
returns value of attribute for xmlnode
XMLNsPointer_t NewNS(XMLNodePointer_t xmlnode, const char *reference, const char *name=nullptr)
create namespace attribute for xmlnode.
Int_t GetIntAttr(XMLNodePointer_t node, const char *name)
returns value of attribute as integer
void UnlinkFreeNode(XMLNodePointer_t xmlnode)
combined operation. Unlink node and free used memory
void FreeNode(XMLNodePointer_t xmlnode)
release all memory, allocated from this node and destroys node itself
void SkipEmpty(XMLNodePointer_t &xmlnode)
Skip all current empty nodes and locate on first "true" node.
void ShiftToNext(XMLNodePointer_t &xmlnode, Bool_t realnode=kTRUE)
shifts specified node to next if realnode==kTRUE, any special nodes in between will be skipped
TClass * XmlDefineClass(const char *xmlClassName)
define class for the converted class name, where special symbols were replaced by '_'
const char * XmlClassNameSpaceRef(const TClass *cl)
produce string which used as reference in class namespace definition
EXMLLayout GetXmlLayout() const
virtual void SetUseNamespaces(Bool_t iUseNamespaces=kTRUE)
const char * XmlConvertClassName(const char *name)
convert class name to exclude any special symbols like ':', '<' '>' ',' and spaces
Int_t AtoI(const char *sbuf, Int_t def=0, const char *errinfo=nullptr)
converts string to integer.
const char * XmlGetElementName(const TStreamerElement *el)
return converted name for TStreamerElement
Int_t GetNextRefCounter()
Bool_t IsUseNamespaces() const
virtual void SetXmlLayout(EXMLLayout layout)
Bool_t fCompressedClassNode
Bool_t IsStreamerInfo() const
TXMLStackObj(XMLNodePointer_t node)
const char * ClassVersion
EValues
Note: this is only temporarily a struct and will become a enum class hence the name.
@ kUndefined
Undefined compression algorithm (must be kept the last of the list in case a new algorithm is added).
@ kUseMin
Compression level reserved when we are not sure what to use (1 is for the fastest compression)