59 :
TBuffer(mode, bufsize, buf, adopt, reallocfunc)
236 if (!obj || !
fMap || !ptrClass)
243 if (clActual && (ptrClass != clActual)) {
244 const char *temp = (
const char *)obj;
356 if (number < 0 || number >= nindex) {
357 Error(
"TagStreamerInfo",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s", info->
GetName(), number,
361 if (cindex->
fArray[number] == 0) {
363 cindex->
fArray[number] = 1;
373 char **arr = (
char **)
a->GetObjectRef(0);
374 char **end = arr + nobjects;
386 char **arr =
reinterpret_cast<char **
>(
a->GetObjectRef(0));
390 char **end = arr + nobjects;
403 Warning(
"ReadBuffer",
"The file was written during several processes with an "
404 "older ROOT version; the TRefTable entries might be inconsistent.");
414 return fileProcessID;
470 virtual ~DynamicType() {}
499 Error(
"WriteObjectAny",
"ptrClass argument may not be 0");
509 DynamicType *d_ptr = (DynamicType *)obj;
510 Warning(
"WriteObjectAny",
"An object of type %s (from type_info) passed through a %s pointer was truncated (due "
511 "a missing dictionary)!!!",
512 typeid(*d_ptr).name(), ptrClass->
GetName());
515 }
else if (clActual && (clActual != ptrClass)) {
516 const char *temp = (
const char *)obj;
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
short Version_t
Class version identifier (short).
unsigned long ULongptr_t
Unsigned integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
long long Long64_t
Portable signed long integer 8 bytes.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
externTVirtualMutex * gInterpreterMutex
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
#define R__LOCKGUARD_IMT(mutex)
Array of chars or bytes (8 bits per element).
void SetWriteParam(Int_t mapsize) override
Set the initial size of the hashtable used to store object and class references during writing.
static void SetGlobalReadParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
void Reset() override
Reset buffer object. Resets map and buffer offset.
void InitMap() override
Create the fMap container and initialize them with the null object.
TClass * IsA() const override
Int_t GetVersionOwner() const override
Return the version number of the owner file.
static void SetGlobalWriteParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
TProcessID * GetLastProcessID(TRefTable *reftable) const override
Return the last TProcessID in the file.
void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force) override
force writing the TStreamerInfo to the file
void ForceWriteInfoClones(TClonesArray *a) override
Make sure TStreamerInfo is not optimized, otherwise it will not be possible to support schema evoluti...
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse)=0
TExMap * fMap
Map containing object,offset pairs for reading/writing.
void SetReadParam(Int_t mapsize) override
Set the initial size of the map used to store object and class references during reading.
Bool_t CheckObject(const TObject *obj) override
Check if the specified object is already in the buffer.
void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
void MapObject(const TObject *obj, UInt_t offset=1) override
Add object to the fMap container.
Long64_t GetObjectTag(const void *obj)
Returns tag for specified object from objects map (if exists) Returns 0 if object not included into o...
Int_t WriteClones(TClonesArray *a, Int_t nobjects) override
Interface to TStreamerInfo::WriteBufferClones.
UShort_t WriteProcessID(TProcessID *pid) override
Check if the ProcessID pid is already in the file.
TExMap * fClassMap
Map containing object,class pairs for reading.
Int_t fDisplacement
Value to be added to the map offsets.
virtual void CheckCount(UInt_t)
Int_t fMapCount
Number of objects or classes in map.
static Int_t GetGlobalReadParam()
Get default read map size.
void TagStreamerInfo(TVirtualStreamerInfo *info) override
Mark the classindex of the current file as using this TStreamerInfo.
static ULong_t Void_Hash(const void *ptr)
Return hash value for provided object.
static Int_t fgMapSize
Default map size for all TBuffer objects.
void ResetMap() override
Delete existing fMap and reset map counter.
TProcessID * ReadProcessID(UShort_t pidf) override
The TProcessID with number pidf is read from file.
~TBufferIO() override
destructor
UShort_t fPidOffset
Offset to be added to the pid index in this key/buffer.
Int_t ReadClones(TClonesArray *a, Int_t nobjects, Version_t objvers) override
Interface to TStreamerInfo::ReadBufferClones.
void GetMappedObject(UInt_t tag, void *&ptr, TClass *&ClassPtr) const override
Retrieve the object stored in the buffer's object map at 'tag' Set ptr and ClassPtr respectively to t...
Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
void SetPidOffset(UShort_t offset) override
This offset is used when a key (or basket) is transferred from one file to the other.
Int_t fMapSize
Default size of map.
static Int_t GetGlobalWriteParam()
Get default write map size.
UInt_t GetTRefExecId() override
Return the exec id stored in the current TStreamerInfo element.
virtual Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection)=0
TObject * GetParent() const
Return pointer to parent of this buffer.
void SetBufferOffset(Int_t offset=0)
TClass instances represent classes, structs and namespaces in the ROOT type system.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=nullptr, bool isDerivedObject=true)
TClass * GetActualClass(const void *object) const
Return a pointer to the real class of the object.
This class stores a (key,value) pair using an external hash.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
virtual TProcessID * ReadProcessID(UShort_t pidf)
The TProcessID with number pidf is read from this file.
TArrayC * GetClassIndex() const
virtual Int_t GetNProcessIDs() const
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...
TObjArray * GetListOfProcessIDs() const
const char * GetName() const override
Returns name of object.
TObject * Last() const override
Return the object in the last filled slot. Returns 0 if no entries.
friend class TClonesArray
Bool_t TestBit(UInt_t f) const
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TObject()
TObject constructor.
A TProcessID identifies a ROOT job in a unique way in time and space.
static TProcessID * GetProcessID(UShort_t pid)
static function returning a pointer to TProcessID number pid in fgPIDs
static TProcessID * GetPID()
static: returns pointer to current TProcessID
A TRefTable maintains the association between a referenced object and the parent object supporting th...
Describes a persistent version of a class.
TStreamerInfoActions::TActionSequence * GetWriteMemberWiseActions(Bool_t forCollection)
static TStreamerElement * GetCurrentElement()
static function returning a pointer to the current TStreamerElement fgElement points to the current T...
TStreamerInfoActions::TActionSequence * GetReadMemberWiseActions(Bool_t forCollection)
Abstract Interface class describing Streamer information for one class.
virtual void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)=0
virtual Int_t GetNumber() const =0