30#define DOLOOP for(int k=0; k<narr; ++k) 
   32#define WriteBasicTypeElem(name,index)          \ 
   34      name *x=(name*)(arr[index]+ioffset);      \ 
   38#define WriteBasicType(name)                    \ 
   40      WriteBasicTypeElem(name,0);               \ 
   43#define WriteBasicTypeLoop(name)                            \ 
   45      for(int k=0; k<narr; ++k) WriteBasicTypeElem(name,k); \ 
   48#define WriteBasicArrayElem(name,index)         \ 
   50      name *x=(name*)(arr[index]+ioffset);      \ 
   51      b.WriteFastArray(x,compinfo[i]->fLength);           \ 
   54#define WriteBasicArray(name)                   \ 
   56      WriteBasicArrayElem(name,0);              \ 
   59#define WriteBasicArrayLoop(name)                              \ 
   61      for(int k=0; k<narr; ++k) WriteBasicArrayElem(name,k);   \ 
   64#define WriteBasicPointerElem(name,index)       \ 
   66      Int_t *l = (Int_t*)(arr[index]+imethod);  \ 
   67      name **f = (name**)(arr[index]+ioffset);  \ 
   69      if (af && *l)  b << Char_t(1);            \ 
   70      else          {b << Char_t(0); continue;} \ 
   72      for(j=0;j<compinfo[i]->fLength;j++) {               \ 
   73         b.WriteFastArray(f[j],*l);             \ 
   77#define WriteBasicPointer(name)                 \ 
   79      int imethod = compinfo[i]->fMethod+eoffset;         \ 
   80      WriteBasicPointerElem(name,0);            \ 
   83#define WriteBasicPointerLoop(name)             \ 
   85      int imethod = compinfo[i]->fMethod+eoffset;         \ 
   86      for(int k=0; k<narr; ++k) {               \ 
   87         WriteBasicPointerElem(name,k);         \ 
  118   Bool_t needIncrement = !( arrayMode & 2 );
 
  119   arrayMode = arrayMode & (~2);
 
  121   if (needIncrement) 
b.IncrementLevel(
this);
 
  124   b.TagStreamerInfo(
this);
 
  136   static const int kHaveLoop = 1024;
 
  137   const Int_t typeOffset = arrayMode ? kHaveLoop : 0;
 
  143      if (needIncrement) 
b.SetStreamerElementNumber(aElement,compinfo[i]->
fType);
 
  147      if (R__TestUseCache<T>(aElement)) {
 
  150               Warning(
"WriteBuffer",
"Skipping %s::%s because the cache is missing.",
GetName(),aElement->
GetName());
 
  153                  printf(
"WriteBuffer, class:%s, name=%s, fType[%d]=%d," 
  154                         " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n",
 
  163               printf(
"WriteBuffer, class:%s, name=%s, fType[%d]=%d," 
  164                      " %s, bufpos=%d, arr=%p, eoffset=%d, not a write rule, skipping.\n",
 
  166                      aElement->
ClassName(),
b.Length(),arr[0], eoffset);
 
  171            ioffset = eoffset+compinfo[i]->
fOffset;
 
  177         printf(
"WriteBuffer, class:%s, name=%s, fType[%d]=%d, %s, " 
  178               "bufpos=%d, arr=%p, offset=%d\n",
 
  180                b.Length(),arr[0],ioffset);
 
  183      switch (compinfo[i]->
fType+typeOffset) {
 
  203            b.WriteFloat16(
x,aElement);
 
  208            b.WriteDouble32(
x,aElement);
 
  226            for(
int k=0; k<narr; ++k) {
 
  228               b.WriteFloat16(
x,aElement);
 
  233            for(
int k=0; k<narr; ++k) {
 
  235               b.WriteDouble32(
x,aElement);
 
  255            b.WriteFastArrayFloat16((
Float_t*)(arr[0]+ioffset),compinfo[i]->fLength,aElement);
 
  259            b.WriteFastArrayDouble32((
Double_t*)(arr[0]+ioffset),compinfo[i]->fLength,aElement);
 
  277            for(
int k=0; k<narr; ++k) {
 
  278               b.WriteFastArrayFloat16((
Float_t*)(arr[k]+ioffset),compinfo[i]->fLength,aElement);
 
  283            for(
int k=0; k<narr; ++k) {
 
  284               b.WriteFastArrayDouble32((
Double_t*)(arr[k]+ioffset),compinfo[i]->fLength,aElement);
 
  304            int imethod = compinfo[i]->
fMethod+eoffset;
 
  309            else          {
b << 
Char_t(0); 
continue;}
 
  311            for(j=0;j<compinfo[i]->
fLength;j++) {
 
  312               b.WriteFastArrayFloat16(
f[j],*
l,aElement);
 
  317            int imethod = compinfo[i]->
fMethod+eoffset;
 
  322            else          {
b << 
Char_t(0); 
continue;}
 
  324            for(j=0;j<compinfo[i]->
fLength;j++) {
 
  325               b.WriteFastArrayDouble32(
f[j],*
l,aElement);
 
  344            int imethod = compinfo[i]->
fMethod+eoffset;
 
  345            for(
int k=0; k<narr; ++k) {
 
  350               else          {
b << 
Char_t(0); 
continue;}
 
  352               for(j=0;j<compinfo[i]->
fLength;j++) {
 
  353                  b.WriteFastArrayFloat16(
f[j],*
l,aElement);
 
  359            int imethod = compinfo[i]->
fMethod+eoffset;
 
  360            for(
int k=0; k<narr; ++k) {
 
  365               else          {
b << 
Char_t(0); 
continue;}
 
  367               for(j=0;j<compinfo[i]->
fLength;j++) {
 
  368                  b.WriteFastArrayDouble32(
f[j],*
l,aElement);
 
  378               if (needIncrement) 
b.DecrementLevel(
this);
 
  396      switch (compinfo[i]->
fType) {
 
  400            char **
f = (
char**)(arr[k]+ioffset);
 
  441               Int_t res = 
b.WriteFastArray((
void**)(arr[k]+ioffset),cl,compinfo[i]->fLength,isPreAlloc,pstreamer);
 
  444                          "The actual class of %s::%s is not available. Only the \"%s\" part will be written\n",
 
  456               void **
f = (
void**)(arr[k]+ioffset);
 
  458               for(j=0;j<compinfo[i]->
fLength;j++) {
 
  461                  else    {
b << 
Char_t(0); 
continue;}
 
  462                  if (pstreamer) (*pstreamer)(
b, af, 0);
 
  510                   && !(strspn(aElement->
GetTitle(),
"||") == 2)
 
  514                  UInt_t pos = 
b.WriteVersionMemberWise(this->IsA(),
kTRUE);
 
  515                  b.WriteVersion( vClass, 
kFALSE );
 
  518                     char **contp = (
char**)(arr[k]+ioffset);
 
  519                     for(
int j=0;j<compinfo[i]->
fLength;++j) {
 
  520                        char *cont = contp[j];
 
  522                        Int_t nobjects = cont ? proxy->
Size() : 0;
 
  527                  b.SetByteCount(pos,
kTRUE);
 
  531               if (pstreamer == 0) {
 
  533                     char **contp = (
char**)(arr[k]+ioffset);
 
  534                     for(
int j=0;j<compinfo[i]->
fLength;++j) {
 
  535                        char *cont = contp[j];
 
  542               b.SetByteCount(pos,
kTRUE);
 
  556                   && !(strspn(aElement->
GetTitle(),
"||") == 2)
 
  560                  UInt_t pos = 
b.WriteVersionMemberWise(this->IsA(),
kTRUE);
 
  561                  b.WriteVersion( vClass, 
kFALSE );
 
  564                     char *obj = (
char*)(arr[k]+ioffset);
 
  567                     int size = cl->
Size();
 
  569                     for(
Int_t j=0; j<
n; j++,obj+=size) {
 
  576                  b.SetByteCount(pos,
kTRUE);
 
  580               if (pstreamer == 0) {
 
  582                     b.WriteFastArray((
void*)(arr[k]+ioffset),cl,compinfo[i]->fLength,0);
 
  587               b.SetByteCount(pos,
kTRUE);
 
  599               {
b.WriteFastArray((
void*)(arr[k]+ioffset),cl,compinfo[i]->fLength,pstreamer);}
 
  611            DOLOOP {
b.WriteFastArray((
void*)(arr[k]+ioffset),cl,compinfo[i]->fLength,pstreamer);}
 
  612            b.SetByteCount(pos,
kTRUE);
 
  618            if (!(arrayMode&1)) {
 
  624                  b.SetByteCount(pos,
kTRUE);
 
  640            if (pstreamer == 0) {
 
  641               printf(
"ERROR, Streamer is null\n");
 
  642               aElement->
ls();
continue;
 
  646            b.SetByteCount(pos,
kTRUE);
 
  671               for (
int k = 0; k < narr; ++k) {
 
  673                  Int_t* counter = (
Int_t*) (arr[k]  + eoffset  + compinfo[i]->fMethod );
 
  675                  (*pstreamer)(
b, arr[k]  + ioffset , *counter);
 
  677               b.SetByteCount(pos, 
kTRUE);
 
  687               fileVersion = 
file->GetVersion();
 
  691            if (fileVersion > 51508) {
 
  694               for (
int k = 0; k < narr; ++k) {
 
  696                  Int_t vlen = *((
Int_t*) (arr[k]  + eoffset  + compinfo[i]->fMethod ));
 
  700                     char** pp = (
char**) (arr[k]  + ioffset );
 
  702                     for (
Int_t ndx = 0; ndx < compinfo[i]->
fLength; ++ndx) {
 
  712                           b.WriteFastArray(pp[ndx], cl, vlen, 0);
 
  718                           b.WriteFastArray((
void**) pp[ndx], cl, vlen, 
kFALSE, 0);
 
  727               for (
int k = 0; k < narr; ++k) {
 
  729                  Int_t vlen = *((
Int_t*) (arr[k]  + eoffset  + compinfo[i]->fMethod ));
 
  733                     char** pp = (
char**) (arr[k]  + ioffset );
 
  736                     for (
Int_t ndx = 0; ndx < compinfo[i]->
fLength; ++ndx) {
 
  755                              char** 
r = (
char**) pp[ndx];
 
  765            b.SetByteCount(pos, 
kTRUE);
 
  777            ROOT::TSchemaRule::WriteFuncPtr_t writefunc = ((
TStreamerArtificial*)aElement)->GetWriteFunc();
 
  779               DOLOOP( writefunc(arr[k]+eoffset, 
b) );
 
  792   if (needIncrement) 
b.DecrementLevel(
this);
 
  841   char **arr = 
reinterpret_cast<char**
>(clones->
GetObjectRef(0));
 
unsigned long long ULong64_t
 
#define WriteBasicArray(name)
 
#define WriteBasicPointer(name)
 
#define WriteBasicPointerLoop(name)
 
#define WriteBasicArrayLoop(name)
 
#define WriteBasicTypeLoop(name)
 
#define WriteBasicType(name)
 
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
 
Buffer base class used for serializing objects.
 
@ kCannotHandleMemberWiseStreaming
 
TClass instances represent classes, structs and namespaces in the ROOT type system.
 
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
 
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
 
Int_t Size() const
Return size of object of this class.
 
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
 
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
 
@ kHasCustomStreamerMember
 
An array of clone (identical) objects.
 
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
 
The TNamed class is the base class for all named ROOT classes.
 
virtual const char * GetTitle() const
Returns title of object.
 
virtual const char * GetName() const
Returns name of object.
 
TObject ** GetObjectRef() const
 
Mother of all ROOT objects.
 
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
 
virtual UInt_t GetUniqueID() const
Return the unique object id.
 
virtual const char * ClassName() const
Returns name of class to which the object belongs.
 
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
 
@ kIsReferenced
if object is referenced by a TRef or TRefArray
 
A TProcessID identifies a ROOT job in a unique way in time and space.
 
static TProcessID * GetProcessWithUID(const TObject *obj)
static function returning a pointer to TProcessID with its pid encoded in the highest byte of obj->Ge...
 
A TRefTable maintains the association between a referenced object and the parent object supporting th...
 
static TRefTable * GetRefTable()
Static function returning the current TRefTable.
 
virtual Int_t Add(Int_t uid, TProcessID *context=0)
Add a new uid to the table.
 
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
 
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
 
const char * GetTypeName() const
 
virtual void ls(Option_t *option="") const
Print the content of the element.
 
TClass * fClass
Not Owned.
 
TMemberStreamer * fStreamer
Not Owned.
 
Describe Streamer information for one class version.
 
Int_t fNfulldata
!number of elements
 
Int_t WriteBufferSTL(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc)
Write for STL container. ('first' is an id between -1 and fNfulldata).
 
TCompInfo ** fCompFull
![fElements->GetEntries()]
 
@ kArtificial
Cache the value in memory than is not part of the object but is accessible via a SchemaRule.
 
@ kUChar
Equal to TDataType's kchar.
 
Int_t fNdata
!number of optimized elements
 
TClass * fClass
!pointer to class
 
TCompInfo ** fCompOpt
![fNdata]
 
Int_t WriteBuffer(TBuffer &b, char *pointer, Int_t first)
General Write.
 
Int_t WriteBufferClones(TBuffer &b, TClonesArray *clones, Int_t nc, Int_t first, Int_t eoffset)
Write for ClonesArray ('first' is an id between -1 and fNfulldata).
 
Int_t WriteBufferAux(TBuffer &b, const T &arr, TCompInfo *const *const compinfo, Int_t first, Int_t last, Int_t narr, Int_t eoffset, Int_t mode)
The object at pointer is serialized to the buffer b if (arrayMode & 1) ptr is a pointer to array of p...
 
Int_t WriteBufferSTLPtrs(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc, Int_t first, Int_t eoffset)
Write for STL container.
 
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
 
virtual TClass * GetValueClass() const =0
 
virtual UInt_t Size() const =0
 
static Bool_t GetStreamMemberWise()
Return whether the TStreamerInfos will save the collections in "member-wise" order whenever possible.