57 fBufCur(0), fBufMax(0), fParent(0), fReAllocFunc(0), fCacheStack(0,(
TVirtualArray*)0) {}
70 enum EMode { kRead = 0, kWrite = 1 };
73 kCannotHandleMemberWiseStreaming =
BIT(17)
75 enum { kInitialSize = 1024, kMinimalSize = 128 };
91 void SetParent(
TObject *parent);
93 char *
Buffer()
const {
return fBuffer; }
98 void AutoExpand(
Int_t size_needed);
101 virtual Bool_t CheckObject(
const void *obj,
const TClass *ptrClass) = 0;
103 virtual Int_t ReadBuf(
void *buf,
Int_t max) = 0;
104 virtual void WriteBuf(
const void *buf,
Int_t max) = 0;
106 virtual char *ReadString(
char *
s,
Int_t max) = 0;
107 virtual void WriteString(
const char *s) = 0;
109 virtual Int_t GetVersionOwner()
const = 0;
110 virtual Int_t GetMapCount()
const = 0;
111 virtual void GetMappedObject(
UInt_t tag,
void* &ptr,
TClass* &ClassPtr)
const = 0;
112 virtual void MapObject(
const TObject *obj,
UInt_t offset = 1) = 0;
113 virtual void MapObject(
const void *obj,
const TClass *cl,
UInt_t offset = 1) = 0;
114 virtual void Reset() = 0;
115 virtual void InitMap() = 0;
116 virtual void ResetMap() = 0;
117 virtual void SetReadParam(
Int_t mapsize) = 0;
118 virtual void SetWriteParam(
Int_t mapsize) = 0;
121 virtual Int_t CheckByteCount(
UInt_t startpos,
UInt_t bcnt,
const char *classname) = 0;
124 virtual void SkipVersion(
const TClass *cl = 0) = 0;
131 virtual void *ReadObjectAny(
const TClass* cast) = 0;
132 virtual void SkipObjectAny() = 0;
140 virtual void ClassEnd(
const TClass*) = 0;
141 virtual void ClassMember(
const char*,
const char* = 0,
Int_t = -1,
Int_t = -1) = 0;
149 virtual void WriteClass(
const TClass *cl) = 0;
152 virtual void WriteObject(
const TObject *obj,
Bool_t cacheReuse) = 0;
154 template <
class T>
Int_t WriteObject(
const T *objptr,
Bool_t cacheReuse =
kTRUE);
158 virtual UShort_t GetPidOffset()
const = 0;
159 virtual void SetPidOffset(
UShort_t offset) = 0;
160 virtual Int_t GetBufferDisplacement()
const = 0;
161 virtual void SetBufferDisplacement() = 0;
162 virtual void SetBufferDisplacement(
Int_t skipped) = 0;
170 virtual void ReadWithNbits(
Float_t *ptr,
Int_t nbits) = 0;
207 virtual void ReadFastArray(
Char_t *c,
Int_t n) = 0;
208 virtual void ReadFastArrayString(
Char_t *c,
Int_t n) = 0;
212 virtual void ReadFastArray(
Int_t *i,
Int_t n) = 0;
213 virtual void ReadFastArray(
UInt_t *i,
Int_t n) = 0;
214 virtual void ReadFastArray(
Long_t *l,
Int_t n) = 0;
229 virtual void WriteArray(
const Bool_t *b,
Int_t n) = 0;
230 virtual void WriteArray(
const Char_t *c,
Int_t n) = 0;
234 virtual void WriteArray(
const Int_t *i,
Int_t n) = 0;
235 virtual void WriteArray(
const UInt_t *i,
Int_t n) = 0;
236 virtual void WriteArray(
const Long_t *l,
Int_t n) = 0;
245 virtual void WriteFastArray(
const Bool_t *b,
Int_t n) = 0;
246 virtual void WriteFastArray(
const Char_t *c,
Int_t n) = 0;
247 virtual void WriteFastArrayString(
const Char_t *c,
Int_t n) = 0;
248 virtual void WriteFastArray(
const UChar_t *c,
Int_t n) = 0;
249 virtual void WriteFastArray(
const Short_t *h,
Int_t n) = 0;
251 virtual void WriteFastArray(
const Int_t *i,
Int_t n) = 0;
252 virtual void WriteFastArray(
const UInt_t *i,
Int_t n) = 0;
253 virtual void WriteFastArray(
const Long_t *l,
Int_t n) = 0;
254 virtual void WriteFastArray(
const ULong_t *l,
Int_t n) = 0;
257 virtual void WriteFastArray(
const Float_t *f,
Int_t n) = 0;
264 virtual void StreamObject(
void *obj,
const std::type_info &typeinfo,
const TClass* onFileClass = 0 ) = 0;
265 virtual void StreamObject(
void *obj,
const char *className,
const TClass* onFileClass = 0 ) = 0;
266 virtual void StreamObject(
void *obj,
const TClass *cl,
const TClass* onFileClass = 0 ) = 0;
267 virtual void StreamObject(
TObject *obj) = 0;
269 virtual void ReadBool(
Bool_t &b) = 0;
270 virtual void ReadChar(
Char_t &c) = 0;
271 virtual void ReadUChar(
UChar_t &c) = 0;
272 virtual void ReadShort(
Short_t &s) = 0;
273 virtual void ReadUShort(
UShort_t &s) = 0;
274 virtual void ReadInt(
Int_t &i) = 0;
275 virtual void ReadUInt(
UInt_t &i) = 0;
276 virtual void ReadLong(
Long_t &l) = 0;
277 virtual void ReadULong(
ULong_t &l) = 0;
278 virtual void ReadLong64(
Long64_t &l) = 0;
279 virtual void ReadULong64(
ULong64_t &l) = 0;
280 virtual void ReadFloat(
Float_t &f) = 0;
281 virtual void ReadDouble(
Double_t &d) = 0;
282 virtual void ReadCharP(
Char_t *c) = 0;
284 virtual void ReadStdString(std::string *s) = 0;
285 virtual void ReadCharStar(
char* &s) = 0;
289 virtual void WriteBool(
Bool_t b) = 0;
290 virtual void WriteChar(
Char_t c) = 0;
291 virtual void WriteUChar(
UChar_t c) = 0;
292 virtual void WriteShort(
Short_t s) = 0;
293 virtual void WriteUShort(
UShort_t s) = 0;
294 virtual void WriteInt(
Int_t i) = 0;
295 virtual void WriteUInt(
UInt_t i) = 0;
296 virtual void WriteLong(
Long_t l) = 0;
297 virtual void WriteULong(
ULong_t l) = 0;
298 virtual void WriteLong64(
Long64_t l) = 0;
299 virtual void WriteULong64(
ULong64_t l) = 0;
300 virtual void WriteFloat(
Float_t f) = 0;
301 virtual void WriteDouble(
Double_t d) = 0;
302 virtual void WriteCharP(
const Char_t *c) = 0;
303 virtual void WriteTString(
const TString &s) = 0;
304 virtual void WriteStdString(
const std::string *s) = 0;
305 virtual void WriteCharStar(
char *s) = 0;
311 virtual UInt_t GetTRefExecId() = 0;
322 virtual Int_t ReadClassEmulated(
const TClass *cl,
void *
object,
const TClass *onfile_class = 0) = 0;
323 virtual Int_t ReadClassBuffer(
const TClass *cl,
void *pointer,
const TClass *onfile_class = 0) = 0;
325 virtual Int_t WriteClassBuffer(
const TClass *cl,
void *pointer) = 0;
374 #if defined(R__SOLARIS) && defined(R__GNU) 405 #if defined(R__TEMPLATE_OVERLOAD_BUG) 415 return WriteObjectAny(objptr, cl, cacheReuse);
418 #endif // ROOT_TBuffer
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
void SetBufferOffset(Int_t offset=0)
virtual void WriteBool(Bool_t b)=0
Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
ReAllocCharFun_t fReAllocFunc
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
Buffer base class used for serializing objects.
virtual void WriteDouble(Double_t d)=0
virtual void ReadShort(Short_t &s)=0
std::vector< TVirtualArray * > CacheList_t
virtual void WriteTString(const TString &s)=0
INLINE_TEMPLATE_ARGS Int_t ReadTString(TBuffer &buf, void *addr, const TConfiguration *config)
virtual void WriteLong64(Long64_t l)=0
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE)=0
virtual void ReadChar(Char_t &c)=0
virtual void ReadUChar(UChar_t &c)=0
Int_t PushDataCache(TBuffer &b, void *, const TConfiguration *conf)
virtual void ReadInt(Int_t &i)=0
#define ClassDef(name, id)
virtual void WriteUShort(UShort_t s)=0
virtual void ReadDouble(Double_t &d)=0
static TClass * GetClass(const std::type_info &typeinfo)
Forward to TROOT::GetClass().
virtual void ReadLong(Long_t &l)=0
virtual void ReadUInt(UInt_t &i)=0
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
A TProcessID identifies a ROOT job in a unique way in time and space.
virtual void WriteFloat(Float_t f)=0
virtual void WriteStdString(std::string &s)
CacheList_t fCacheStack
Realloc function to be used when extending the buffer.
virtual void ReadBool(Bool_t &b)=0
virtual void ReadULong(ULong_t &l)=0
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
virtual void WriteCharP(const Char_t *c)=0
virtual void ReadUShort(UShort_t &s)=0
virtual void WriteInt(Int_t i)=0
virtual void ReadCharP(Char_t *c)=0
virtual void WriteShort(Short_t s)=0
The ROOT global object gROOT contains a list of all defined classes.
void Reset(Detail::TBranchProxy *x)
Int_t GetBufferVersion() const
virtual void WriteChar(Char_t c)=0
TBuffer & operator>>(TBuffer &buf, Bool_t &b)
TBuffer & operator<<(TBuffer &buf, Bool_t b)
Int_t Write(const char *name, Int_t opt, Int_t bufs)
Write this object to the current directory.
virtual void WriteUInt(UInt_t i)=0
virtual void WriteObject(const TObject *obj, Bool_t cacheReuse)=0
unsigned long long ULong64_t
virtual void ReadULong64(ULong64_t &l)=0
A TRefTable maintains the association between a referenced object and the parent object supporting th...
static constexpr double s
virtual void * ReadObjectAny(const TClass *cast)=0
virtual void ReadTString(TString &s)=0
virtual void WriteLong(Long_t l)=0
Binding & operator=(OUT(*fun)(void))
virtual void ReadLong64(Long64_t &l)=0
Mother of all ROOT objects.
An array of clone (identical) objects.
virtual void WriteUChar(UChar_t c)=0
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
virtual void WriteULong(ULong_t l)=0
virtual void ReadFloat(Float_t &f)=0
Int_t Write(const char *name, Int_t opt, Int_t bufs) const
Write this object to the current directory.
Abstract Interface class describing Streamer information for one class.
virtual void WriteULong64(ULong64_t l)=0
virtual void ReadStdString(std::string &s)
Int_t PopDataCache(TBuffer &b, void *, const TConfiguration *)