43 #if (defined(__linux) || defined(__APPLE__)) && defined(__i386__) && \
94 fDisplacement(0),fPidOffset(0), fMap(0), fClassMap(0),
95 fInfo(0), fInfoStack()
111 fDisplacement(0),fPidOffset(0), fMap(0), fClassMap(0),
112 fInfo(0), fInfoStack()
133 TBuffer(mode,bufsiz,buf,adopt,reallocfunc),
134 fDisplacement(0),fPidOffset(0), fMap(0), fClassMap(0),
135 fInfo(0), fInfoStack()
173 if (number < 0 || number >= nindex) {
174 Error(
"TagStreamerInfo",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s",
178 if (cindex->
fArray[number] == 0) {
180 cindex->
fArray[number] = 1;
216 char *sw = (
char *)x;
226 char *sw = (
char *)x;
233 memcpy(x, buf,
sizeof(
Long_t));
301 Error(
"TBufferFile::ReadStdString",
"The std::string address is nullptr but should not");
316 obj->resize(nbig,
'\0');
320 obj->resize(nwh,
'\0');
338 Int_t nbig = obj->length();
357 char *buf = (
char *)(
fBuffer + cntpos);
402 const char *
name = clss ? clss->
GetName() : classname ? classname : 0;
406 Error(
"CheckByteCount",
"object of class %s read too few bytes: %d instead of %d",
407 name,bcnt+offset,bcnt);
410 Error(
"CheckByteCount",
"object of class %s read too many bytes: %d instead of %d",
411 name,bcnt+offset,bcnt);
413 Warning(
"CheckByteCount",
"%s::Streamer() not in sync with data on file %s, fix Streamer()",
416 Warning(
"CheckByteCount",
"%s::Streamer() not in sync with data, fix Streamer()",
420 if ( ((
char *)endpos) >
fBufMax ) {
422 Error(
"CheckByteCount",
423 "Byte count probably corrupted around buffer position %d:\n\t%d for a possible maximum of %d",
424 startpos, bcnt, offset);
475 if (!nbits) nbits = 12;
511 ptr[0] = (
Float_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] = temp.fFloatValue;
546 ptr[0] = (
Double_t)(aint/factor + minvalue);
565 temp.fIntValue = theExp;
566 temp.fIntValue <<= 23;
567 temp.fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
568 if(1<<(nbits+1) & theMan) temp.fFloatValue = -temp.fFloatValue;
569 ptr[0] = (
Double_t)temp.fFloatValue;
635 if (x < xmin) x =
xmin;
636 if (x > xmax) x =
xmax;
642 if (!nbits) nbits = 12;
652 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
655 if (theMan&1<<nbits) theMan = (1<<nbits) - 1;
656 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
699 if (x < xmin) x =
xmin;
700 if (x > xmax) x =
xmax;
720 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1)) ;
723 if (theMan&1<<nbits) theMan = (1<<nbits)-1 ;
724 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
743 if (n <= 0 || n >
fBufSize)
return 0;
748 for (
int i = 0; i <
n; i++)
772 if (l <= 0 || l >
fBufSize)
return 0;
795 if (l <= 0 || l >
fBufSize)
return 0;
804 for (
int i = 0; i <
n; i++)
828 if (l <= 0 || l >
fBufSize)
return 0;
830 if (!ii) ii =
new Int_t[
n];
837 for (
int i = 0; i <
n; i++)
861 if (l <= 0 || l >
fBufSize)
return 0;
887 if (l <= 0 || l >
fBufSize)
return 0;
892 for (
int i = 0; i <
n; i++)
915 if (l <= 0 || l >
fBufSize)
return 0;
924 for (
int i = 0; i <
n; i++)
948 if (l <= 0 || l >
fBufSize)
return 0;
953 for (
int i = 0; i <
n; i++)
976 if (n <= 0 || 3*n >
fBufSize)
return 0;
998 if (n <= 0 || 3*n >
fBufSize)
return 0;
1018 if (n <= 0 || n >
fBufSize)
return 0;
1022 if (
sizeof(
Bool_t) > 1) {
1023 for (
int i = 0; i <
n; i++)
1046 if (l <= 0 || l >
fBufSize)
return 0;
1068 if (l <= 0 || l >
fBufSize)
return 0;
1073 # ifdef USE_BSWAPCPY
1077 for (
int i = 0; i <
n; i++)
1100 if (l <= 0 || l >
fBufSize)
return 0;
1105 # ifdef USE_BSWAPCPY
1109 for (
int i = 0; i <
n; i++)
1132 if (l <= 0 || l >
fBufSize)
return 0;
1157 if (l <= 0 || l >
fBufSize)
return 0;
1162 for (
int i = 0; i <
n; i++)
1184 if (n <= 0 || l >
fBufSize)
return 0;
1189 # ifdef USE_BSWAPCPY
1193 for (
int i = 0; i <
n; i++)
1216 if (n <= 0 || l >
fBufSize)
return 0;
1221 for (
int i = 0; i <
n; i++)
1243 if (n <= 0 || 3*n >
fBufSize)
return 0;
1264 if (n <= 0 || 3*n >
fBufSize)
return 0;
1278 if (n <= 0 || n >
fBufSize)
return;
1280 if (
sizeof(
Bool_t) > 1) {
1281 for (
int i = 0; i <
n; i++)
1295 if (n <= 0 || n >
fBufSize)
return;
1310 if (lenchar < 255) {
1316 if (len <= 0 || len >
fBufSize)
return;
1318 if (len >= n) len = n-1;
1336 if (n <= 0 || l >
fBufSize)
return;
1339 # ifdef USE_BSWAPCPY
1343 for (
int i = 0; i <
n; i++)
1358 if (l <= 0 || l >
fBufSize)
return;
1361 # ifdef USE_BSWAPCPY
1365 for (
int i = 0; i <
n; i++)
1380 if (l <= 0 || l >
fBufSize)
return;
1396 if (l <= 0 || l >
fBufSize)
return;
1399 for (
int i = 0; i <
n; i++)
1413 if (l <= 0 || l >
fBufSize)
return;
1416 # ifdef USE_BSWAPCPY
1420 for (
int i = 0; i <
n; i++)
1435 if (l <= 0 || l >
fBufSize)
return;
1438 for (
int i = 0; i <
n; i++)
1452 if (n <= 0 || 3*n >
fBufSize)
return;
1458 for (
int j=0;j <
n; j++) {
1459 UInt_t aint; *
this >> aint; f[j] = (
Float_t)(aint/factor + xmin);
1465 if (!nbits) nbits = 12;
1474 for (i = 0; i <
n; i++) {
1479 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1480 if(1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1492 if (n <= 0 || 3*n >
fBufSize)
return;
1495 for (
int j=0;j <
n; j++) {
1496 UInt_t aint; *
this >> aint; ptr[j] = (
Float_t)(aint/factor + minvalue);
1506 if (n <= 0 || 3*n >
fBufSize)
return;
1508 if (!nbits) nbits = 12;
1517 for (
Int_t i = 0; i <
n; i++) {
1522 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1523 if(1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1524 ptr[i] = fFloatValue;
1534 if (n <= 0 || 3*n >
fBufSize)
return;
1540 for (
int j=0;j <
n; j++) {
1541 UInt_t aint; *
this >> aint; d[j] = (
Double_t)(aint/factor + xmin);
1550 for (i = 0; i <
n; i++) {
1563 for (i = 0; i <
n; i++) {
1568 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1569 if (1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1582 if (n <= 0 || 3*n >
fBufSize)
return;
1585 for (
int j=0;j <
n; j++) {
1586 UInt_t aint; *
this >> aint; d[j] = (
Double_t)(aint/factor + minvalue);
1596 if (n <= 0 || 3*n >
fBufSize)
return;
1601 for (
Int_t i = 0; i <
n; i++) {
1614 for (
Int_t i = 0; i <
n; i++) {
1619 fIntValue |= (theMan & ((1<<(nbits+1))-1)) <<(23-nbits);
1620 if (1<<(nbits+1) & theMan) fFloatValue = -fFloatValue;
1636 (*streamer)(*
this,start,0);
1640 int objectSize = cl->
Size();
1641 char *obj = (
char*)start;
1642 char *end = obj + n*objectSize;
1644 for(; obj<end; obj+=objectSize) ((
TClass*)cl)->Streamer(obj,*
this, onFileClass);
1662 for (
Int_t j=0;j<
n;j++) {
1663 if (!start[j]) start[j] = cl->
New();
1667 (*streamer)(*
this,(
void*)start,0);
1673 for (
Int_t j=0; j<
n; j++){
1675 void *old = start[j];
1677 if (old && old!=start[j] &&
1702 for (
Int_t j=0; j<
n; j++){
1703 if (!start[j]) start[j] = ((
TClass*)cl)->New();
1704 ((
TClass*)cl)->Streamer(start[j],*
this,onFileClass);
1726 if (
sizeof(
Bool_t) > 1) {
1727 for (
int i = 0; i <
n; i++)
1772 # ifdef USE_BSWAPCPY
1776 for (
int i = 0; i <
n; i++)
1802 # ifdef USE_BSWAPCPY
1806 for (
int i = 0; i <
n; i++)
1870 for (
int i = 0; i <
n; i++)
1895 # ifdef USE_BSWAPCPY
1899 for (
int i = 0; i <
n; i++)
1925 for (
int i = 0; i <
n; i++)
1983 if (
sizeof(
Bool_t) > 1) {
1984 for (
int i = 0; i <
n; i++)
2038 # ifdef USE_BSWAPCPY
2042 for (
int i = 0; i <
n; i++)
2062 # ifdef USE_BSWAPCPY
2066 for (
int i = 0; i <
n; i++)
2114 for (
int i = 0; i <
n; i++)
2133 # ifdef USE_BSWAPCPY
2137 for (
int i = 0; i <
n; i++)
2157 for (
int i = 0; i <
n; i++)
2183 for (
int j = 0; j <
n; j++) {
2185 if (x < xmin) x =
xmin;
2186 if (x > xmax) x =
xmax;
2187 UInt_t aint =
UInt_t(0.5+factor*(x-xmin)); *
this << aint;
2193 if (!nbits) nbits = 12;
2202 for (i = 0; i <
n; i++) {
2205 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
2208 if (theMan&1<<nbits) theMan = (1<<nbits) - 1;
2209 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
2234 for (
int j = 0; j <
n; j++) {
2236 if (x < xmin) x =
xmin;
2237 if (x > xmax) x =
xmax;
2238 UInt_t aint =
UInt_t(0.5+factor*(x-xmin)); *
this << aint;
2247 for (i = 0; i <
n; i++) {
2259 for (i = 0; i <
n; i++) {
2262 UShort_t theMan = ((1<<(nbits+1))-1) & (fIntValue>>(23-nbits-1));
2265 if(theMan&1<<nbits) theMan = (1<<nbits) - 1;
2266 if (fFloatValue < 0) theMan |= 1<<(nbits+1);
2282 (*streamer)(*
this, start, 0);
2286 char *obj = (
char*)start;
2288 int size = cl->
Size();
2290 for(
Int_t j=0; j<
n; j++,obj+=size) {
2291 ((
TClass*)cl)->Streamer(obj,*
this);
2310 (*streamer)(*
this,(
void*)start,0);
2320 for (
Int_t j=0;j<
n;j++) {
2322 if (!strInfo && !start[j]) {
2337 for (
Int_t j=0;j<
n;j++) {
2338 if (!start[j]) start[j] = ((
TClass*)cl)->New();
2339 ((
TClass*)cl)->Streamer(start[j],*
this);
2398 Int_t baseOffset = 0;
2399 if (clRef && (clRef!=(
TClass*)(-1)) && clCast) {
2402 if (baseOffset == -1) {
2409 Error(
"ReadObject",
"got object of wrong class! requested %s but got %s",
2417 Info(
"ReadObjectAny",
"Using Converter StreamerInfo from %s to %s",clRef->
GetName(),clCast->
GetName());
2418 clRef =
const_cast<TClass*
>(clCast);
2423 Error(
"ReadObject",
"trying to read an emulated class (%s) to store in a compiled pointer (%s)",
2435 if (obj == (
void*) -1) obj = 0;
2438 return (obj+baseOffset);
2443 if (clRef == (
TClass*) -1) {
2461 Error(
"ReadObject",
"object tag too large, I/O buffer corrupted");
2469 if (clRef && (clRef!=(
TClass*)(-1)) && clCast) {
2472 if (baseOffset == -1) {
2473 Error(
"ReadObject",
"Got object of wrong class (Got %s while expecting %s)",
2491 obj = (
char*)clRef->
New();
2493 Error(
"ReadObject",
"could not create object of class %s",
2506 clRef->
Streamer( obj, *
this, clOnfile );
2511 return obj+baseOffset;
2531 if (!actualObjectStart) {
2559 Warning(
"WriteObjectAny",
"since %s has no public constructor\n"
2560 "\twhich can be called without argument, objects of this class\n"
2561 "\tcan not be read with the current library. You will need to\n"
2562 "\tadd a default constructor before attempting to read it.",
2588 ((
TClass*)actualClass)->Streamer((
void*)actualObjectStart,*
this);
2597 struct DynamicType {
2601 virtual ~DynamicType() {}
2624 Error(
"WriteObjectAny",
"ptrClass argument may not be 0");
2634 DynamicType* d_ptr = (DynamicType*)obj;
2636 "An object of type %s (from type_info) passed through a %s pointer was truncated (due a missing dictionary)!!!",
2637 typeid(*d_ptr).name(),ptrClass->
GetName());
2640 }
else if (clActual && (clActual != ptrClass)) {
2641 const char *temp = (
const char*) obj;
2663 if (fBufCur < fBuffer || fBufCur >
fBufMax) {
2668 UInt_t bcnt, tag, startpos = 0;
2681 if (objTag) *objTag = tag;
2704 UInt_t clTag = (tag & ~kClassMask);
2711 Error(
"ReadClass",
"illegal class tag=%d (0<tag<=%d), I/O buffer corrupted",
2726 Error(
"ReadClass",
"got wrong class: %s", cl->
GetName());
2731 if (objTag) *objTag = (bcnt & ~kByteCountMask);
2734 if (!cl) cl = (
TClass*)-1;
2810 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" in %s.",
2813 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" (buffer with no parent)",
2833 Error(
"SkipVersion",
"Could not find the StreamerInfo with a checksum of %d for the class \"%s\" in %s.",
2839 Error(
"SkipVersion",
"Class %s not known to file %s.",
2889 && (
v.cnt &&
v.cnt >= 6)
2896 return vinfo->TStreamerInfo::GetClassVersion();
2906 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" in %s.",
2909 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" (buffer with no parent)",
2920 if (
v.cnt &&
v.cnt >= 6)
2937 Error(
"ReadVersion",
"Could not find the StreamerInfo with a checksum of 0x%x for the class \"%s\" in %s.",
2943 Error(
"ReadVersion",
"Class %s not known to file %s.",
3015 return vinfo->TStreamerInfo::GetClassVersion();
3055 Error(
"ReadVersion",
"Class %s not known to file %s.",
3078 if (version<=1 && cl->IsForeign()) {
3083 Error(
"WriteVersion",
"version number cannot be larger than %hd)",
3108 if (version<=1 && cl->IsForeign()) {
3109 Error(
"WriteVersionMemberWise",
"Member-wise streaming of foreign collection not yet implemented!");
3114 Error(
"WriteVersionMemberWise",
"version number cannot be larger than %hd)",
3133 else Warning(
"StreamObject",
"No TClass for the type %s is available, the object was not read.", typeinfo.name());
3143 else Warning(
"StreamObject",
"No TClass for the type %s is available, the object was not read.", className);
3151 ((
TClass*)cl)->Streamer(obj, *
this, (
TClass*)onFileClass );
3159 obj->Streamer(*
this);
3184 if (!offset)
return offset;
3204 Warning(
"CheckObject",
"reference to unavailable class %s,"
3205 " pointers of this type will be 0", cl->
GetName());
3207 Warning(
"CheckObject",
"reference to an unavailable class,"
3208 " pointers of that type will be 0");
3213 }
else if (cli == -1) {
3234 Warning(
"CheckObject",
"reference to object of unavailable class %s, offset=%d"
3235 " pointer will be 0", cl ? cl->
GetName() :
"TObject",offset);
3241 }
else if (cli == -1) {
3269 if (!obj || !
fMap || !ptrClass)
return kFALSE;
3275 if (clActual && (ptrClass != clActual)) {
3276 const char *temp = (
const char*) obj;
3470 if (max == 0)
return 0;
3487 if (max == 0)
return;
3510 while (nr < max-1) {
3530 WriteBuf(s, (strlen(s)+1)*
sizeof(
char));
3541 Warning(
"ReadBuffer",
"The file was written during several processes with an "
3542 "older ROOT version; the TRefTable entries might be inconsistent.");
3552 return fileProcessID;
3595 if (!file)
return 0;
3628 char **end = arr + nobjects;
3640 char **arr =
reinterpret_cast<char**
>(a->
GetObjectRef(0));
3644 char **end = arr + nobjects;
3703 Error(
"ReadClassBuffer",
3704 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
3718 auto ninfos = infos->
GetSize();
3719 if (version < -1 || version >= ninfos) {
3720 Error(
"ReadBuffer1",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
3733 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3737 const_cast<TClass*
>(cl)->RegisterStreamerInfo(sinfo);
3738 if (
gDebug > 0) printf(
"Creating StreamerInfo for class: %s, version: %d\n", cl->
GetName(), version);
3740 }
else if (version==0) {
3747 Error(
"ReadClassBuffer",
"Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
3755 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3803 Error(
"ReadClassBuffer",
3804 "Could not find the right streamer info to convert %s version %d into a %s, object skipped at offset %d",
3827 if (version < -1 || version >= infocapacity) {
3828 Error(
"ReadClassBuffer",
"class: %s, attempting to access a wrong version: %d, object skipped at offset %d",
3840 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3845 if (sinfo->
IsCompiled()) const_cast<TClass*>(cl)->SetLastReadInfo(sinfo);
3863 auto ninfos = infos->
GetSize();
3864 if (!(version < -1 || version >= ninfos)) {
3868 const_cast<TClass *
>(cl)->BuildRealData(pointer);
3871 const_cast<TClass *
>(cl)->RegisterStreamerInfo(sinfo);
3874 "Creating StreamerInfo for class: %s, version: %d\n",
3878 sinfo->
Clear(
"build");
3885 }
else if (version==0) {
3892 Error(
"ReadClassBuffer",
"Could not find the StreamerInfo for version %d of the class %s, object skipped at offset %d",
3903 if (sinfo->TStreamerInfo::IsRecovered()) R__c=0;
3908 if (
gDebug > 2) printf(
" ReadBuffer for class: %s has read %d bytes\n", cl->
GetName(), R__c);
3927 sinfo = (
TStreamerInfo*)const_cast<TClass*>(cl)->GetCurrentStreamerInfo();
3929 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3931 const_cast<TClass*
>(cl)->SetCurrentStreamerInfo(sinfo);
3932 const_cast<TClass*
>(cl)->RegisterStreamerInfo(sinfo);
3940 const_cast<TClass*
>(cl)->BuildRealData(pointer);
3968 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3969 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3972 (*iter).PrintDebug(*
this,obj);
3978 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3979 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
3997 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
3998 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
4001 (*iter).PrintDebug(*
this,*(
char**)start_collection);
4002 (*iter)(*
this,start_collection,end_collection);
4007 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
4008 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
4011 (*iter)(*
this,start_collection,end_collection);
4029 void *arr0 = start_collection ? loopconfig->
GetFirstAddress(start_collection,end_collection) : 0;
4031 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
4032 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
4035 (*iter).PrintDebug(*
this,arr0);
4036 (*iter)(*
this,start_collection,end_collection,loopconfig);
4041 TStreamerInfoActions::ActionContainer_t::const_iterator end = sequence.
fActions.end();
4042 for(TStreamerInfoActions::ActionContainer_t::const_iterator iter = sequence.
fActions.begin();
4045 (*iter)(*
this,start_collection,end_collection,loopconfig);
TObject * GetParent() const
Return pointer to parent of this buffer.
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 Int_t GetNProcessIDs() const
static TProcessID * GetPID()
static: returns pointer to current TProcessID
virtual UInt_t GetTRefExecId()
Return the exec id stored in the current TStreamerInfo element.
static TProcessID * GetProcessID(UShort_t pid)
static function returning a pointer to TProcessID number pid in fgPIDs
void SetReadParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
void SetBufferOffset(Int_t offset=0)
virtual Int_t WriteClones(TClonesArray *a, Int_t nobjects)
Interface to TStreamerInfo::WriteBufferClones.
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)
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.
Bool_t HasDefaultConstructor() const
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.
void SetWriteParam(Int_t mapsize)
Set the initial size of the hashtable used to store object and class references during writing...
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass)
Write object to I/O buffer.
virtual Int_t ReadClones(TClonesArray *a, Int_t nobjects, Version_t objvers)
Interface to TStreamerInfo::ReadBufferClones.
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.
static Int_t GetGlobalWriteParam()
Get default write map size.
Int_t GetLast() const
Return index of last object in array.
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...
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
static void SetGlobalReadParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
static Int_t fgMapSize
Default map size for all TBuffer objects.
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Buffer base class used for serializing objects.
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
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method). ...
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)
Set byte count at position cntpos in the buffer.
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 TObject * FindObject(const char *name) const
Find an object in this list using its name.
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.
void MapObject(const TObject *obj, UInt_t offset=1)
Add object to the fMap container.
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.
void SetPidOffset(UShort_t offset)
This offset is used when a key (or basket) is transfered from one file to the other.
virtual void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)=0
static void SetGlobalWriteParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
Double_t GetFactor() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void WriteFastArrayString(const Char_t *c, Int_t n)
Write array of n characters into the I/O buffer.
#define R__LOCKGUARD_IMT(mutex)
void * bswapcpy32(void *to, const void *from, size_t n)
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.
Int_t fDisplacement
Value to be added to the map offsets.
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 SkipObjectAny()
Skip any kind of object from buffer.
virtual void * GetFirstAddress(void *start, const void *end) const =0
TExMap * fMap
Map containing object,offset pairs for reading/writing.
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 char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
Int_t IsRecovered() const
Bool_t IsCompiled() const
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
virtual void WriteStdString(const std::string *s)
Write std::string to TBuffer.
TClass * GetActualClass(const void *object) const
Return a pointer the the real class of the object.
virtual void TagStreamerInfo(TVirtualStreamerInfo *info)
Mark the classindex of the current file as using this TStreamerInfo.
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)
A TProcessID identifies a ROOT job in a unique way in time and space.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
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.
Int_t GetClassVersion() const
static ULong_t Void_Hash(const void *ptr)
Return hash value for this object.
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
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.
Int_t fMapCount
Number of objects or classes in map.
virtual void WriteTString(const TString &s)
Write TString to TBuffer.
TObject * UncheckedAt(Int_t i) const
void ResetMap()
Delete existing fMap and reset map counter.
TStreamerInfo * fInfo
Pointer to TStreamerInfo object writing/reading the 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 HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
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.
virtual TProcessID * GetLastProcessID(TRefTable *reftable) const
Return the last TProcessID in the file.
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...
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
virtual void StreamObject(void *obj, const std::type_info &typeinfo, const TClass *onFileClass=0)
Stream an object given its C++ typeinfo information.
virtual void ForceWriteInfoClones(TClonesArray *a)
Make sure TStreamerInfo is not optimized, otherwise it will not be possible to support schema evoluti...
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...
void InitMap()
Create the fMap container and initialize them with the null object.
UInt_t GetCheckSum() const
virtual Int_t ReadClassEmulated(const TClass *cl, void *object, const TClass *onfile_class)
Read emulated class.
Bool_t TestBit(UInt_t f) const
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)
Read class version from I/O buffer.
virtual const char * GetName() const
Returns name of object.
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.
Version_t GetClassVersion() const
TStreamerInfoActions::TActionSequence * GetReadMemberWiseActions(Bool_t forCollection)
virtual void WriteBuf(const void *buf, Int_t max)
Write max bytes from buf into the I/O buffer.
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)
UShort_t fPidOffset
Offset to be added to the pid index in this key/buffer.
void Delete(Option_t *opt="")
Delete all entries stored in the TExMap.
virtual void WriteArray(const Bool_t *b, Int_t n)
Write array of n bools into the I/O buffer.
TExMap * fClassMap
Map containing object,class pairs for reading.
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.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
Int_t fMapSize
Default size of map.
void Build()
Build the I/O data structure for the current class version.
virtual Int_t GetSize() const
virtual const char * GetName() const
Returns name of object.
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.
TClass * GetClass() const
virtual Int_t GetNumber() const =0
virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=0)
Write a Double32_t to the buffer.
A TRefTable maintains the association between a referenced object and the parent object supporting th...
#define R__LOCKGUARD(mutex)
virtual void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force)
force writing the TStreamerInfo to the file
TVirtualStreamerInfo * GetLastReadInfo() const
virtual void WriteObject(const TObject *obj)
Write object to I/O buffer.
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 GetVersionOwner() const
Return the version number of the owner file.
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(...
static Int_t GetGlobalReadParam()
Get default read map size.
virtual UInt_t GetUniqueID() const
Return the unique object id.
Mother of all ROOT objects.
static TStreamerElement * GetCurrentElement()
static function returning a pointer to the current TStreamerElement fgElement points to the current T...
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
An array of clone (identical) objects.
virtual UShort_t WriteProcessID(TProcessID *pid)
Check if the ProcessID pidd is already in the file, if not, add it and return the index number in the...
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.
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
InfoList_t fInfoStack
Stack of pointers to the TStreamerInfos.
virtual void DecrementLevel(TVirtualStreamerInfo *)
Decrement level.
const TObjArray * GetStreamerInfos() const
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass)
Write object to I/O buffer.
TObject ** GetObjectRef() const
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
virtual void ReadWithFactor(Float_t *ptr, Double_t factor, Double_t minvalue)
Read a Float16_t from the buffer when the factor and minimun value have been specified see comments a...
static void frombufOld(char *&buf, Long_t *x)
Handle old file formats.
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
TStreamerInfoActions::TActionSequence * GetReadObjectWiseActions()
Abstract Interface class describing Streamer information for one class.
TObjArray * GetListOfProcessIDs() const
virtual TProcessID * ReadProcessID(UShort_t pidf)
The TProcessID with number pidf is read from file.
virtual void ReadFastArrayString(Char_t *c, Int_t n)
Read array of n characters from the I/O buffer.
virtual UShort_t WriteProcessID(TProcessID *pid)
Check if the ProcessID pid is already in the file.
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)
Int_t Size() const
Return size of object of this class.
This class stores a (key,value) pair using an external hash.
virtual TProcessID * ReadProcessID(UShort_t pidf)
The TProcessID with number pidf is read from this file.
void GetMappedObject(UInt_t tag, void *&ptr, TClass *&ClassPtr) const
Retrieve the object stored in the buffer's object map at 'tag' Set ptr and ClassPtr respectively to t...
TArrayC * GetClassIndex() const
void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table.
TStreamerInfoActions::TActionSequence * GetWriteMemberWiseActions(Bool_t forCollection)
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.
Array of chars or bytes (8 bits per element).
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.