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.
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char *(* ReAllocCharFun_t)(char *, size_t, size_t)
Buffer base class used for serializing objects.
void SetWriteMode()
Set buffer in write mode.
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).
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.
void SetBuffer(void *buf, UInt_t bufsiz=0, Bool_t adopt=kTRUE, ReAllocCharFun_t reallocfunc=nullptr)
Sets a new buffer in an existing TBuffer object.
virtual void PushDataCache(TVirtualArray *)
Push a new data cache area onto the list of area to be used for temporarily store 'missing' data memb...
void SetReAllocFunc(ReAllocCharFun_t reallocfunc=nullptr)
Set which memory reallocation method to use.
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.
virtual TVirtualArray * PeekDataCache() const
Return the 'current' data cache area from the list of area to be used for temporarily store 'missing'...
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
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....