38#if (defined(__linux) || defined(__APPLE__)) && defined(__i386__) && \
78 fInfo(nullptr), fInfoStack()
88 fInfo(nullptr), fInfoStack()
104 TBufferIO(mode,bufsiz,buf,adopt,reallocfunc),
105 fInfo(nullptr), fInfoStack()
147 char *sw = (
char *)
x;
157 char *sw = (
char *)
x;
164 memcpy(
x, buf,
sizeof(
Long_t));
175 if (
file &&
file->GetVersion() < 30006) {
231 if (obj ==
nullptr) {
232 Error(
"TBufferFile::ReadStdString",
"The std::string address is nullptr but should not");
247 obj->resize(nbig,
'\0');
251 obj->resize(nwh,
'\0');
269 Int_t nbig = obj->length();
321 char *buf = (
char *)(
fBuffer + cntpos);
366 const char *
name = clss ? clss->
GetName() : classname ? classname : 0;
370 Error(
"CheckByteCount",
"object of class %s read too few bytes: %d instead of %d",
371 name,bcnt+offset,bcnt);
374 Error(
"CheckByteCount",
"object of class %s read too many bytes: %d instead of %d",
375 name,bcnt+offset,bcnt);
377 Warning(
"CheckByteCount",
"%s::Streamer() not in sync with data on file %s, fix Streamer()",
380 Warning(
"CheckByteCount",
"%s::Streamer() not in sync with data, fix Streamer()",
384 if ( ((
char *)endpos) >
fBufMax ) {
386 Error(
"CheckByteCount",
387 "Byte count probably corrupted around buffer position %d:\n\t%d for a possible maximum of %d",
388 startpos, bcnt, offset);
439 if (!nbits) nbits = 12;
475 ptr[0] = (
Float_t)(aint/factor + minvalue);
494 temp.fIntValue = theExp;
495 temp.fIntValue <<= 23;
496 temp.fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
497 if(1<<(nbits+1) & theMan) temp.fFloatValue = -temp.fFloatValue;
498 ptr[0] = temp.fFloatValue;
510 ptr[0] = (
Double_t)(aint/factor + minvalue);
529 temp.fIntValue = theExp;
530 temp.fIntValue <<= 23;
531 temp.fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
532 if(1<<(nbits+1) & theMan) temp.fFloatValue = -temp.fFloatValue;
533 ptr[0] = (
Double_t)temp.fFloatValue;
606 if (!nbits) nbits = 12;
616 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
619 if (theMan&1<<nbits) theMan = (1<<nbits) - 1;
620 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
684 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1)) ;
687 if (theMan&1<<nbits) theMan = (1<<nbits)-1 ;
688 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
707 if (n <= 0 || n >
fBufSize)
return 0;
712 for (
int i = 0; i <
n; i++)
736 if (l <= 0 || l >
fBufSize)
return 0;
759 if (l <= 0 || l >
fBufSize)
return 0;
768 for (
int i = 0; i <
n; i++)
792 if (l <= 0 || l >
fBufSize)
return 0;
794 if (!ii) ii =
new Int_t[
n];
801 for (
int i = 0; i <
n; i++)
825 if (l <= 0 || l >
fBufSize)
return 0;
830 if (
file &&
file->GetVersion() < 30006) {
851 if (l <= 0 || l >
fBufSize)
return 0;
856 for (
int i = 0; i <
n; i++)
879 if (l <= 0 || l >
fBufSize)
return 0;
888 for (
int i = 0; i <
n; i++)
912 if (l <= 0 || l >
fBufSize)
return 0;
917 for (
int i = 0; i <
n; i++)
940 if (n <= 0 || 3*n >
fBufSize)
return 0;
962 if (n <= 0 || 3*n >
fBufSize)
return 0;
982 if (n <= 0 || n >
fBufSize)
return 0;
987 for (
int i = 0; i <
n; i++)
1010 if (l <= 0 || l >
fBufSize)
return 0;
1032 if (l <= 0 || l >
fBufSize)
return 0;
1041 for (
int i = 0; i <
n; i++)
1064 if (l <= 0 || l >
fBufSize)
return 0;
1073 for (
int i = 0; i <
n; i++)
1096 if (l <= 0 || l >
fBufSize)
return 0;
1101 if (
file &&
file->GetVersion() < 30006) {
1121 if (l <= 0 || l >
fBufSize)
return 0;
1126 for (
int i = 0; i <
n; i++)
1148 if (n <= 0 || l >
fBufSize)
return 0;
1157 for (
int i = 0; i <
n; i++)
1180 if (n <= 0 || l >
fBufSize)
return 0;
1185 for (
int i = 0; i <
n; i++)
1207 if (n <= 0 || 3*n >
fBufSize)
return 0;
1228 if (n <= 0 || 3*n >
fBufSize)
return 0;
1242 if (n <= 0 || n >
fBufSize)
return;
1244 if (
sizeof(
Bool_t) > 1) {
1245 for (
int i = 0; i <
n; i++)
1259 if (n <= 0 || n >
fBufSize)
return;
1274 if (lenchar < 255) {
1280 if (len <= 0 || len >
fBufSize)
return;
1282 if (len >=
n) len =
n-1;
1300 if (n <= 0 || l >
fBufSize)
return;
1307 for (
int i = 0; i <
n; i++)
1322 if (l <= 0 || l >
fBufSize)
return;
1329 for (
int i = 0; i <
n; i++)
1344 if (l <= 0 || l >
fBufSize)
return;
1347 if (
file &&
file->GetVersion() < 30006) {
1360 if (l <= 0 || l >
fBufSize)
return;
1363 for (
int i = 0; i <
n; i++)
1377 if (l <= 0 || l >
fBufSize)
return;
1384 for (
int i = 0; i <
n; i++)
1399 if (l <= 0 || l >
fBufSize)
return;
1402 for (
int i = 0; i <
n; i++)
1416 if (n <= 0 || 3*n >
fBufSize)
return;
1422 for (
int j=0;j <
n; j++) {
1429 if (!nbits) nbits = 12;
1438 for (i = 0; i <
n; i++) {
1443 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1444 if(1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1456 if (n <= 0 || 3*n >
fBufSize)
return;
1459 for (
int j=0;j <
n; j++) {
1460 UInt_t aint; *
this >> aint; ptr[j] = (
Float_t)(aint/factor + minvalue);
1470 if (n <= 0 || 3*n >
fBufSize)
return;
1472 if (!nbits) nbits = 12;
1481 for (
Int_t i = 0; i <
n; i++) {
1486 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1487 if(1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1488 ptr[i] = fFloatValue;
1498 if (n <= 0 || 3*n >
fBufSize)
return;
1504 for (
int j=0;j <
n; j++) {
1514 for (i = 0; i <
n; i++) {
1527 for (i = 0; i <
n; i++) {
1532 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1533 if (1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1546 if (n <= 0 || 3*n >
fBufSize)
return;
1549 for (
int j=0;j <
n; j++) {
1550 UInt_t aint; *
this >> aint;
d[j] = (
Double_t)(aint/factor + minvalue);
1560 if (n <= 0 || 3*n >
fBufSize)
return;
1565 for (
Int_t i = 0; i <
n; i++) {
1578 for (
Int_t i = 0; i <
n; i++) {
1583 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1584 if (1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1600 (*streamer)(*
this,start,0);
1604 int objectSize = cl->
Size();
1605 char *obj = (
char*)start;
1606 char *end = obj +
n*objectSize;
1608 for(; obj<end; obj+=objectSize) ((
TClass*)cl)->Streamer(obj,*
this, onFileClass);
1626 for (
Int_t j=0;j<
n;j++) {
1627 if (!start[j]) start[j] = cl->
New();
1631 (*streamer)(*
this,(
void*)start,0);
1637 for (
Int_t j=0; j<
n; j++){
1639 void *old = start[j];
1641 if (old && old!=start[j] &&
1666 for (
Int_t j=0; j<
n; j++){
1667 if (!start[j]) start[j] = ((
TClass*)cl)->New();
1668 ((
TClass*)cl)->Streamer(start[j],*
this,onFileClass);
1690 if (
sizeof(
Bool_t) > 1) {
1691 for (
int i = 0; i <
n; i++)
1740 for (
int i = 0; i <
n; i++)
1770 for (
int i = 0; i <
n; i++)
1834 for (
int i = 0; i <
n; i++)
1863 for (
int i = 0; i <
n; i++)
1889 for (
int i = 0; i <
n; i++)
1947 if (
sizeof(
Bool_t) > 1) {
1948 for (
int i = 0; i <
n; i++)
2006 for (
int i = 0; i <
n; i++)
2030 for (
int i = 0; i <
n; i++)
2078 for (
int i = 0; i <
n; i++)
2101 for (
int i = 0; i <
n; i++)
2121 for (
int i = 0; i <
n; i++)
2147 for (
int j = 0; j <
n; j++) {
2157 if (!nbits) nbits = 12;
2166 for (i = 0; i <
n; i++) {
2169 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
2172 if (theMan&1<<nbits) theMan = (1<<nbits) - 1;
2173 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
2198 for (
int j = 0; j <
n; j++) {
2211 for (i = 0; i <
n; i++) {
2223 for (i = 0; i <
n; i++) {
2226 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
2229 if(theMan&1<<nbits) theMan = (1<<nbits) - 1;
2230 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
2246 (*streamer)(*
this, start, 0);
2250 char *obj = (
char*)start;
2255 ((
TClass*)cl)->Streamer(obj,*
this);
2274 (*streamer)(*
this,(
void*)start,0);
2284 for (
Int_t j=0;j<
n;j++) {
2286 if (!strInfo && !start[j]) {
2301 for (
Int_t j=0;j<
n;j++) {
2302 if (!start[j]) start[j] = ((
TClass*)cl)->New();
2303 ((
TClass*)cl)->Streamer(start[j],*
this);
2361 TClass *clOnfile =
nullptr;
2362 Int_t baseOffset = 0;
2363 if (clRef && (clRef!=(
TClass*)(-1)) && clCast) {
2366 if (baseOffset == -1) {
2373 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());
2384 clRef =
const_cast<TClass*
>(clCast);
2389 Error(
"ReadObject",
"trying to read an emulated class (%s) to store in a compiled pointer (%s)",
2401 if (obj == (
void*) -1) obj =
nullptr;
2404 return (obj + baseOffset);
2409 if (clRef == (
TClass*) -1) {
2427 Error(
"ReadObject",
"object tag too large, I/O buffer corrupted");
2435 if (clRef && (clRef!=(
TClass*)(-1)) && clCast) {
2438 if (baseOffset == -1) {
2439 Error(
"ReadObject",
"Got object of wrong class (Got %s while expecting %s)",
2457 obj = (
char*)clRef->
New();
2459 Error(
"ReadObject",
"could not create object of class %s",
2472 clRef->
Streamer( obj, *
this, clOnfile );
2477 return obj+baseOffset;
2494 if (!actualObjectStart) {
2522 Warning(
"WriteObjectAny",
"since %s has no public constructor\n"
2523 "\twhich can be called without argument, objects of this class\n"
2524 "\tcan not be read with the current library. You will need to\n"
2525 "\tadd a default constructor before attempting to read it.",
2553 ((
TClass*)actualClass)->Streamer((
void*)actualObjectStart,*
this);
2573 if (fBufCur < fBuffer || fBufCur >
fBufMax) {
2578 UInt_t bcnt, tag, startpos = 0;
2591 if (objTag) *objTag = tag;
2614 UInt_t clTag = (tag & ~kClassMask);
2621 Error(
"ReadClass",
"illegal class tag=%d (0<tag<=%d), I/O buffer corrupted",
2636 Error(
"ReadClass",
"The on-file class is \"'%s\" which is not compatible with the requested class: \"%s\"",
2642 if (objTag) *objTag = (bcnt & ~kByteCountMask);
2645 if (!cl) cl = (
TClass*)-1;
2721 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" in %s.",
2724 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" (buffer with no parent)",
2744 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" in %s.",
2750 Error(
"SkipVersion",
"Class %s not known to file %s.",
2792 if (bcnt) *bcnt = (
v.cnt & ~kByteCountMask);
2800 && (
v.cnt &&
v.cnt >= 6)
2807 return vinfo->TStreamerInfo::GetClassVersion();
2817 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" in %s.",
2820 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" (buffer with no parent)",
2831 if (
v.cnt &&
v.cnt >= 6)
2848 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" in %s.",
2854 Error(
"ReadVersion",
"Class %s not known to file %s.",
2898 if (bcnt) *bcnt = (
v.cnt & ~kByteCountMask);
2926 return vinfo->TStreamerInfo::GetClassVersion();
2966 Error(
"ReadVersion",
"Class %s not known to file %s.",
2989 if (version<=1 && cl->IsForeign()) {
2994 Error(
"WriteVersion",
"version number cannot be larger than %hd)",
3019 if (version<=1 && cl->IsForeign()) {
3020 Error(
"WriteVersionMemberWise",
"Member-wise streaming of foreign collection not yet implemented!");
3025 Error(
"WriteVersionMemberWise",
"version number cannot be larger than %hd)",
3044 else Warning(
"StreamObject",
"No TClass for the type %s is available, the object was not read.", typeinfo.name());
3054 else Warning(
"StreamObject",
"No TClass for the type %s is available, the object was not read.", className);
3062 ((
TClass*)cl)->Streamer(obj, *
this, (
TClass*)onFileClass );
3070 obj->Streamer(*
this);
3095 if (!offset)
return offset;
3115 Warning(
"CheckObject",
"reference to unavailable class %s,"
3116 " pointers of this type will be 0", cl->
GetName());
3118 Warning(
"CheckObject",
"reference to an unavailable class,"
3119 " pointers of that type will be 0");
3124 }
else if (cli == -1) {
3145 Warning(
"CheckObject",
"reference to object of unavailable class %s, offset=%d"
3146 " pointer will be 0", cl ? cl->
GetName() :
"TObject",offset);
3152 }
else if (cli == -1) {
3172 if (max == 0)
return 0;
3189 if (max == 0)
return;
3212 while (nr < max-1) {
3232 WriteBuf(s, (strlen(s)+1)*
sizeof(
char));
3289 Error(
"ReadClassBuffer",
3290 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
3304 auto ninfos = infos->
GetSize();
3305 if (version < -1 || version >= ninfos) {
3306 Error(
"ReadClassBuffer",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
3312 if (sinfo ==
nullptr) {
3321 if (sinfo ==
nullptr) {
3323 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3327 const_cast<TClass*
>(cl)->RegisterStreamerInfo(sinfo);
3328 if (
gDebug > 0)
Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d", cl->
GetName(), version);
3330 }
else if (version==0) {
3337 Error(
"ReadClassBuffer",
"Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
3349 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3385 if (
file &&
file->GetVersion() < 30000) {
3398 Error(
"ReadClassBuffer",
3399 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
3422 if (version < -1 || version >= infocapacity) {
3423 Error(
"ReadClassBuffer",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
3435 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3445 if (sinfo ==
nullptr) {
3458 auto ninfos = infos->
GetSize();
3459 if (!(version < -1 || version >= ninfos)) {
3463 const_cast<TClass *
>(cl)->BuildRealData(pointer);
3466 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
3468 Info(
"ReadClassBuffer",
"Creating StreamerInfo for class: %s, version: %d",
3472 sinfo->
Clear(
"build");
3478 }
else if (version==0) {
3485 Error(
"ReadClassBuffer",
"Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
3496 if (sinfo->TStreamerInfo::IsRecovered()) R__c=0;
3501 if (
gDebug > 2)
Info(
"ReadClassBuffer",
"For class: %s has read %d bytes", cl->
GetName(), R__c);
3517 if (sinfo ==
nullptr) {
3521 if (sinfo ==
nullptr)
3523 if (sinfo ==
nullptr) {
3524 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3526 const_cast<TClass*
>(cl)->SetCurrentStreamerInfo(sinfo);
3527 const_cast<TClass*
>(cl)->RegisterStreamerInfo(sinfo);
3535 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3562 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3563 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3566 (*iter).PrintDebug(*
this,obj);
3572 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3573 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3591 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3592 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3595 if (!start_collection || start_collection == end_collection)
3596 (*iter).PrintDebug(*
this,
nullptr);
3598 (*iter).PrintDebug(*
this, *(
char**)start_collection);
3599 (*iter)(*
this, start_collection, end_collection);
3604 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3605 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3608 (*iter)(*
this,start_collection,end_collection);
3626 void *arr0 = start_collection ? loopconfig->
GetFirstAddress(start_collection,end_collection) : 0;
3628 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3629 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3632 (*iter).PrintDebug(*
this,arr0);
3633 (*iter)(*
this,start_collection,end_collection,loopconfig);
3638 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3639 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3642 (*iter)(*
this,start_collection,end_collection,loopconfig);
void * bswapcpy16(void *to, const void *from, size_t n)
void * bswapcpy32(void *to, const void *from, size_t n)
void frombuf(char *&buf, Bool_t *x)
void tobuf(char *&buf, Bool_t x)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
const UInt_t kMaxMapCount
const UInt_t kNewClassTag
static void frombufOld(char *&buf, Long_t *x)
Handle old file formats.
const Version_t kMaxVersion
static bool Class_Has_StreamerInfo(const TClass *cl)
Thread-safe check on StreamerInfos of a TClass.
const Version_t kByteCountVMask
const UInt_t kByteCountMask
R__EXTERN TVirtualMutex * gInterpreterMutex
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
#define R__LOCKGUARD(mutex)
#define R__WRITE_LOCKGUARD(mutex)
#define R__READ_LOCKGUARD(mutex)
Bool_t HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue) override
Read a Float16_t from the buffer when the factor and minimum value have been specified see comments a...
void WriteBuf(const void *buf, Int_t max) override
Write max bytes from buf into the I/O buffer.
TObject * ReadObject(const TClass *cl) override
Read object from I/O buffer.
void ReadDouble32(Double_t *d, TStreamerElement *ele=nullptr) override
Read a Double32_t from the buffer, see comments about Double32_t encoding at TBufferFile::WriteDouble...
Int_t ReadStaticArrayFloat16(Float_t *f, TStreamerElement *ele=nullptr) override
Read array of floats (written as truncated float) from the I/O buffer.
void DecrementLevel(TVirtualStreamerInfo *) override
Decrement level.
Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr) override
Read class version from I/O buffer.
Version_t ReadVersionNoCheckSum(UInt_t *start=nullptr, UInt_t *bcnt=nullptr) override
Read class version from I/O buffer, when the caller knows for sure that there is no checksum written/...
virtual ~TBufferFile()
Delete an I/O buffer object.
void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE) override
Set byte count at position cntpos in the buffer.
void ReadWithNbits(Float_t *ptr, Int_t nbits) override
Read a Float16_t from the buffer when the number of bits is specified (explicitly or not) see comment...
void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse) override
Write object to I/O buffer.
void ReadTString(TString &s) override
Read TString from TBuffer.
void ReadCharStar(char *&s) override
Read char* from TBuffer.
void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=nullptr) override
Stream an object given its C++ typeinfo information.
UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE) override
Write class version to I/O buffer.
Int_t ReadBuf(void *buf, Int_t max) override
Read max bytes from the I/O buffer into buf.
void WriteString(const char *s) override
Write string to I/O buffer.
char * ReadString(char *s, Int_t max) override
Read string from I/O buffer.
void WriteArray(const Bool_t *b, Int_t n) override
Write array of n bools into the I/O buffer.
void ReadFastArray(Bool_t *b, Int_t n) override
Read array of n bools from the I/O buffer.
void ReadFastArrayString(Char_t *c, Int_t n) override
Read array of n characters from the I/O buffer.
Int_t ReadArray(Bool_t *&b) override
Read array of bools from the I/O buffer.
void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=nullptr) override
Write array of n floats (as truncated float) into the I/O buffer.
Int_t ApplySequence(const TStreamerInfoActions::TActionSequence &sequence, void *object) override
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
void * ReadObjectAny(const TClass *cast) override
Read object from I/O buffer.
void SkipObjectAny() override
Skip any kind of object from buffer.
Int_t ReadStaticArrayDouble32(Double_t *d, TStreamerElement *ele=nullptr) override
Read array of doubles (written as float) from the I/O buffer.
TClass * ReadClass(const TClass *cl=nullptr, UInt_t *objTag=nullptr) override
Read class definition from I/O buffer.
Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class) override
Deserialize information from a buffer into an object.
void SkipVersion(const TClass *cl=nullptr) override
Skip class version from I/O buffer.
void ReadFloat16(Float_t *f, TStreamerElement *ele=nullptr) override
Read a Float16_t from the buffer, see comments about Float16_t encoding at TBufferFile::WriteFloat16(...
Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss, const char *classname)
Check byte count with current buffer position.
void WriteCharStar(char *s) override
Write char* into TBuffer.
Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection) override
Read one collection of objects from the buffer using the StreamerInfoLoopAction.
void WriteStdString(const std::string *s) override
Write std::string to TBuffer.
Int_t WriteClassBuffer(const TClass *cl, void *pointer) override
Function called by the Streamer functions to serialize object at p to buffer b.
void WriteClass(const TClass *cl) override
Write class description to I/O buffer.
void ReadFastArrayDouble32(Double_t *d, Int_t n, TStreamerElement *ele=nullptr) override
Read array of n doubles (written as float) from the I/O buffer.
void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=nullptr) override
Write array of n doubles (as float) into the I/O buffer.
UInt_t WriteVersionMemberWise(const TClass *cl, Bool_t useBcnt=kFALSE) override
Write class version to I/O buffer after setting the kStreamedMemberWise bit in the version number.
void CheckCount(UInt_t offset) override
Check if offset is not too large (< kMaxMapCount) when writing.
Int_t ReadArrayFloat16(Float_t *&f, TStreamerElement *ele=nullptr) override
Read array of floats (written as truncated float) from the I/O buffer.
void ReadFastArrayFloat16(Float_t *f, Int_t n, TStreamerElement *ele=nullptr) override
Read array of n floats (written as truncated float) from the I/O buffer.
void ReadStdString(std::string *s) override
Read std::string from TBuffer.
void WriteFloat16(Float_t *f, TStreamerElement *ele=nullptr) override
Write a Float16_t to the buffer.
Int_t ReadStaticArray(Bool_t *b) override
Read array of bools from the I/O buffer.
void WriteTString(const TString &s) override
Write TString to TBuffer.
UInt_t CheckObject(UInt_t offset, const TClass *cl, Bool_t readClass=kFALSE)
Check for object in the read map.
InfoList_t fInfoStack
Stack of pointers to the TStreamerInfos.
void WriteDouble32(Double_t *d, TStreamerElement *ele=nullptr) override
Write a Double32_t to the buffer.
void ReadLong(Long_t &l) override
Read Long from TBuffer.
void ReadFastArrayWithNbits(Float_t *ptr, Int_t n, Int_t nbits) override
Read array of n floats (written as truncated float) from the I/O buffer.
void IncrementLevel(TVirtualStreamerInfo *info) override
Increment level.
Int_t ReadArrayDouble32(Double_t *&d, TStreamerElement *ele=nullptr) override
Read array of doubles (written as float) from the I/O buffer.
void WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=nullptr) override
Write array of n doubles (as float) into the I/O buffer.
void WriteFastArrayString(const Char_t *c, Int_t n) override
Write array of n characters into the I/O buffer.
void WriteArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=nullptr) override
Write array of n floats (as truncated float) into the I/O buffer.
void WriteFastArray(const Bool_t *b, Int_t n) override
Write array of n bools into the I/O buffer.
void ReadFastArrayWithFactor(Float_t *ptr, Int_t n, Double_t factor, Double_t minvalue) override
Read array of n floats (written as truncated float) from the I/O buffer.
Version_t ReadVersionForMemberWise(const TClass *cl=nullptr) override
Read class version from I/O buffer.
TStreamerInfo * fInfo
Pointer to TStreamerInfo object writing/reading the buffer.
Int_t ReadClassEmulated(const TClass *cl, void *object, const TClass *onfile_class) override
Read emulated class.
Direct subclass of TBuffer, implements common methods for TBufferFile and TBufferText classes.
void InitMap() override
Create the fMap container and initialize them with the null object.
void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force) override
force writing the TStreamerInfo to the file
TExMap * fMap
Map containing object,offset pairs for reading/writing.
void MapObject(const TObject *obj, UInt_t offset=1) override
Add object to the fMap container.
TExMap * fClassMap
Map containing object,class pairs for reading.
Int_t fDisplacement
Value to be added to the map offsets.
static R__ALWAYS_INLINE ULong_t Void_Hash(const void *ptr)
Return hash value for provided object.
Int_t fMapCount
Number of objects or classes in map.
void TagStreamerInfo(TVirtualStreamerInfo *info) override
Mark the classindex of the current file as using this TStreamerInfo.
Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
TObject * GetParent() const
Return pointer to parent of this buffer.
void AutoExpand(Int_t size_needed)
Automatically calculate a new size and expand the buffer to fit at least size_needed.
void SetBufferOffset(Int_t offset=0)
TClass instances represent classes, structs and namespaces in the ROOT type system.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
static TClass * Load(TBuffer &b)
Load class description from I/O buffer and return class object.
TVirtualStreamerInfo * GetCurrentStreamerInfo()
void SetLastReadInfo(TVirtualStreamerInfo *info)
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...
TVirtualStreamerInfo * GetLastReadInfo() const
Int_t Size() const
Return size of object of this class.
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
void Store(TBuffer &b) const
Store class description on I/O buffer.
const TObjArray * GetStreamerInfos() const
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method).
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
Long_t Property() const
Returns the properties of the TClass as a bit field stored as a Long_t value.
Bool_t HasDefaultConstructor(Bool_t testio=kFALSE) const
Return true if we have access to a constructor usable for I/O.
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) 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...
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
Version_t GetClassVersion() const
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
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.
void Remove(ULong64_t hash, Long64_t key)
Remove entry with specified key from the TExMap.
void Add(ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table. The key should be unique.
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void SetOnFileClass(const TClass *cl)
virtual const char * GetName() const
Returns name of object.
TObject * UncheckedAt(Int_t i) const
Int_t GetLast() const
Return index of last object in array.
TObject * At(Int_t idx) const
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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.
Double_t GetFactor() const
TLoopConfiguration * fLoopConfig
If this is a bundle of memberwise streaming action, this configures the looping.
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 * GetReadObjectWiseActions()
void Build(Bool_t isTransient=kFALSE)
Build the I/O data structure for the current class version.
TStreamerInfoActions::TActionSequence * GetWriteObjectWiseActions()
void BuildEmulated(TFile *file)
Create an Emulation TStreamerInfo object.
Int_t GetClassVersion() const
void BuildOld()
rebuild the TStreamerInfo structure
UInt_t GetCheckSum() const
void Clobber(Ssiz_t nc)
Clear string and make sure it has a capacity of nc.
Abstract Interface class describing Streamer information for one class.
Int_t IsRecovered() const
Bool_t IsCompiled() const
static Bool_t CanDelete()
static function returning true if ReadBuffer can delete object
R__EXTERN TVirtualRWMutex * gCoreMutex
Short_t Min(Short_t a, Short_t b)