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);
236 const TClass *onFileClass)
247 Error(
"ReadClassBuffer",
248 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
262 auto ninfos = infos->
GetSize();
263 if (version < -1 || version >= ninfos) {
264 Error(
"ReadBuffer1",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
277 const_cast<TClass *
>(cl)->BuildRealData(pointer);
281 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
283 Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d", cl->
GetName(), version);
285 }
else if (version == 0) {
292 Error(
"ReadClassBuffer",
293 "Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
301 const_cast<TClass *
>(cl)->BuildRealData(pointer);
337 if (
file &&
file->GetVersion() < 30000) {
350 Error(
"ReadClassBuffer",
351 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
374 if (version < -1 || version >= infocapacity) {
375 Error(
"ReadClassBuffer",
376 "class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
387 const_cast<TClass *
>(cl)->BuildRealData(pointer);
411 auto ninfos = infos->
GetSize();
412 if (!(version < -1 || version >= ninfos)) {
416 const_cast<TClass *
>(cl)->BuildRealData(pointer);
419 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
421 Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d", cl->
GetName(),
425 sinfo->
Clear(
"build");
431 }
else if (version == 0) {
438 Error(
"ReadClassBuffer",
439 "Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
450 if (sinfo->TStreamerInfo::IsRecovered())
457 Info(
"ReadClassBuffer",
"for class: %s has read %d bytes", cl->
GetName(), R__c);
706 char *pnt =
nullptr, *exp =
nullptr, *lastdecimal =
nullptr, *s = sbuf;
707 bool negative_exp =
false;
709 while (*s && --len) {
711 case '.': pnt = s;
break;
713 case 'e': exp = s;
break;
720 if ((*s <
'0') || (*s >
'9'))
723 power = power * 10 + (*s -
'0');
724 else if (pnt && *s !=
'0')
737 *(lastdecimal + 1) = 0;
741 }
else if (power == 0) {
743 *(lastdecimal + 1) = 0;
746 }
else if (!negative_exp && pnt && exp && (exp - pnt > power)) {
749 for (
int cnt = 0; cnt < power; ++cnt) {
754 if (lastdecimal && (pnt < lastdecimal))
755 *(lastdecimal + 1) = 0;
758 }
else if (negative_exp && pnt && exp && (power < (s - exp))) {
762 *(lastdecimal + 1) = 0;
766 for (
char *pos = lastdecimal + 1; pos >= pnt; --pos)
767 *(pos + power) = *pos;
770 for (
int cnt = 1; cnt < power; ++cnt)
772 }
else if (pnt && exp) {
775 pnt = lastdecimal + 1;
780 else if (*exp ==
'-')
837 }
else if ((value == std::nearbyint(value)) && (std::abs(value) < 1e15)) {
853 }
else if ((value == std::nearbyint(value)) && (std::abs(value) < 1e25)) {
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
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
virtual ~TBufferText()
destructor
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.
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 WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=nullptr) final
Write array of Double32_t to buffer.
void ReadDouble32(Double_t *d, TStreamerElement *ele=nullptr) final
read a Double32_t from the buffer
void WriteFastArrayFloat16(const Float_t *d, Int_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 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
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=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 UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
virtual void WriteFloat(Float_t f)=0
virtual void WriteFastArray(const Bool_t *b, Int_t n)=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 a suite of consecutive data records (TKey instances) with a well defined format.
virtual const char * GetName() const
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 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.
void SetClassVersion(Int_t vers)
void Clear(Option_t *)
If opt contains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (usef...
TStreamerInfoActions::TActionSequence * GetReadTextActions()
TStreamerInfoActions::TActionSequence * GetWriteTextActions()
void Build(Bool_t isTransient=kFALSE)
Build the I/O data structure for the current class version.
void BuildEmulated(TFile *file)
Create an Emulation TStreamerInfo object.
Int_t GetClassVersion() const
void BuildOld()
rebuild the TStreamerInfo structure
Abstract Interface class describing Streamer information for one class.
Int_t IsRecovered() const
Bool_t IsCompiled() const