Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TStreamerInfoReadBuffer.cxx File Reference
#include "TBuffer.h"
#include "TFile.h"
#include "TClass.h"
#include "TBufferFile.h"
#include "TClonesArray.h"
#include "TError.h"
#include "TRef.h"
#include "TProcessID.h"
#include "TStreamer.h"
#include "TStreamerElement.h"
#include "TStreamerInfo.h"
#include "TVirtualCollectionProxy.h"
#include "TContainerConverters.h"
#include "TVirtualArray.h"
#include "TVirtualObject.h"
#include "ThreadLocalStorage.h"
Include dependency graph for TStreamerInfoReadBuffer.cxx:

Macros

#define ConvCBasicArray(name, ReadArrayFunc)
 
#define ConvCBasicArrayTo(newtype)
 
#define ConvCBasicPointer(name, ReadArrayFunc)
 
#define ConvCBasicPointerTo(newtype, ReadArrayFunc)
 
#define ConvCBasicPointerToOutOfRange(newtype, ReadArrayFunc)
 
#define ConvCBasicType(name, stream)
 
#define DOLOOP   for(Int_t k=0; k<narr; ++k)
 
#define ReadBasicArray(name)
 
#define ReadBasicArrayElem(name, index)
 
#define ReadBasicArrayLoop(name)
 
#define ReadBasicPointer(name)
 
#define ReadBasicPointerElem(name, index)
 
#define ReadBasicPointerLoop(name)
 
#define ReadBasicType(name)
 
#define ReadBasicTypeElem(name, index)
 
#define ReadBasicTypeLoop(name)
 
#define SkipCBasicArray(name, ReadArrayFunc)
 
#define SkipCBasicPointer(name, ReadArrayFunc)
 
#define SkipCBasicType(name)
 
#define SkipCDouble32(name)
 
#define SkipCFloat16(name)
 

Functions

static TStreamerElement *& CurrentElement ()
 

Macro Definition Documentation

◆ ConvCBasicArray

#define ConvCBasicArray (   name,
  ReadArrayFunc 
)
Value:
{ \
int j, len = compinfo->fLength; \
name* readbuf = new name[len]; \
int newtype = compinfo->fNewType%20; \
DOLOOP { \
b.ReadArrayFunc(readbuf, len); \
switch(newtype) { \
} \
} \
delete[] readbuf; \
break; \
}
#define b(i)
Definition RSha256.hxx:100
bool Bool_t
Definition RtypesCore.h:63
unsigned short UShort_t
Definition RtypesCore.h:40
int Int_t
Definition RtypesCore.h:45
unsigned char UChar_t
Definition RtypesCore.h:38
char Char_t
Definition RtypesCore.h:37
long Long_t
Definition RtypesCore.h:54
unsigned int UInt_t
Definition RtypesCore.h:46
float Float_t
Definition RtypesCore.h:57
short Short_t
Definition RtypesCore.h:39
double Double_t
Definition RtypesCore.h:59
long long Long64_t
Definition RtypesCore.h:80
unsigned long long ULong64_t
Definition RtypesCore.h:81
unsigned long ULong_t
Definition RtypesCore.h:55
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 UChar_t len
char name[80]
Definition TGX11.cxx:110
#define DOLOOP
#define ConvCBasicArrayTo(newtype)
@ kUChar
Equal to TDataType's kchar.

Definition at line 417 of file TStreamerInfoReadBuffer.cxx.

◆ ConvCBasicArrayTo

#define ConvCBasicArrayTo (   newtype)
Value:
{ \
newtype *f=(newtype*)(arr[k]+ioffset); \
for (j=0;j<len;j++) f[j] = (newtype)readbuf[j]; \
break; \
}
#define f(i)
Definition RSha256.hxx:104

Definition at line 410 of file TStreamerInfoReadBuffer.cxx.

◆ ConvCBasicPointer

#define ConvCBasicPointer (   name,
  ReadArrayFunc 
)

Definition at line 469 of file TStreamerInfoReadBuffer.cxx.

◆ ConvCBasicPointerTo

#define ConvCBasicPointerTo (   newtype,
  ReadArrayFunc 
)
Value:
{ \
newtype **f=(newtype**)(arr[k]+ioffset); \
for (j=0;j<len;j++) { \
delete [] f[j]; \
f[j] = new newtype[*l]; \
newtype *af = f[j]; \
b.ReadArrayFunc(readbuf, *l); \
for (jj=0;jj<*l;jj++) af[jj] = (newtype)readbuf[jj]; \
} \
break; \
}
TLine l
Definition textangle.C:4

Definition at line 456 of file TStreamerInfoReadBuffer.cxx.

◆ ConvCBasicPointerToOutOfRange

#define ConvCBasicPointerToOutOfRange (   newtype,
  ReadArrayFunc 
)
Value:
{ \
newtype **f=(newtype**)(arr[k]+ioffset); \
for (j=0;j<len;j++) { \
delete [] f[j]; \
f[j] = 0; \
} \
break; \
}

Definition at line 446 of file TStreamerInfoReadBuffer.cxx.

◆ ConvCBasicType

#define ConvCBasicType (   name,
  stream 
)
Value:
{ \
DOLOOP { \
name u; \
stream; \
switch(compinfo->fNewType) { \
case TStreamerInfo::kBool: {Bool_t *x=(Bool_t*)(arr[k]+ioffset); *x = (Bool_t)u; break;} \
case TStreamerInfo::kChar: {Char_t *x=(Char_t*)(arr[k]+ioffset); *x = (Char_t)u; break;} \
case TStreamerInfo::kShort: {Short_t *x=(Short_t*)(arr[k]+ioffset); *x = (Short_t)u; break;} \
case TStreamerInfo::kInt: {Int_t *x=(Int_t*)(arr[k]+ioffset); *x = (Int_t)u; break;} \
case TStreamerInfo::kLong: {Long_t *x=(Long_t*)(arr[k]+ioffset); *x = (Long_t)u; break;} \
case TStreamerInfo::kLong64: {Long64_t *x=(Long64_t*)(arr[k]+ioffset); *x = (Long64_t)u; break;} \
case TStreamerInfo::kFloat: {Float_t *x=(Float_t*)(arr[k]+ioffset); *x = (Float_t)u; break;} \
case TStreamerInfo::kFloat16: {Float_t *x=(Float_t*)(arr[k]+ioffset); *x = (Float_t)u; break;} \
case TStreamerInfo::kDouble: {Double_t *x=(Double_t*)(arr[k]+ioffset); *x = (Double_t)u; break;} \
case TStreamerInfo::kDouble32:{Double_t *x=(Double_t*)(arr[k]+ioffset); *x = (Double_t)u; break;} \
case TStreamerInfo::kUChar: {UChar_t *x=(UChar_t*)(arr[k]+ioffset); *x = (UChar_t)u; break;} \
case TStreamerInfo::kUShort: {UShort_t *x=(UShort_t*)(arr[k]+ioffset); *x = (UShort_t)u; break;} \
case TStreamerInfo::kUInt: {UInt_t *x=(UInt_t*)(arr[k]+ioffset); *x = (UInt_t)u; break;} \
case TStreamerInfo::kULong: {ULong_t *x=(ULong_t*)(arr[k]+ioffset); *x = (ULong_t)u; break;} \
case TStreamerInfo::kULong64: {ULong64_t*x=(ULong64_t*)(arr[k]+ioffset);*x = (ULong64_t)u;break;} \
} \
} break; \
}
Double_t x[n]
Definition legend1.C:17

Definition at line 385 of file TStreamerInfoReadBuffer.cxx.

◆ DOLOOP

#define DOLOOP   for(Int_t k=0; k<narr; ++k)

Definition at line 53 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicArray

#define ReadBasicArray (   name)
Value:
{ \
ReadBasicArrayElem(name,0); \
}

Definition at line 77 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicArrayElem

#define ReadBasicArrayElem (   name,
  index 
)
Value:
{ \
name *x=(name*)(arr[index]+ioffset); \
b.ReadFastArray(x,compinfo[i]->fLength); \
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index

Definition at line 71 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicArrayLoop

#define ReadBasicArrayLoop (   name)
Value:
{ \
for(Int_t k=0; k<narr; ++k) ReadBasicArrayElem(name,k) \
}
#define ReadBasicArrayElem(name, index)

Definition at line 82 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicPointer

#define ReadBasicPointer (   name)
Value:
{ \
const int imethod = compinfo[i]->fMethod+eoffset; \
ReadBasicPointerElem(name,0); \
}

Definition at line 107 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicPointerElem

#define ReadBasicPointerElem (   name,
  index 
)
Value:
{ \
Char_t isArray; \
b >> isArray; \
Int_t *l = (Int_t*)(arr[index]+imethod); \
if (*l < 0 || *l > b.BufferSize()) continue; \
name **f = (name**)(arr[index]+ioffset); \
int j; \
if (isArray) for(j=0;j<compinfo[i]->fLength;j++) { \
delete [] f[j]; \
f[j] = 0; if (*l <=0) continue; \
f[j] = new name[*l]; \
b.ReadFastArray(f[j],*l); \
} \
else for(j=0;j<compinfo[i]->fLength;j++) { \
delete [] f[j]; \
f[j] = 0; \
} \
}
for(Int_t i=0;i< n;i++)
Definition legend1.C:18

Definition at line 87 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicPointerLoop

#define ReadBasicPointerLoop (   name)
Value:
{ \
int imethod = compinfo[i]->fMethod+eoffset; \
for(int k=0; k<narr; ++k) { \
ReadBasicPointerElem(name,k); \
} \
}

Definition at line 113 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicType

#define ReadBasicType (   name)
Value:
{ \
ReadBasicTypeElem(name,0); \
}

Definition at line 61 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicTypeElem

#define ReadBasicTypeElem (   name,
  index 
)
Value:
{ \
name *x=(name*)(arr[index]+ioffset); \
b >> *x; \
}

Definition at line 55 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicTypeLoop

#define ReadBasicTypeLoop (   name)
Value:
{ \
for(Int_t k=0; k<narr; ++k) ReadBasicTypeElem(name,k); \
}
#define ReadBasicTypeElem(name, index)

Definition at line 66 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCBasicArray

#define SkipCBasicArray (   name,
  ReadArrayFunc 
)
Value:
{ \
name* readbuf = new name[compinfo->fLength]; \
DOLOOP { \
b.ReadArrayFunc(readbuf, compinfo->fLength); \
} \
delete[] readbuf; \
break; \
}

Definition at line 142 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCBasicPointer

#define SkipCBasicPointer (   name,
  ReadArrayFunc 
)
Value:
{ \
Int_t addCounter = -111; \
if ((imethod>0) && (compinfo->fMethod>0)) addCounter = -1; \
if((addCounter<-1) && (aElement!=0) && (aElement->IsA()==TStreamerBasicPointer::Class())) { \
TStreamerElement* elemCounter = (TStreamerElement*) thisVar->GetElements()->FindObject(((TStreamerBasicPointer*)aElement)->GetCountName()); \
if (elemCounter) addCounter = elemCounter->GetTObjectOffset(); \
} \
if (addCounter>=-1) { \
int len = aElement->GetArrayDim()?aElement->GetArrayLength():1; \
Char_t isArray; \
DOLOOP { \
b >> isArray; \
char *arr_k = arr[k]; \
Int_t *l = (addCounter==-1 && arr_k) ? (Int_t*)(arr_k+imethod) : &addCounter; \
if (*l>0) { \
name* readbuf = new name[*l]; \
for (int j=0;j<len;j++) \
b.ReadArrayFunc(readbuf, *l); \
delete[] readbuf; \
} \
} \
} \
break; \
}
static TClass * Class()
Definition Class.C:29
TClass * IsA() const override
Definition TStringLong.h:20
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
Definition TObject.cxx:403
Int_t GetArrayDim() const
Int_t GetArrayLength() const
Int_t GetTObjectOffset() const

Definition at line 152 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCBasicType

#define SkipCBasicType (   name)
Value:
{ \
name dummy; \
DOLOOP{ b >> dummy; } \
break; \
}

Definition at line 121 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCDouble32

#define SkipCDouble32 (   name)
Value:
{ \
name dummy; \
DOLOOP { b.ReadDouble32(&dummy,aElement); }\
break; \
}

Definition at line 135 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCFloat16

#define SkipCFloat16 (   name)
Value:
{ \
name dummy; \
DOLOOP { b.ReadFloat16(&dummy,aElement); } \
break; \
}

Definition at line 128 of file TStreamerInfoReadBuffer.cxx.

Function Documentation

◆ CurrentElement()

static TStreamerElement *& CurrentElement ( )
static

Definition at line 32 of file TStreamerInfoReadBuffer.cxx.