Logo ROOT   6.16/01
Reference Guide
Macros | Functions
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 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; \
}
unsigned short UShort_t
Definition: RtypesCore.h:36
int Int_t
Definition: RtypesCore.h:41
unsigned char UChar_t
Definition: RtypesCore.h:34
char Char_t
Definition: RtypesCore.h:29
unsigned int UInt_t
Definition: RtypesCore.h:42
unsigned long ULong_t
Definition: RtypesCore.h:51
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
short Short_t
Definition: RtypesCore.h:35
double Double_t
Definition: RtypesCore.h:55
long long Long64_t
Definition: RtypesCore.h:69
unsigned long long ULong64_t
Definition: RtypesCore.h:70
float Float_t
Definition: RtypesCore.h:53
#define ConvCBasicArrayTo(newtype)
@ kUChar
Equal to TDataType's kchar.

Definition at line 416 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 409 of file TStreamerInfoReadBuffer.cxx.

◆ ConvCBasicPointer

#define ConvCBasicPointer (   name,
  ReadArrayFunc 
)

Definition at line 468 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; \
}
auto * l
Definition: textangle.C:4

Definition at line 455 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 445 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 384 of file TStreamerInfoReadBuffer.cxx.

◆ DOLOOP

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

Definition at line 52 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicArray

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

Definition at line 76 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicArrayElem

#define ReadBasicArrayElem (   name,
  index 
)
Value:
{ \
name *x=(name*)(arr[index]+ioffset); \
b.ReadFastArray(x,compinfo[i]->fLength); \
}

Definition at line 70 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 81 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicPointer

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

Definition at line 106 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; \
} \
}
#define b(i)
Definition: RSha256.hxx:100
for(Int_t i=0;i< n;i++)
Definition: legend1.C:18

Definition at line 86 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 112 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicType

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

Definition at line 60 of file TStreamerInfoReadBuffer.cxx.

◆ ReadBasicTypeElem

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

Definition at line 54 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 65 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 141 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; \
}
void Class()
Definition: Class.C:29
Int_t GetArrayDim() const
Int_t GetArrayLength() const

Definition at line 151 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCBasicType

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

Definition at line 120 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCDouble32

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

Definition at line 134 of file TStreamerInfoReadBuffer.cxx.

◆ SkipCFloat16

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

Definition at line 127 of file TStreamerInfoReadBuffer.cxx.

Function Documentation

◆ CurrentElement()

static TStreamerElement *& CurrentElement ( )
static

Definition at line 31 of file TStreamerInfoReadBuffer.cxx.