76 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
77 for (TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin(); iter != end;
81 (*iter).PrintDebug(*
this, obj);
86 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
87 for (TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin(); iter != end;
103 void *end_collection)
110 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
111 for (TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin(); iter != end;
116 *
this, *(
char **)start_collection);
117 (*iter)(*
this, start_collection, end_collection);
121 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
122 for (TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin(); iter != end;
126 (*iter)(*
this, start_collection, end_collection);
137 void *end_collection)
148 void *arr0 = loopconfig->
GetFirstAddress(start_collection, end_collection);
150 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
151 for (TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin(); iter != end;
155 (*iter).PrintDebug(*
this, arr0);
156 (*iter)(*
this, start_collection, end_collection, loopconfig);
160 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
161 for (TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin(); iter != end;
165 (*iter)(*
this, start_collection, end_collection, loopconfig);
188 const_cast<TClass *
>(cl)->BuildRealData(pointer);
190 const_cast<TClass *
>(cl)->SetCurrentStreamerInfo(sinfo);
191 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
193 Info(
"WriteClassBuffer",
"Creating StreamerInfo for class: %s, version: %d", cl->
GetName(),
201 const_cast<TClass *
>(cl)->BuildRealData(pointer);
239 const TClass *onFileClass)
250 Error(
"ReadClassBuffer",
251 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
265 auto ninfos = infos->
GetSize();
266 if (version < -1 || version >= ninfos) {
267 Error(
"ReadBuffer1",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
280 const_cast<TClass *
>(cl)->BuildRealData(pointer);
284 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
286 Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d", cl->
GetName(), version);
288 }
else if (version == 0) {
295 Error(
"ReadClassBuffer",
296 "Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
304 const_cast<TClass *
>(cl)->BuildRealData(pointer);
353 Error(
"ReadClassBuffer",
354 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
377 if (version < -1 || version >= infocapacity) {
378 Error(
"ReadClassBuffer",
379 "class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
390 const_cast<TClass *
>(cl)->BuildRealData(pointer);
414 auto ninfos = infos->
GetSize();
415 if (!(version < -1 || version >= ninfos)) {
419 const_cast<TClass *
>(cl)->BuildRealData(pointer);
422 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
424 Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d", cl->
GetName(),
428 sinfo->
Clear(
"build");
434 }
else if (version == 0) {
441 Error(
"ReadClassBuffer",
442 "Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
453 if (sinfo->TStreamerInfo::IsRecovered())
460 Info(
"ReadClassBuffer",
"for class: %s has read %d bytes", cl->
GetName(), R__c);
709 char *pnt =
nullptr, *exp =
nullptr, *lastdecimal =
nullptr, *s = sbuf;
710 bool negative_exp =
false;
712 while (*s && --
len) {
714 case '.': pnt = s;
break;
716 case 'e': exp = s;
break;
723 if ((*s <
'0') || (*s >
'9'))
726 power = power * 10 + (*s -
'0');
727 else if (pnt && *s !=
'0')
740 *(lastdecimal + 1) = 0;
744 }
else if (power == 0) {
746 *(lastdecimal + 1) = 0;
749 }
else if (!negative_exp && pnt && exp && (exp - pnt > power)) {
752 for (
int cnt = 0; cnt < power; ++cnt) {
757 if (lastdecimal && (pnt < lastdecimal))
758 *(lastdecimal + 1) = 0;
761 }
else if (negative_exp && pnt && exp && (power < (s - exp))) {
765 *(lastdecimal + 1) = 0;
769 for (
char *pos = lastdecimal + 1; pos >= pnt; --pos)
770 *(pos + power) = *pos;
773 for (
int cnt = 1; cnt < power; ++cnt)
775 }
else if (pnt && exp) {
778 pnt = lastdecimal + 1;
783 else if (*exp ==
'-')
840 }
else if ((
value == std::nearbyint(
value)) && (std::abs(
value) < 1e15)) {
856 }
else if ((
value == std::nearbyint(
value)) && (std::abs(
value) < 1e25)) {
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
R__EXTERN TVirtualMutex * gInterpreterMutex
#define R__LOCKGUARD(mutex)
Direct subclass of TBuffer, implements common methods for TBufferFile and TBufferText classes.
void TagStreamerInfo(TVirtualStreamerInfo *info) override
Mark the classindex of the current file as using this TStreamerInfo.
Base class for text-based streamers like TBufferJSON or TBufferXML Special actions list will use meth...
Int_t CheckByteCount(UInt_t, UInt_t, const TClass *) final
static const char * ConvertFloat(Float_t v, char *buf, unsigned len, Bool_t not_optimize=kFALSE)
convert float to string with configured format
void WriteFastArrayDouble32(const Double_t *d, Long64_t n, TStreamerElement *ele=nullptr) final
Write array of Double32_t to buffer.
static const char * GetFloatFormat()
return current printf format for float members, default "%e"
Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele=nullptr) override
Read array of Double32_t from buffer.
void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=nullptr) final
read array of Float16_t from buffer
void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=nullptr) final
read array of Double32_t from buffer
Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele=nullptr) override
Read array of Float16_t from buffer.
void ReadWithNbits(Float_t *ptr, Int_t nbits) final
Read a Float16_t from the buffer when the number of bits is specified (explicitly or not) see comment...
TBufferText()
Default constructor.
void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=nullptr) final
Write array of Double32_t to buffer.
Int_t WriteClassBuffer(const TClass *cl, void *pointer) override
Function called by the Streamer functions to serialize object at p to buffer b.
static void CompactFloatString(char *buf, unsigned len)
method compress float string, excluding exp and/or move float point
void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue) final
read array of Float16_t from buffer
static const char * ConvertDouble(Double_t v, char *buf, unsigned len, Bool_t not_optimize=kFALSE)
convert float to string with configured format
void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=nullptr) override
stream object to/from buffer
Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection) final
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=nullptr) final
Write array of Float16_t to buffer.
void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits) final
read array of Float16_t from buffer
void ReadFloat16(Float_t *f, TStreamerElement *ele=nullptr) final
read a Float16_t from the buffer
Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object) final
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
void SkipVersion(const TClass *cl=nullptr) final
Skip class version from I/O buffer.
virtual void WriteBaseClass(void *start, TStreamerBase *elem)
Write data of base class.
~TBufferText() override
destructor
void SetByteCount(UInt_t, Bool_t=kFALSE) final
Int_t ReadStaticArrayFloat16(Float_t *f, TStreamerElement *ele=nullptr) final
Read array of Float16_t from buffer.
Int_t ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele=nullptr) final
Read array of Double32_t from buffer.
static const char * fgDoubleFmt
! printf argument for doubles, either "%f" or "%e" or "%10f" and so on
virtual void ReadBaseClass(void *start, TStreamerBase *elem)
Read data of base class.
static void SetFloatFormat(const char *fmt="%e")
set printf format for float/double members, default "%e" to change format only for doubles,...
Int_t ReadClassBuffer(const TClass *, void *, const TClass *=nullptr) override
Deserialize information from a buffer into an object.
void WriteFloat16(Float_t *f, TStreamerElement *ele=nullptr) final
write a Float16_t to the buffer
static const char * GetDoubleFormat()
return current printf format for double members, default "%.14e"
void ReadDouble32(Double_t *d, TStreamerElement *ele=nullptr) final
read a Double32_t from the buffer
void WriteFastArrayFloat16(const Float_t *d, Long64_t n, TStreamerElement *ele=nullptr) final
Write array of Float16_t to buffer.
void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue) final
Read a Double32_t from the buffer when the factor and minimun value have been specified see comments ...
void WriteDouble32(Double_t *d, TStreamerElement *ele=nullptr) final
write a Double32_t to the 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 Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual void ReadDouble(Double_t &d)=0
virtual void WriteDouble(Double_t d)=0
void SetParent(TObject *parent)
Set parent owning this buffer.
TObject * GetParent() const
Return pointer to parent of this buffer.
virtual void ReadFloat(Float_t &f)=0
@ kCannotHandleMemberWiseStreaming
virtual void SetStreamerElementNumber(TStreamerElement *elem, Int_t comp_type)=0
virtual void WriteArray(const Bool_t *b, Int_t n)=0
virtual Int_t ReadArray(Bool_t *&b)=0
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual void IncrementLevel(TVirtualStreamerInfo *info)=0
virtual void DecrementLevel(TVirtualStreamerInfo *)=0
virtual Int_t ReadStaticArray(Bool_t *b)=0
virtual void WriteFastArray(const Bool_t *b, Long64_t n)=0
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
virtual void WriteFloat(Float_t f)=0
TClass instances represent classes, structs and namespaces in the ROOT type system.
TVirtualStreamerInfo * GetCurrentStreamerInfo()
void SetLastReadInfo(TVirtualStreamerInfo *info)
TVirtualStreamerInfo * GetLastReadInfo() const
const TObjArray * GetStreamerInfos() const
TVirtualStreamerInfo * GetConversionStreamerInfo(const char *onfile_classname, Int_t version) const
Return a Conversion StreamerInfo from the class 'classname' for version number 'version' to this clas...
Version_t GetClassVersion() const
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.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
const char * GetName() const override
Returns name of object.
TObject * UncheckedAt(Int_t i) const
Mother of all ROOT objects.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TClass * IsA() const
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Int_t WriteBuffer(TBuffer &b, char *pointer)
Write the base class into the buffer.
Int_t ReadBuffer(TBuffer &b, char *pointer)
Read the content of the buffer.
TLoopConfiguration * fLoopConfig
If this is a bundle of memberwise streaming action, this configures the looping.
TVirtualStreamerInfo * fStreamerInfo
StreamerInfo used to derive these actions.
ActionContainer_t fActions
Base class of the Configurations for the member wise looping routines.
virtual void * GetFirstAddress(void *start, const void *end) const =0
Describes a persistent version of a class.
Int_t GetClassVersion() const override
void BuildEmulated(TFile *file) override
Create an Emulation TStreamerInfo object.
void Build(Bool_t isTransient=kFALSE) override
Build the I/O data structure for the current class version.
void BuildOld() override
rebuild the TStreamerInfo structure
void SetClassVersion(Int_t vers) override
TStreamerInfoActions::TActionSequence * GetReadTextActions()
TStreamerInfoActions::TActionSequence * GetWriteTextActions()
void Clear(Option_t *="") override
If opt contains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (usef...
Abstract Interface class describing Streamer information for one class.
Int_t IsRecovered() const
Bool_t IsCompiled() const