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