12#ifndef ROOT_TBufferText
13#define ROOT_TBufferText
32 virtual void StreamObject(
void *obj,
const std::type_info &typeinfo,
const TClass *onFileClass =
nullptr);
33 virtual void StreamObject(
void *obj,
const char *className,
const TClass *onFileClass =
nullptr);
39 void *end_collection);
87 Error(
"ReadBuf",
"useless in text streamers");
94 Error(
"ReadString",
"useless");
101 Error(
"ReadVersionForMemberWise",
"not defined in text-based streamers");
106 Error(
"WriteVersionMemberWise",
"not defined in text-based streamers");
112 Error(
"ReadObject",
"not yet implemented for text-based streamers");
119 Error(
"ReadClassEmulated",
"not defined in text-based streamers");
#define ClassDef(name, id)
Direct subclass of TBuffer, implements common methods for TBufferFile and TBufferText classes.
Base class for text-based streamers like TBufferJSON or TBufferXML Special actions list will use meth...
virtual Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
virtual void WriteBuf(const void *, Int_t)
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 * GetFloatFormat()
return current printf format for float members, default "%e"
virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=nullptr)
stream object to/from buffer
virtual ~TBufferText()
destructor
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 ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=nullptr)
read array of Double32_t from buffer
TBufferText()
Default constructor.
virtual void WriteFloat16(Float_t *f, TStreamerElement *ele=nullptr)
write a Float16_t to the buffer
virtual Int_t ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele=nullptr)
Read array of Double32_t from buffer.
static void CompactFloatString(char *buf, unsigned len)
method compress float string, excluding exp and/or move float point
virtual void SetByteCount(UInt_t, Bool_t=kFALSE)
virtual void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=nullptr)
Write array of Double32_t to buffer.
virtual void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=nullptr)
Write array of Double32_t to 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...
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.
static const char * ConvertDouble(Double_t v, char *buf, unsigned len, Bool_t not_optimize=kFALSE)
convert float to string with configured format
virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=nullptr)
write a Double32_t to the buffer
virtual Int_t ReadBuf(void *, Int_t)
virtual UInt_t WriteVersionMemberWise(const TClass *, Bool_t=kFALSE)
virtual Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele=nullptr)
Read array of Float16_t from buffer.
virtual Int_t ReadStaticArrayFloat16(Float_t *f, TStreamerElement *ele=nullptr)
Read array of Float16_t from buffer.
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)
read array of Float16_t from buffer
virtual void ReadFloat16(Float_t *f, TStreamerElement *ele=nullptr)
read a Float16_t from the buffer
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)
Function called by the Streamer functions to serialize object at p to buffer b.
virtual void WriteBaseClass(void *start, TStreamerBase *elem)
Write data of base class.
virtual Int_t ReadClassEmulated(const TClass *, void *, const TClass *=nullptr)
virtual void SkipVersion(const TClass *cl=nullptr)
Skip class version from I/O buffer.
virtual void WriteString(const char *)
virtual void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=nullptr)
Write array of Float16_t to buffer.
virtual Version_t ReadVersionForMemberWise(const TClass *=nullptr)
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=nullptr)
read array of Float16_t from buffer
static const char * fgDoubleFmt
! printf argument for doubles, either "%f" or "%e" or "%10f" and so on
virtual void WriteFastArrayFloat16(const Float_t *d, Int_t n, TStreamerElement *ele=nullptr)
Write array of Float16_t to buffer.
virtual void ReadBaseClass(void *start, TStreamerBase *elem)
Read data of base class.
virtual Int_t ReadClassBuffer(const TClass *, void *, const TClass *=nullptr)
Deserialize information from a buffer into an object.
virtual void ReadDouble32(Double_t *d, TStreamerElement *ele=nullptr)
read a Double32_t from the buffer
static void SetFloatFormat(const char *fmt="%e")
set printf format for float/double members, default "%e" to change format only for doubles,...
virtual char * ReadString(char *, Int_t)
virtual Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele=nullptr)
Read array of Double32_t from buffer.
virtual Int_t CheckByteCount(UInt_t, UInt_t, const char *)
static const char * GetDoubleFormat()
return current printf format for double members, default "%.14e"
virtual Int_t CheckByteCount(UInt_t, UInt_t, const TClass *)
virtual Version_t ReadVersionNoCheckSum(UInt_t *, UInt_t *)
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)
read array of Float16_t from buffer
static const char * fgFloatFmt
! printf argument for floats, either "%f" or "%e" or "%10f" and so on
static void SetDoubleFormat(const char *fmt="%.14e")
set printf format for double members, default "%.14e" use it after SetFloatFormat,...
virtual TObject * ReadObject(const TClass *)
virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=0)=0
TClass instances represent classes, structs and namespaces in the ROOT type system.
This class stores a (key,value) pair using an external hash.
Mother of all ROOT objects.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.