76 Fatal(
"TBuffer",
"Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsiz,
kMaxBufferSize);
107 Fatal(
"TBuffer",
"Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsiz,
kMaxBufferSize);
160 if (size_needed < 0) {
161 Fatal(
"AutoExpand",
"Request to expand to a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", size_needed,
kMaxBufferSize);
167 if (size_needed > doubling) {
226 if ( (
l > newsize) && copy ) {
247 Fatal(
"Expand",
"Failed to expand the data buffer using TStorage::ReAllocChar.");
249 Fatal(
"Expand",
"Failed to expand the data buffer because TBuffer does not own it and no custom memory reallocator was provided.");
251 Fatal(
"Expand",
"Failed to expand the data buffer using custom memory reallocator 0x%zx.", (
size_t)
fReAllocFunc);
397 Short_t *buf __attribute__((aligned(8))) =
reinterpret_cast<Short_t*
>(input_buf);
398 for (
int idx=0; idx<
n; idx++) {
400 char *tmp_ptr =
reinterpret_cast<char *
>(&tmp);
406 Float_t *buf __attribute__((aligned(8))) =
reinterpret_cast<Float_t*
>(input_buf);
407 for (
int idx=0; idx<
n; idx++) {
409 char *tmp_ptr =
reinterpret_cast<char *
>(&tmp);
415 Double_t *buf __attribute__((aligned(8))) =
reinterpret_cast<Double_t*
>(input_buf);
416 for (
int idx=0; idx<
n; idx++) {
418 char *tmp_ptr =
reinterpret_cast<char*
>(&tmp);
void frombuf(char *&buf, Bool_t *x)
constexpr Int_t kExtraSpace
constexpr Int_t kMaxBufferSize
static char * R__NoReAllocChar(char *, size_t, size_t)
The user has provided memory than we don't own, thus we can not extent it either.
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
Buffer base class used for serializing objects.
void SetWriteMode()
Set buffer in write mode.
void SetReAllocFunc(ReAllocCharFun_t reallocfunc=0)
Set which memory reallocation method to use.
Bool_t ByteSwapBuffer(Long64_t n, EDataType type)
Byte-swap N primitive-elements in the buffer.
CacheList_t fCacheStack
Realloc function to be used when extending the buffer.
virtual TProcessID * ReadProcessID(UShort_t pidf)=0
Return the current Process-ID.
virtual UShort_t WriteProcessID(TProcessID *pid)=0
Always return 0 (current processID).
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
void SetParent(TObject *parent)
Set parent owning this buffer.
TObject * GetParent() const
Return pointer to parent of this buffer.
char * GetCurrent() const
void Expand(Int_t newsize, Bool_t copy=kTRUE)
Expand (or shrink) the I/O buffer to newsize bytes.
virtual void PushDataCache(TVirtualArray *)
Push a new data cache area onto the list of area to be used for temporarily store 'missing' data memb...
virtual TVirtualArray * PopDataCache()
Pop and Return the 'current' data cache area from the list of area to be used for temporarily store '...
void AutoExpand(Int_t size_needed)
Automatically calculate a new size and expand the buffer to fit at least size_needed.
void SetBuffer(void *buf, UInt_t bufsiz=0, Bool_t adopt=kTRUE, ReAllocCharFun_t reallocfunc=0)
Sets a new buffer in an existing TBuffer object.
virtual TVirtualArray * PeekDataCache() const
Return the 'current' data cache area from the list of area to be used for temporarily store 'missing'...
virtual ~TBuffer()
Delete an I/O buffer object.
static TClass * GetClass(const std::type_info &typeinfo)
Forward to TROOT::GetClass().
ReAllocCharFun_t GetReAllocFunc() const
Return the reallocation method currently used.
ReAllocCharFun_t fReAllocFunc
void SetReadMode()
Set buffer in read mode.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TClass instances represent classes, structs and namespaces in the ROOT type system.
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.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
A TProcessID identifies a ROOT job in a unique way in time and space.
static TProcessID * GetPID()
static: returns pointer to current TProcessID
static char * ReAllocChar(char *vp, size_t size, size_t oldsize)
Reallocate (i.e.
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
void DefaultStreamer(TBuffer &R__b, const TClass *cl, void *objpointer)
Default streamer implementation used by ClassDefInline to avoid requirement to include TBuffer....