39 #if (defined(__linux) || defined(__APPLE__)) && defined(__i386__) && \ 79 fInfo(nullptr), fInfoStack()
105 TBufferIO(mode,bufsiz,buf,adopt,reallocfunc),
148 char *sw = (
char *)x;
158 char *sw = (
char *)x;
165 memcpy(x, buf,
sizeof(
Long_t));
232 if (obj ==
nullptr) {
233 Error(
"TBufferFile::ReadStdString",
"The std::string address is nullptr but should not");
248 obj->resize(nbig,
'\0');
252 obj->resize(nwh,
'\0');
270 Int_t nbig = obj->length();
322 char *buf = (
char *)(
fBuffer + cntpos);
367 const char *
name = clss ? clss->
GetName() : classname ? classname : 0;
371 Error(
"CheckByteCount",
"object of class %s read too few bytes: %d instead of %d",
372 name,bcnt+offset,bcnt);
375 Error(
"CheckByteCount",
"object of class %s read too many bytes: %d instead of %d",
376 name,bcnt+offset,bcnt);
378 Warning(
"CheckByteCount",
"%s::Streamer() not in sync with data on file %s, fix Streamer()",
381 Warning(
"CheckByteCount",
"%s::Streamer() not in sync with data, fix Streamer()",
385 if ( ((
char *)endpos) >
fBufMax ) {
387 Error(
"CheckByteCount",
388 "Byte count probably corrupted around buffer position %d:\n\t%d for a possible maximum of %d",
389 startpos, bcnt, offset);
440 if (!nbits) nbits = 12;
476 ptr[0] = (
Float_t)(aint/factor + minvalue);
495 temp.fIntValue = theExp;
496 temp.fIntValue <<= 23;
497 temp.fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
498 if(1<<(nbits+1) & theMan) temp.fFloatValue = -temp.fFloatValue;
499 ptr[0] = temp.fFloatValue;
511 ptr[0] = (
Double_t)(aint/factor + minvalue);
530 temp.fIntValue = theExp;
531 temp.fIntValue <<= 23;
532 temp.fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
533 if(1<<(nbits+1) & theMan) temp.fFloatValue = -temp.fFloatValue;
534 ptr[0] = (
Double_t)temp.fFloatValue;
600 if (x < xmin) x =
xmin;
601 if (x > xmax) x =
xmax;
607 if (!nbits) nbits = 12;
617 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
620 if (theMan&1<<nbits) theMan = (1<<nbits) - 1;
621 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
664 if (x < xmin) x =
xmin;
665 if (x > xmax) x =
xmax;
685 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1)) ;
688 if (theMan&1<<nbits) theMan = (1<<nbits)-1 ;
689 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
708 if (n <= 0 || n >
fBufSize)
return 0;
713 for (
int i = 0; i <
n; i++)
737 if (l <= 0 || l >
fBufSize)
return 0;
760 if (l <= 0 || l >
fBufSize)
return 0;
769 for (
int i = 0; i <
n; i++)
793 if (l <= 0 || l >
fBufSize)
return 0;
795 if (!ii) ii =
new Int_t[
n];
802 for (
int i = 0; i <
n; i++)
826 if (l <= 0 || l >
fBufSize)
return 0;
852 if (l <= 0 || l >
fBufSize)
return 0;
857 for (
int i = 0; i <
n; i++)
880 if (l <= 0 || l >
fBufSize)
return 0;
889 for (
int i = 0; i <
n; i++)
913 if (l <= 0 || l >
fBufSize)
return 0;
918 for (
int i = 0; i <
n; i++)
941 if (n <= 0 || 3*n >
fBufSize)
return 0;
963 if (n <= 0 || 3*n >
fBufSize)
return 0;
983 if (n <= 0 || n >
fBufSize)
return 0;
988 for (
int i = 0; i <
n; i++)
1011 if (l <= 0 || l >
fBufSize)
return 0;
1033 if (l <= 0 || l >
fBufSize)
return 0;
1038 # ifdef USE_BSWAPCPY 1042 for (
int i = 0; i <
n; i++)
1065 if (l <= 0 || l >
fBufSize)
return 0;
1070 # ifdef USE_BSWAPCPY 1074 for (
int i = 0; i <
n; i++)
1097 if (l <= 0 || l >
fBufSize)
return 0;
1122 if (l <= 0 || l >
fBufSize)
return 0;
1127 for (
int i = 0; i <
n; i++)
1149 if (n <= 0 || l >
fBufSize)
return 0;
1154 # ifdef USE_BSWAPCPY 1158 for (
int i = 0; i <
n; i++)
1181 if (n <= 0 || l >
fBufSize)
return 0;
1186 for (
int i = 0; i <
n; i++)
1208 if (n <= 0 || 3*n >
fBufSize)
return 0;
1229 if (n <= 0 || 3*n >
fBufSize)
return 0;
1243 if (n <= 0 || n >
fBufSize)
return;
1245 if (
sizeof(
Bool_t) > 1) {
1246 for (
int i = 0; i <
n; i++)
1260 if (n <= 0 || n >
fBufSize)
return;
1275 if (lenchar < 255) {
1281 if (len <= 0 || len >
fBufSize)
return;
1283 if (len >= n) len = n-1;
1301 if (n <= 0 || l >
fBufSize)
return;
1304 # ifdef USE_BSWAPCPY 1308 for (
int i = 0; i <
n; i++)
1323 if (l <= 0 || l >
fBufSize)
return;
1326 # ifdef USE_BSWAPCPY 1330 for (
int i = 0; i <
n; i++)
1345 if (l <= 0 || l >
fBufSize)
return;
1361 if (l <= 0 || l >
fBufSize)
return;
1364 for (
int i = 0; i <
n; i++)
1378 if (l <= 0 || l >
fBufSize)
return;
1381 # ifdef USE_BSWAPCPY 1385 for (
int i = 0; i <
n; i++)
1400 if (l <= 0 || l >
fBufSize)
return;
1403 for (
int i = 0; i <
n; i++)
1417 if (n <= 0 || 3*n >
fBufSize)
return;
1423 for (
int j=0;j <
n; j++) {
1424 UInt_t aint; *
this >> aint; f[j] = (
Float_t)(aint/factor + xmin);
1430 if (!nbits) nbits = 12;
1439 for (i = 0; i <
n; i++) {
1444 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1445 if(1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1457 if (n <= 0 || 3*n >
fBufSize)
return;
1460 for (
int j=0;j <
n; j++) {
1461 UInt_t aint; *
this >> aint; ptr[j] = (
Float_t)(aint/factor + minvalue);
1471 if (n <= 0 || 3*n >
fBufSize)
return;
1473 if (!nbits) nbits = 12;
1482 for (
Int_t i = 0; i <
n; i++) {
1487 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1488 if(1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1489 ptr[i] = fFloatValue;
1499 if (n <= 0 || 3*n >
fBufSize)
return;
1505 for (
int j=0;j <
n; j++) {
1506 UInt_t aint; *
this >> aint; d[j] = (
Double_t)(aint/factor + xmin);
1515 for (i = 0; i <
n; i++) {
1528 for (i = 0; i <
n; i++) {
1533 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1534 if (1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1547 if (n <= 0 || 3*n >
fBufSize)
return;
1550 for (
int j=0;j <
n; j++) {
1551 UInt_t aint; *
this >> aint; d[j] = (
Double_t)(aint/factor + minvalue);
1561 if (n <= 0 || 3*n >
fBufSize)
return;
1566 for (
Int_t i = 0; i <
n; i++) {
1579 for (
Int_t i = 0; i <
n; i++) {
1584 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1585 if (1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1601 (*streamer)(*
this,start,0);
1605 int objectSize = cl->
Size();
1606 char *obj = (
char*)start;
1607 char *end = obj + n*objectSize;
1609 for(; obj<end; obj+=objectSize) ((
TClass*)cl)->Streamer(obj,*
this, onFileClass);
1627 for (
Int_t j=0;j<
n;j++) {
1628 if (!start[j]) start[j] = cl->
New();
1632 (*streamer)(*
this,(
void*)start,0);
1638 for (
Int_t j=0; j<
n; j++){
1640 void *old = start[j];
1642 if (old && old!=start[j] &&
1667 for (
Int_t j=0; j<
n; j++){
1668 if (!start[j]) start[j] = ((
TClass*)cl)->New();
1669 ((
TClass*)cl)->Streamer(start[j],*
this,onFileClass);
1691 if (
sizeof(
Bool_t) > 1) {
1692 for (
int i = 0; i <
n; i++)
1737 # ifdef USE_BSWAPCPY 1741 for (
int i = 0; i <
n; i++)
1767 # ifdef USE_BSWAPCPY 1771 for (
int i = 0; i <
n; i++)
1835 for (
int i = 0; i <
n; i++)
1860 # ifdef USE_BSWAPCPY 1864 for (
int i = 0; i <
n; i++)
1890 for (
int i = 0; i <
n; i++)
1948 if (
sizeof(
Bool_t) > 1) {
1949 for (
int i = 0; i <
n; i++)
2003 # ifdef USE_BSWAPCPY 2007 for (
int i = 0; i <
n; i++)
2027 # ifdef USE_BSWAPCPY 2031 for (
int i = 0; i <
n; i++)
2079 for (
int i = 0; i <
n; i++)
2098 # ifdef USE_BSWAPCPY 2102 for (
int i = 0; i <
n; i++)
2122 for (
int i = 0; i <
n; i++)
2148 for (
int j = 0; j <
n; j++) {
2150 if (x < xmin) x =
xmin;
2151 if (x > xmax) x =
xmax;
2152 UInt_t aint =
UInt_t(0.5+factor*(x-xmin)); *
this << aint;
2158 if (!nbits) nbits = 12;
2167 for (i = 0; i <
n; i++) {
2170 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
2173 if (theMan&1<<nbits) theMan = (1<<nbits) - 1;
2174 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
2199 for (
int j = 0; j <
n; j++) {
2201 if (x < xmin) x =
xmin;
2202 if (x > xmax) x =
xmax;
2203 UInt_t aint =
UInt_t(0.5+factor*(x-xmin)); *
this << aint;
2212 for (i = 0; i <
n; i++) {
2224 for (i = 0; i <
n; i++) {
2227 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
2230 if(theMan&1<<nbits) theMan = (1<<nbits) - 1;
2231 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
2247 (*streamer)(*
this, start, 0);
2251 char *obj = (
char*)start;
2253 int size = cl->
Size();
2255 for(
Int_t j=0; j<
n; j++,obj+=size) {
2256 ((
TClass*)cl)->Streamer(obj,*
this);
2275 (*streamer)(*
this,(
void*)start,0);
2285 for (
Int_t j=0;j<
n;j++) {
2287 if (!strInfo && !start[j]) {
2302 for (
Int_t j=0;j<
n;j++) {
2303 if (!start[j]) start[j] = ((
TClass*)cl)->New();
2304 ((
TClass*)cl)->Streamer(start[j],*
this);
2362 TClass *clOnfile =
nullptr;
2363 Int_t baseOffset = 0;
2364 if (clRef && (clRef!=(
TClass*)(-1)) && clCast) {
2367 if (baseOffset == -1) {
2374 Error(
"ReadObject",
"got object of wrong class! requested %s but got %s",
2382 Info(
"ReadObjectAny",
"Using Converter StreamerInfo from %s to %s",clRef->
GetName(),clCast->
GetName());
2383 clRef =
const_cast<TClass*
>(clCast);
2388 Error(
"ReadObject",
"trying to read an emulated class (%s) to store in a compiled pointer (%s)",
2400 if (obj == (
void*) -1) obj =
nullptr;
2403 return (obj + baseOffset);
2408 if (clRef == (
TClass*) -1) {
2426 Error(
"ReadObject",
"object tag too large, I/O buffer corrupted");
2434 if (clRef && (clRef!=(
TClass*)(-1)) && clCast) {
2437 if (baseOffset == -1) {
2438 Error(
"ReadObject",
"Got object of wrong class (Got %s while expecting %s)",
2456 obj = (
char*)clRef->
New();
2458 Error(
"ReadObject",
"could not create object of class %s",
2471 clRef->
Streamer( obj, *
this, clOnfile );
2476 return obj+baseOffset;
2493 if (!actualObjectStart) {
2521 Warning(
"WriteObjectAny",
"since %s has no public constructor\n" 2522 "\twhich can be called without argument, objects of this class\n" 2523 "\tcan not be read with the current library. You will need to\n" 2524 "\tadd a default constructor before attempting to read it.",
2552 ((
TClass*)actualClass)->Streamer((
void*)actualObjectStart,*
this);
2572 if (fBufCur < fBuffer || fBufCur >
fBufMax) {
2577 UInt_t bcnt, tag, startpos = 0;
2590 if (objTag) *objTag = tag;
2613 UInt_t clTag = (tag & ~kClassMask);
2620 Error(
"ReadClass",
"illegal class tag=%d (0<tag<=%d), I/O buffer corrupted",
2635 Error(
"ReadClass",
"The on-file class is \"'%s\" which is not compatible with the requested class: \"%s\"",
2641 if (objTag) *objTag = (bcnt & ~kByteCountMask);
2644 if (!cl) cl = (
TClass*)-1;
2720 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" in %s.",
2723 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" (buffer with no parent)",
2735 const TList *list = ((
TFile*)fParent)->GetStreamerInfoCache();
2743 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" in %s.",
2744 checksum, cl->
GetName(), ((
TFile*)fParent)->GetName());
2749 Error(
"SkipVersion",
"Class %s not known to file %s.",
2799 && (
v.cnt &&
v.cnt >= 6)
2806 return vinfo->TStreamerInfo::GetClassVersion();
2816 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" in %s.",
2819 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" (buffer with no parent)",
2830 if (
v.cnt &&
v.cnt >= 6)
2839 const TList *list = ((
TFile*)fParent)->GetStreamerInfoCache();
2847 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" in %s.",
2848 checksum, cl->
GetName(), ((
TFile*)fParent)->GetName());
2853 Error(
"ReadVersion",
"Class %s not known to file %s.",
2925 return vinfo->TStreamerInfo::GetClassVersion();
2950 const TList *list = ((
TFile*)fParent)->GetStreamerInfoCache();
2965 Error(
"ReadVersion",
"Class %s not known to file %s.",
2988 if (version<=1 && cl->IsForeign()) {
2993 Error(
"WriteVersion",
"version number cannot be larger than %hd)",
3018 if (version<=1 && cl->IsForeign()) {
3019 Error(
"WriteVersionMemberWise",
"Member-wise streaming of foreign collection not yet implemented!");
3024 Error(
"WriteVersionMemberWise",
"version number cannot be larger than %hd)",
3043 else Warning(
"StreamObject",
"No TClass for the type %s is available, the object was not read.", typeinfo.name());
3053 else Warning(
"StreamObject",
"No TClass for the type %s is available, the object was not read.", className);
3061 ((
TClass*)cl)->Streamer(obj, *
this, (
TClass*)onFileClass );
3069 obj->Streamer(*
this);
3094 if (!offset)
return offset;
3114 Warning(
"CheckObject",
"reference to unavailable class %s," 3115 " pointers of this type will be 0", cl->
GetName());
3117 Warning(
"CheckObject",
"reference to an unavailable class," 3118 " pointers of that type will be 0");
3123 }
else if (cli == -1) {
3144 Warning(
"CheckObject",
"reference to object of unavailable class %s, offset=%d" 3145 " pointer will be 0", cl ? cl->
GetName() :
"TObject",offset);
3151 }
else if (cli == -1) {
3171 if (max == 0)
return 0;
3188 if (max == 0)
return;
3211 while (nr < max-1) {
3231 WriteBuf(s, (strlen(s)+1)*
sizeof(
char));
3288 Error(
"ReadClassBuffer",
3289 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
3303 auto ninfos = infos->
GetSize();
3304 if (version < -1 || version >= ninfos) {
3305 Error(
"ReadClassBuffer",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
3311 if (sinfo ==
nullptr) {
3318 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3322 const_cast<TClass*
>(cl)->RegisterStreamerInfo(sinfo);
3323 if (
gDebug > 0)
Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d", cl->
GetName(), version);
3325 }
else if (version==0) {
3332 Error(
"ReadClassBuffer",
"Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
3340 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3388 Error(
"ReadClassBuffer",
3389 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
3412 if (version < -1 || version >= infocapacity) {
3413 Error(
"ReadClassBuffer",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
3425 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3430 if (sinfo->
IsCompiled()) const_cast<TClass*>(cl)->SetLastReadInfo(sinfo);
3435 if (sinfo ==
nullptr) {
3448 auto ninfos = infos->
GetSize();
3449 if (!(version < -1 || version >= ninfos)) {
3453 const_cast<TClass *
>(cl)->BuildRealData(pointer);
3456 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
3458 Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d",
3462 sinfo->
Clear(
"build");
3468 }
else if (version==0) {
3475 Error(
"ReadClassBuffer",
"Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
3486 if (sinfo->TStreamerInfo::IsRecovered()) R__c=0;
3491 if (
gDebug > 2)
Info(
"ReadClassBuffer",
"For class: %s has read %d bytes", cl->
GetName(), R__c);
3507 if (sinfo ==
nullptr) {
3510 sinfo = (
TStreamerInfo*)const_cast<TClass*>(cl)->GetCurrentStreamerInfo();
3511 if (sinfo ==
nullptr) {
3512 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3514 const_cast<TClass*
>(cl)->SetCurrentStreamerInfo(sinfo);
3515 const_cast<TClass*
>(cl)->RegisterStreamerInfo(sinfo);
3523 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3550 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3551 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3554 (*iter).PrintDebug(*
this,obj);
3560 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3561 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3579 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3580 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3583 (*iter).PrintDebug(*
this,*(
char**)start_collection);
3584 (*iter)(*
this,start_collection,end_collection);
3589 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3590 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3593 (*iter)(*
this,start_collection,end_collection);
3611 void *arr0 = start_collection ? loopconfig->
GetFirstAddress(start_collection,end_collection) : 0;
3613 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3614 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3617 (*iter).PrintDebug(*
this,arr0);
3618 (*iter)(*
this,start_collection,end_collection,loopconfig);
3623 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3624 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3627 (*iter)(*
this,start_collection,end_collection,loopconfig);
Bool_t HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
virtual TClass * ReadClass(const TClass *cl=0, UInt_t *objTag=0)
Read class definition from I/O buffer.
Describe Streamer information for one class version.
virtual void IncrementLevel(TVirtualStreamerInfo *info)
Increment level.
virtual const char * GetName() const
Returns name of object.
void SetBufferOffset(Int_t offset=0)
TStreamerInfoActions::TActionSequence * GetWriteObjectWiseActions()
static Bool_t CanDelete()
static function returning true if ReadBuffer can delete object
virtual ~TBufferFile()
Delete an I/O buffer object.
void Add(ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table. The key should be unique.
void frombuf(char *&buf, Bool_t *x)
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method). ...
virtual void CheckCount(UInt_t offset)
Check if offset is not too large (< kMaxMapCount) when writing.
void Remove(ULong64_t hash, Long64_t key)
Remove entry with specified key from the TExMap.
virtual void WriteString(const char *s)
Write string to I/O buffer.
virtual Int_t ReadArray(Bool_t *&b)
Read array of bools from the I/O buffer.
const UInt_t kMaxMapCount
virtual void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0)
Write array of n floats (as truncated float) into the I/O buffer.
virtual Version_t ReadVersionForMemberWise(const TClass *cl=0)
Read class version from I/O buffer.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
ActionContainer_t fActions
virtual void WriteClass(const TClass *cl)
Write class description to I/O buffer.
void BuildEmulated(TFile *file)
Create an Emulation TStreamerInfo object.
virtual void WriteFloat16(Float_t *f, TStreamerElement *ele=0)
Write a Float16_t to the buffer.
Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
TLoopConfiguration * fLoopConfig
If this is a bundle of memberwise streaming action, this configures the looping.
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...
TObject * GetParent() const
Return pointer to parent of this buffer.
virtual void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0)
Write array of n doubles (as float) into the I/O buffer.
virtual void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits)
Read array of n floats (written as truncated float) from the I/O buffer.
virtual Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele=0)
Read array of doubles (written as float) from the I/O buffer.
virtual void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue)
Read array of n floats (written as truncated float) from the I/O buffer.
R__EXTERN TVirtualMutex * gInterpreterMutex
const UInt_t kByteCountMask
virtual void ReadTString(TString &s)
Read TString from TBuffer.
virtual UInt_t WriteVersionMemberWise(const TClass *cl, Bool_t useBcnt=kFALSE)
Write class version to I/O buffer after setting the kStreamedMemberWise bit in the version number...
virtual void ReadDouble32(Double_t *d, TStreamerElement *ele=0)
Read a Double32_t from the buffer, see comments about Double32_t encoding at TBufferFile::WriteDouble...
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)
Write class version to I/O buffer.
static bool Class_Has_StreamerInfo(const TClass *cl)
Thread-safe check on StreamerInfos of a TClass.
const Version_t kMaxVersion
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)
Set byte count at position cntpos in the buffer.
virtual void WriteCharStar(char *s)
Write char* into TBuffer.
virtual Int_t ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele=0)
Read array of doubles (written as float) from the I/O buffer.
Short_t Min(Short_t a, Short_t b)
virtual void InitMap()
Create the fMap container and initialize them with the null object.
virtual void * ReadObjectAny(const TClass *cast)
Read object from I/O buffer.
const UInt_t kNewClassTag
UInt_t CheckObject(UInt_t offset, const TClass *cl, Bool_t readClass=kFALSE)
Check for object in the read map.
virtual void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0)
Write array of n floats (as truncated float) into the I/O buffer.
virtual void ReadLong(Long_t &l)
Read Long from TBuffer.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
Write array of n characters into the I/O buffer.
void * bswapcpy32(void *to, const void *from, size_t n)
Int_t fMapCount
Number of objects or classes in map.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
virtual TObject * ReadObject(const TClass *cl)
Read object from I/O buffer.
Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss, const char *classname)
Check byte count with current buffer position.
virtual void SkipObjectAny()
Skip any kind of object from buffer.
virtual void * GetFirstAddress(void *start, const void *end) const =0
virtual Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele=0)
Read array of floats (written as truncated float) from the I/O buffer.
void * bswapcpy16(void *to, const void *from, size_t n)
virtual void ReadCharStar(char *&s)
Read char* from TBuffer.
virtual char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
virtual void WriteStdString(const std::string *s)
Write std::string to TBuffer.
virtual Int_t ReadBuf(void *buf, Int_t max)
Read max bytes from the I/O buffer into buf.
void tobuf(char *&buf, Bool_t x)
Int_t fDisplacement
Value to be added to the map offsets.
const TObjArray * GetStreamerInfos() const
virtual void ReadStdString(std::string *s)
Read std::string from TBuffer.
Base class of the Configurations for the member wise looping routines.
const Version_t kByteCountVMask
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)
Function called by the Streamer functions to serialize object at p to buffer b.
virtual Version_t ReadVersionNoCheckSum(UInt_t *start=0, UInt_t *bcnt=0)
Read class version from I/O buffer, when the caller knows for sure that there is no checksum written/...
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class)
Deserialize information from a buffer into an object.
virtual Int_t ReadStaticArrayFloat16(Float_t *f, TStreamerElement *ele=0)
Read array of floats (written as truncated float) from the I/O buffer.
virtual void WriteTString(const TString &s)
Write TString to TBuffer.
TStreamerInfo * fInfo
Pointer to TStreamerInfo object writing/reading the buffer.
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse)
Write object to I/O buffer.
Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection)
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
Bool_t IsCompiled() const
Int_t GetLast() const
Return index of last object in array.
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
virtual Int_t ReadStaticArray(Bool_t *b)
Read array of bools from the I/O buffer.
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
void BuildOld()
rebuild the TStreamerInfo structure
void Clear(Option_t *)
If opt contains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (usef...
UInt_t GetCheckSum() const
TVirtualStreamerInfo * GetLastReadInfo() const
Int_t IsRecovered() const
virtual void MapObject(const TObject *obj, UInt_t offset=1)
Add object to the fMap container.
virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=0)
Stream an object given its C++ typeinfo information.
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE)
Write object to I/O buffer.
Bool_t HasDefaultConstructor() const
virtual Int_t ReadClassEmulated(const TClass *cl, void *object, const TClass *onfile_class)
Read emulated class.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TExMap * fClassMap
Map containing object,class pairs for reading.
Int_t Size() const
Return size of object of this class.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)
Read class version from I/O buffer.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SkipVersion(const TClass *cl=0)
Skip class version from I/O buffer.
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual void WriteBuf(const void *buf, Int_t max)
Write max bytes from buf into the I/O buffer.
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
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...
void SetClassVersion(Int_t vers)
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
Bool_t MatchLegacyCheckSum(UInt_t checksum) const
Return true if the checksum passed as argument is one of the checksum value produced by the older che...
virtual void WriteArray(const Bool_t *b, Int_t n)
Write array of n bools into the I/O buffer.
virtual void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=0)
Read array of n doubles (written as float) from the I/O buffer.
void Clobber(Ssiz_t nc)
Clear string and make sure it has a capacity of nc.
Version_t GetClassVersion() const
void Build()
Build the I/O data structure for the current class version.
TObject * UncheckedAt(Int_t i) const
virtual void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=0)
Read array of n floats (written as truncated float) from the I/O buffer.
Double_t GetFactor() const
virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=0)
Write a Double32_t to the buffer.
TExMap * fMap
Map containing object,offset pairs for reading/writing.
static constexpr double s
#define R__LOCKGUARD(mutex)
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 void ReadFloat16(Float_t *f, TStreamerElement *ele=0)
Read a Float16_t from the buffer, see comments about Float16_t encoding at TBufferFile::WriteFloat16(...
Mother of all ROOT objects.
Int_t GetClassVersion() const
Direct subclass of TBuffer, implements common methods for TBufferFile and TBufferText classes...
static R__ALWAYS_INLINE ULong_t Void_Hash(const void *ptr)
Return hash value for provided object.
virtual void WriteFastArray(const Bool_t *b, Int_t n)
Write array of n bools into the I/O buffer.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
static TClass * Load(TBuffer &b)
Load class description from I/O buffer and return class object.
virtual void TagStreamerInfo(TVirtualStreamerInfo *info)
Mark the classindex of the current file as using this TStreamerInfo.
InfoList_t fInfoStack
Stack of pointers to the TStreamerInfos.
virtual void DecrementLevel(TVirtualStreamerInfo *)
Decrement level.
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
virtual void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue)
Read a Float16_t from the buffer when the factor and minimum value have been specified see comments a...
static void frombufOld(char *&buf, Long_t *x)
Handle old file formats.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
virtual void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force)
force writing the TStreamerInfo to the file
TStreamerInfoActions::TActionSequence * GetReadObjectWiseActions()
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Abstract Interface class describing Streamer information for one class.
virtual void ReadFastArrayString(Char_t *c, Int_t n)
Read array of n characters from the I/O buffer.
virtual void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0)
Write array of n doubles (as float) into the I/O buffer.
virtual void SetOnFileClass(const TClass *cl)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table.
void AutoExpand(Int_t size_needed)
Automatically calculate a new size and expand the buffer to fit at least size_needed.
virtual void ReadFastArray(Bool_t *b, Int_t n)
Read array of n bools from the I/O buffer.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.