60 :
TBuffer(mode, bufsiz, buf, adopt, reallocfunc)
237 if (!obj || !
fMap || !ptrClass)
244 if (clActual && (ptrClass != clActual)) {
245 const char *temp = (
const char *)obj;
357 if (number < 0 || number >= nindex) {
358 Error(
"TagStreamerInfo",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s", info->
GetName(), number,
362 if (cindex->
fArray[number] == 0) {
364 cindex->
fArray[number] = 1;
375 char **end = arr + nobjects;
387 char **arr =
reinterpret_cast<char **
>(a->
GetObjectRef(0));
391 char **end = arr + nobjects;
404 Warning(
"ReadBuffer",
"The file was written during several processes with an " 405 "older ROOT version; the TRefTable entries might be inconsistent.");
415 return fileProcessID;
471 virtual ~DynamicType() {}
500 Error(
"WriteObjectAny",
"ptrClass argument may not be 0");
510 DynamicType *d_ptr = (DynamicType *)obj;
511 Warning(
"WriteObjectAny",
"An object of type %s (from type_info) passed through a %s pointer was truncated (due " 512 "a missing dictionary)!!!",
513 typeid(*d_ptr).name(), ptrClass->
GetName());
516 }
else if (clActual && (clActual != ptrClass)) {
517 const char *temp = (
const char *)obj;
Describe Streamer information for one class version.
virtual void WriteObjectClass(const void *actualObjStart, const TClass *actualClass, Bool_t cacheReuse)=0
static TProcessID * GetPID()
static: returns pointer to current TProcessID
virtual void ResetMap()
Delete existing fMap and reset map counter.
virtual const char * GetName() const
Returns name of object.
static TProcessID * GetProcessID(UShort_t pid)
static function returning a pointer to TProcessID number pid in fgPIDs
Int_t fMapSize
Default size of map.
void SetBufferOffset(Int_t offset=0)
virtual UInt_t GetUniqueID() const
Return the unique object id.
void Add(ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table. The key should be unique.
static void SetGlobalReadParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
TObject * GetParent() const
Return pointer to parent of this buffer.
R__EXTERN TVirtualMutex * gInterpreterMutex
TArrayC * GetClassIndex() const
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
TObjArray * GetListOfProcessIDs() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual void SetPidOffset(UShort_t offset)
This offset is used when a key (or basket) is transfered from one file to the other.
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
Buffer base class used for serializing objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
static Int_t fgMapSize
Default map size for all TBuffer objects.
virtual Int_t WriteClones(TClonesArray *a, Int_t nobjects)
Interface to TStreamerInfo::WriteBufferClones.
virtual void InitMap()
Create the fMap container and initialize them with the null object.
TObject ** GetObjectRef() const
virtual void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)=0
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void CheckCount(UInt_t)
#define R__LOCKGUARD_IMT(mutex)
Int_t fMapCount
Number of objects or classes in map.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
virtual TProcessID * GetLastProcessID(TRefTable *reftable) const
Return the last TProcessID in the file.
virtual ~TBufferIO()
destructor
static Int_t GetGlobalWriteParam()
Get default write map size.
Int_t fDisplacement
Value to be added to the map offsets.
A TProcessID identifies a ROOT job in a unique way in time and space.
static void SetGlobalWriteParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
UShort_t fPidOffset
Offset to be added to the pid index in this key/buffer.
virtual void ForceWriteInfoClones(TClonesArray *a)
Make sure TStreamerInfo is not optimized, otherwise it will not be possible to support schema evoluti...
virtual TProcessID * ReadProcessID(UShort_t pidf)
The TProcessID with number pidf is read from file.
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
virtual void MapObject(const TObject *obj, UInt_t offset=1)
Add object to the fMap container.
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE)
Write object to I/O buffer.
TClass * GetActualClass(const void *object) const
Return a pointer the the real class of the object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TExMap * fClassMap
Map containing object,class pairs for reading.
virtual 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...
The ROOT global object gROOT contains a list of all defined classes.
TStreamerInfoActions::TActionSequence * GetReadMemberWiseActions(Bool_t forCollection)
void Delete(Option_t *opt="")
Delete all entries stored in the TExMap.
virtual void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE)
Write object to I/O buffer.
virtual Bool_t CheckObject(const TObject *obj)
Check if the specified object is already in the buffer.
virtual void Reset()
Reset buffer object. Resets map and buffer offset.
virtual Int_t ApplySequenceVecPtr(const TStreamerInfoActions::TActionSequence &sequence, void *start_collection, void *end_collection)=0
virtual Int_t GetNumber() const =0
A TRefTable maintains the association between a referenced object and the parent object supporting th...
virtual Int_t ReadClones(TClonesArray *a, Int_t nobjects, Version_t objvers)
Interface to TStreamerInfo::ReadBufferClones.
TExMap * fMap
Map containing object,offset pairs for reading/writing.
virtual UInt_t GetTRefExecId()
Return the exec id stored in the current TStreamerInfo element.
TClass * GetClass() const
Mother of all ROOT objects.
virtual Int_t GetVersionOwner() const
Return the version number of the owner file.
static TStreamerElement * GetCurrentElement()
static function returning a pointer to the current TStreamerElement fgElement points to the current T...
An array of clone (identical) objects.
Direct subclass of TBuffer, implements common methods for TBufferFile and TBufferText classes...
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 Int_t GetNProcessIDs() const
static R__ALWAYS_INLINE ULong_t Void_Hash(const void *ptr)
Return hash value for provided object.
virtual UShort_t WriteProcessID(TProcessID *pid)
Check if the ProcessID pid is already in the file.
virtual void TagStreamerInfo(TVirtualStreamerInfo *info)
Mark the classindex of the current file as using this TStreamerInfo.
virtual void SetReadParam(Int_t mapsize)
Set the initial size of the map used to store object and class references during reading.
virtual void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force)
force writing the TStreamerInfo to the file
Abstract Interface class describing Streamer information for one class.
virtual void SetWriteParam(Int_t mapsize)
Set the initial size of the hashtable used to store object and class references during writing...
static Int_t GetGlobalReadParam()
Get default read map size.
Long64_t GetObjectTag(const void *obj)
Returns tag for specified object from objects map (if exists) Returns 0 if object not included into o...
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.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
TStreamerInfoActions::TActionSequence * GetWriteMemberWiseActions(Bool_t forCollection)
Array of chars or bytes (8 bits per element).