TStreamerInfoReadBuffer.cxx

Go to the documentation of this file.
00001 // @(#)root/io:$Id: TStreamerInfoReadBuffer.cxx 38211 2011-02-24 21:51:24Z pcanal $
00002 // Author: Rene Brun   12/10/2000
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #include "TBuffer.h"
00013 #include "TFile.h"
00014 #include "TClass.h"
00015 #include "TBufferFile.h"
00016 #include "TClonesArray.h"
00017 #include "TError.h"
00018 #include "TRef.h"
00019 #include "TProcessID.h"
00020 #include "TStreamer.h"
00021 #include "TStreamerElement.h"
00022 #include "TStreamerInfo.h"
00023 #include "TVirtualCollectionProxy.h"
00024 #include "TContainerConverters.h"
00025 #include "TVirtualArray.h"
00026 #include "TVirtualObject.h"
00027 
00028 //==========CPP macros
00029 
00030 #define DOLOOP for(Int_t k=0; k<narr; ++k)
00031 
00032 #define ReadBasicTypeElem(name,index)           \
00033    {                                            \
00034       name *x=(name*)(arr[index]+ioffset);      \
00035       b >> *x;                                  \
00036    }
00037 
00038 #define ReadBasicType(name)                     \
00039    {                                            \
00040       ReadBasicTypeElem(name,0);                \
00041    }
00042 
00043 #define ReadBasicTypeLoop(name)                                \
00044    {                                                           \
00045       for(Int_t k=0; k<narr; ++k) ReadBasicTypeElem(name,k);   \
00046    }
00047 
00048 #define ReadBasicArrayElem(name,index)          \
00049    {                                            \
00050       name *x=(name*)(arr[index]+ioffset);      \
00051       b.ReadFastArray(x,fLength[i]);            \
00052    }
00053 
00054 #define ReadBasicArray(name)                     \
00055    {                                             \
00056       ReadBasicArrayElem(name,0);                \
00057    }
00058 
00059 #define ReadBasicArrayLoop(name)                               \
00060    {                                                           \
00061       for(Int_t k=0; k<narr; ++k) ReadBasicArrayElem(name,k)   \
00062    }
00063 
00064 #define ReadBasicPointerElem(name,index)        \
00065    {                                            \
00066       Char_t isArray;                           \
00067       b >> isArray;                             \
00068       Int_t *l = (Int_t*)(arr[index]+imethod);  \
00069       if (*l < 0 || *l > b.BufferSize()) continue;     \
00070       name **f = (name**)(arr[index]+ioffset);  \
00071       int j;                                    \
00072       if (isArray) for(j=0;j<fLength[i];j++) {  \
00073          delete [] f[j];                        \
00074          f[j] = 0; if (*l <=0) continue;        \
00075          f[j] = new name[*l];                   \
00076          b.ReadFastArray(f[j],*l);              \
00077       }                                         \
00078    }
00079 
00080 #define ReadBasicPointer(name)                  \
00081    {                                            \
00082       const int imethod = fMethod[i]+eoffset;   \
00083       ReadBasicPointerElem(name,0);             \
00084    }
00085 
00086 #define ReadBasicPointerLoop(name)              \
00087    {                                            \
00088       int imethod = fMethod[i]+eoffset;         \
00089       for(int k=0; k<narr; ++k) {               \
00090          ReadBasicPointerElem(name,k);          \
00091       }                                         \
00092    }
00093 
00094 #define SkipCBasicType(name)                    \
00095    {                                            \
00096       name dummy;                               \
00097       DOLOOP{ b >> dummy; }                     \
00098       break;                                    \
00099    }
00100 
00101 #define SkipCFloat16(name)                       \
00102    {                                             \
00103       name dummy;                                \
00104       DOLOOP { b.ReadFloat16(&dummy,aElement); } \
00105       break;                                     \
00106    }
00107 
00108 #define SkipCDouble32(name)                      \
00109    {                                             \
00110       name dummy;                                \
00111       DOLOOP { b.ReadDouble32(&dummy,aElement); }\
00112       break;                                     \
00113    }
00114 
00115 #define SkipCBasicArray(name,ReadArrayFunc)              \
00116     {                                                    \
00117       name* readbuf = new name[fLength[i]];              \
00118       DOLOOP {                                           \
00119           b.ReadArrayFunc(readbuf, fLength[i]);          \
00120       }                                                  \
00121       delete[] readbuf;                                  \
00122       break;                                             \
00123     }
00124 
00125 #define SkipCBasicPointer(name,ReadArrayFunc)                             \
00126    {                                                                      \
00127       Int_t addCounter = -111;                                            \
00128       if ((imethod>0) && (fMethod[i]>0)) addCounter = -1;                 \
00129       if((addCounter<-1) && (aElement!=0) && (aElement->IsA()==TStreamerBasicPointer::Class())) { \
00130          TStreamerElement* elemCounter = (TStreamerElement*) thisVar->GetElements()->FindObject(((TStreamerBasicPointer*)aElement)->GetCountName()); \
00131          if (elemCounter) addCounter = elemCounter->GetTObjectOffset();   \
00132       }                                                                   \
00133       if (addCounter>=-1) {                                               \
00134          int len = aElement->GetArrayDim()?aElement->GetArrayLength():1;  \
00135          Char_t isArray;                                                  \
00136          DOLOOP {                                                         \
00137             b >> isArray;                                                 \
00138             char *arr_k = arr[k];                                         \
00139             Int_t *l = (addCounter==-1 && arr_k) ? (Int_t*)(arr_k+imethod) : &addCounter;  \
00140             if (*l>0) {                                                   \
00141                name* readbuf = new name[*l];                              \
00142                for (int j=0;j<len;j++)                                    \
00143                   b.ReadArrayFunc(readbuf, *l);                           \
00144                delete[] readbuf;                                          \
00145             }                                                             \
00146          }                                                                \
00147       }                                                                   \
00148       break;                                                              \
00149    }
00150 
00151 //______________________________________________________________________________
00152 #ifdef R__BROKEN_FUNCTION_TEMPLATES
00153 // Support for non standard compilers
00154 template <class T>
00155 Int_t TStreamerInfo__ReadBufferSkipImp(TStreamerInfo* thisVar,
00156                                        TBuffer &b, const T &arr, Int_t i, Int_t kase,
00157                                        TStreamerElement *aElement, Int_t narr,
00158                                        Int_t eoffset, ULong_t *fMethod,Int_t *fLength,
00159                                        TStreamerInfo::TCompInfo * fComp,
00160                                        Version_t &fOldVersion)
00161 {
00162    // Skip an element.
00163 #else
00164 template <class T>
00165 Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, const T &arr, Int_t i, Int_t kase,
00166                                     TStreamerElement *aElement, Int_t narr,
00167                                     Int_t eoffset)
00168 {
00169    // Skip an element.
00170    TStreamerInfo* thisVar = this;
00171 #endif
00172    //  Skip elements in a TClonesArray
00173 
00174    TClass* cle = fComp[i].fClass;
00175 
00176    Int_t imethod = fMethod[i]+eoffset;
00177 
00178    switch (kase) {
00179 
00180       // skip basic types
00181       case TStreamerInfo::kSkip + TStreamerInfo::kBool:      SkipCBasicType(Bool_t);
00182       case TStreamerInfo::kSkip + TStreamerInfo::kChar:      SkipCBasicType(Char_t);
00183       case TStreamerInfo::kSkip + TStreamerInfo::kShort:     SkipCBasicType(Short_t);
00184       case TStreamerInfo::kSkip + TStreamerInfo::kInt:       SkipCBasicType(Int_t);
00185       case TStreamerInfo::kSkip + TStreamerInfo::kLong:      SkipCBasicType(Long_t);
00186       case TStreamerInfo::kSkip + TStreamerInfo::kLong64:    SkipCBasicType(Long64_t);
00187       case TStreamerInfo::kSkip + TStreamerInfo::kFloat:     SkipCBasicType(Float_t);
00188       case TStreamerInfo::kSkip + TStreamerInfo::kFloat16:   SkipCFloat16(Float_t);
00189       case TStreamerInfo::kSkip + TStreamerInfo::kDouble:    SkipCBasicType(Double_t);
00190       case TStreamerInfo::kSkip + TStreamerInfo::kDouble32:  SkipCDouble32(Double32_t)
00191       case TStreamerInfo::kSkip + TStreamerInfo::kUChar:     SkipCBasicType(UChar_t);
00192       case TStreamerInfo::kSkip + TStreamerInfo::kUShort:    SkipCBasicType(UShort_t);
00193       case TStreamerInfo::kSkip + TStreamerInfo::kUInt:      SkipCBasicType(UInt_t);
00194       case TStreamerInfo::kSkip + TStreamerInfo::kULong:     SkipCBasicType(ULong_t);
00195       case TStreamerInfo::kSkip + TStreamerInfo::kULong64:   SkipCBasicType(ULong64_t);
00196       case TStreamerInfo::kSkip + TStreamerInfo::kBits:      SkipCBasicType(UInt_t);
00197 
00198          // skip array of basic types  array[8]
00199       case TStreamerInfo::kSkipL + TStreamerInfo::kBool:     SkipCBasicArray(Bool_t,ReadFastArray);
00200       case TStreamerInfo::kSkipL + TStreamerInfo::kChar:     SkipCBasicArray(Char_t,ReadFastArray);
00201       case TStreamerInfo::kSkipL + TStreamerInfo::kShort:    SkipCBasicArray(Short_t,ReadFastArray);
00202       case TStreamerInfo::kSkipL + TStreamerInfo::kInt:      SkipCBasicArray(Int_t,ReadFastArray);
00203       case TStreamerInfo::kSkipL + TStreamerInfo::kLong:     SkipCBasicArray(Long_t,ReadFastArray);
00204       case TStreamerInfo::kSkipL + TStreamerInfo::kLong64:   SkipCBasicArray(Long64_t,ReadFastArray);
00205       case TStreamerInfo::kSkipL + TStreamerInfo::kFloat16:  SkipCBasicArray(Float_t,ReadFastArrayFloat16);
00206       case TStreamerInfo::kSkipL + TStreamerInfo::kFloat:    SkipCBasicArray(Float_t,ReadFastArray);
00207       case TStreamerInfo::kSkipL + TStreamerInfo::kDouble32: SkipCBasicArray(Double_t,ReadFastArrayDouble32)
00208       case TStreamerInfo::kSkipL + TStreamerInfo::kDouble:   SkipCBasicArray(Double_t,ReadFastArray);
00209       case TStreamerInfo::kSkipL + TStreamerInfo::kUChar:    SkipCBasicArray(UChar_t,ReadFastArray);
00210       case TStreamerInfo::kSkipL + TStreamerInfo::kUShort:   SkipCBasicArray(UShort_t,ReadFastArray);
00211       case TStreamerInfo::kSkipL + TStreamerInfo::kUInt:     SkipCBasicArray(UInt_t,ReadFastArray);
00212       case TStreamerInfo::kSkipL + TStreamerInfo::kULong:    SkipCBasicArray(ULong_t,ReadFastArray);
00213       case TStreamerInfo::kSkipL + TStreamerInfo::kULong64:  SkipCBasicArray(ULong64_t,ReadFastArray);
00214 
00215    // skip pointer to an array of basic types  array[n]
00216       case TStreamerInfo::kSkipP + TStreamerInfo::kBool:     SkipCBasicPointer(Bool_t,ReadFastArray);
00217       case TStreamerInfo::kSkipP + TStreamerInfo::kChar:     SkipCBasicPointer(Char_t,ReadFastArray);
00218       case TStreamerInfo::kSkipP + TStreamerInfo::kShort:    SkipCBasicPointer(Short_t,ReadFastArray);
00219       case TStreamerInfo::kSkipP + TStreamerInfo::kInt:      SkipCBasicPointer(Int_t,ReadFastArray);
00220       case TStreamerInfo::kSkipP + TStreamerInfo::kLong:     SkipCBasicPointer(Long_t,ReadFastArray);
00221       case TStreamerInfo::kSkipP + TStreamerInfo::kLong64:   SkipCBasicPointer(Long64_t,ReadFastArray);
00222       case TStreamerInfo::kSkipP + TStreamerInfo::kFloat:    SkipCBasicPointer(Float_t,ReadFastArray);
00223       case TStreamerInfo::kSkipP + TStreamerInfo::kFloat16:  SkipCBasicPointer(Float_t,ReadFastArrayFloat16);
00224       case TStreamerInfo::kSkipP + TStreamerInfo::kDouble:   SkipCBasicPointer(Double_t,ReadFastArray);
00225       case TStreamerInfo::kSkipP + TStreamerInfo::kDouble32: SkipCBasicPointer(Double_t,ReadFastArrayDouble32)
00226       case TStreamerInfo::kSkipP + TStreamerInfo::kUChar:    SkipCBasicPointer(UChar_t,ReadFastArray);
00227       case TStreamerInfo::kSkipP + TStreamerInfo::kUShort:   SkipCBasicPointer(UShort_t,ReadFastArray);
00228       case TStreamerInfo::kSkipP + TStreamerInfo::kUInt:     SkipCBasicPointer(UInt_t,ReadFastArray);
00229       case TStreamerInfo::kSkipP + TStreamerInfo::kULong:    SkipCBasicPointer(ULong_t,ReadFastArray);
00230       case TStreamerInfo::kSkipP + TStreamerInfo::kULong64:  SkipCBasicPointer(ULong64_t,ReadFastArray);
00231 
00232       // skip char*
00233       case TStreamerInfo::kSkip + TStreamerInfo::kCharStar: {
00234          DOLOOP {
00235             Int_t nch; b >> nch;
00236             if (nch>0) {
00237                char* readbuf = new char[nch];
00238                b.ReadFastArray(readbuf,nch);
00239                delete[] readbuf;
00240             }
00241          }
00242          break;
00243       }
00244 
00245       // skip Class*   derived from TObject
00246       case TStreamerInfo::kSkip + TStreamerInfo::kObjectP: {
00247          DOLOOP{
00248             for (Int_t j=0;j<fLength[i];j++) {
00249                b.SkipObjectAny();
00250             }
00251          }
00252          break;
00253       }
00254 
00255       // skip array counter //[n]
00256       case TStreamerInfo::kSkip + TStreamerInfo::kCounter: {
00257          DOLOOP {
00258             Int_t dummy; b >> dummy;
00259             aElement->SetTObjectOffset(dummy);
00260          }
00261          break;
00262       }
00263 
00264       // skip Class *  derived from TObject with comment field  //->
00265       // skip Class    derived from TObject
00266       case TStreamerInfo::kSkip + TStreamerInfo::kObjectp:
00267       case TStreamerInfo::kSkip + TStreamerInfo::kObject:  {
00268          if (cle == TRef::Class()) {
00269             TRef refjunk;
00270             DOLOOP{ refjunk.Streamer(b);}
00271          } else {
00272             DOLOOP{
00273                b.SkipObjectAny();
00274             }
00275          }
00276          break;
00277       }
00278 
00279       // skip Special case for TString, TObject, TNamed
00280       case TStreamerInfo::kSkip + TStreamerInfo::kTString: {
00281          TString s;
00282          DOLOOP {
00283             s.Streamer(b);
00284          }
00285          break;
00286       }
00287       case TStreamerInfo::kSkip + TStreamerInfo::kTObject: {
00288          TObject x;
00289          DOLOOP {
00290             x.Streamer(b);
00291          }
00292          break;
00293       }
00294       case TStreamerInfo::kSkip + TStreamerInfo::kTNamed:  {
00295          TNamed n;
00296          DOLOOP {
00297             n.Streamer(b);
00298          }
00299       break;
00300       }
00301 
00302       // skip Class *  not derived from TObject with comment field  //->
00303       case TStreamerInfo::kSkip + TStreamerInfo::kAnyp: {
00304          DOLOOP {
00305             b.SkipObjectAny();
00306          }
00307          break;
00308       }
00309 
00310       // skip Class*   not derived from TObject
00311       case TStreamerInfo::kSkip + TStreamerInfo::kAnyP: {
00312          DOLOOP {
00313             for (Int_t j=0;j<fLength[i];j++) {
00314                b.SkipObjectAny();
00315             }
00316          }
00317          break;
00318       }
00319 
00320       // skip Any Class not derived from TObject
00321       case TStreamerInfo::kSkip + TStreamerInfo::kAny:    {
00322          DOLOOP {
00323             b.SkipObjectAny();
00324          }
00325          break;
00326       }
00327 
00328       // skip Any Class not derived from TObject
00329       case TStreamerInfo::kSkip + TStreamerInfo::kSTLp:
00330       case TStreamerInfo::kSkip + TStreamerInfo::kSTLp + TStreamerInfo::kOffsetL:
00331       case TStreamerInfo::kSkip + TStreamerInfo::kSTL:     {
00332          if (fOldVersion<3) return 0;
00333          b.SkipObjectAny();
00334          break;
00335       }
00336 
00337       // skip Base Class
00338       case TStreamerInfo::kSkip + TStreamerInfo::kBase:    {
00339          DOLOOP {
00340             b.SkipObjectAny();
00341          }
00342          break;
00343       }
00344 
00345       case TStreamerInfo::kSkip + TStreamerInfo::kStreamLoop:
00346       case TStreamerInfo::kSkip + TStreamerInfo::kStreamer: {
00347          DOLOOP {
00348             b.SkipObjectAny();
00349             }
00350          break;
00351       }
00352       default:
00353          //Error("ReadBufferClones","The element type %d is not supported yet\n",fType[i]);
00354          return -1;
00355    }
00356    return 0;
00357 }
00358 
00359 #define ConvCBasicType(name,stream)                                       \
00360    {                                                                      \
00361       DOLOOP {                                                            \
00362          name u;                                                          \
00363          stream;                                                          \
00364          switch(fNewType[i]) {                                            \
00365             case TStreamerInfo::kBool:    {Bool_t   *x=(Bool_t*)(arr[k]+ioffset);   *x = (Bool_t)u;   break;} \
00366             case TStreamerInfo::kChar:    {Char_t   *x=(Char_t*)(arr[k]+ioffset);   *x = (Char_t)u;   break;} \
00367             case TStreamerInfo::kShort:   {Short_t  *x=(Short_t*)(arr[k]+ioffset);  *x = (Short_t)u;  break;} \
00368             case TStreamerInfo::kInt:     {Int_t    *x=(Int_t*)(arr[k]+ioffset);    *x = (Int_t)u;    break;} \
00369             case TStreamerInfo::kLong:    {Long_t   *x=(Long_t*)(arr[k]+ioffset);   *x = (Long_t)u;   break;} \
00370             case TStreamerInfo::kLong64:  {Long64_t *x=(Long64_t*)(arr[k]+ioffset); *x = (Long64_t)u; break;} \
00371             case TStreamerInfo::kFloat:   {Float_t  *x=(Float_t*)(arr[k]+ioffset);  *x = (Float_t)u;  break;} \
00372             case TStreamerInfo::kFloat16: {Float_t  *x=(Float_t*)(arr[k]+ioffset);  *x = (Float_t)u;  break;} \
00373             case TStreamerInfo::kDouble:  {Double_t *x=(Double_t*)(arr[k]+ioffset); *x = (Double_t)u; break;} \
00374             case TStreamerInfo::kDouble32:{Double_t *x=(Double_t*)(arr[k]+ioffset); *x = (Double_t)u; break;} \
00375             case TStreamerInfo::kUChar:   {UChar_t  *x=(UChar_t*)(arr[k]+ioffset);  *x = (UChar_t)u;  break;} \
00376             case TStreamerInfo::kUShort:  {UShort_t *x=(UShort_t*)(arr[k]+ioffset); *x = (UShort_t)u; break;} \
00377             case TStreamerInfo::kUInt:    {UInt_t   *x=(UInt_t*)(arr[k]+ioffset);   *x = (UInt_t)u;   break;} \
00378             case TStreamerInfo::kULong:   {ULong_t  *x=(ULong_t*)(arr[k]+ioffset);  *x = (ULong_t)u;  break;} \
00379             case TStreamerInfo::kULong64: {ULong64_t*x=(ULong64_t*)(arr[k]+ioffset);*x = (ULong64_t)u;break;} \
00380          }                                                                \
00381       } break;                                                            \
00382    }
00383 
00384 #define ConvCBasicArrayTo(newtype)                                        \
00385    {                                                                      \
00386       newtype *f=(newtype*)(arr[k]+ioffset);                              \
00387       for (j=0;j<len;j++) f[j] = (newtype)readbuf[j];                     \
00388       break;                                                              \
00389    }
00390 
00391 #define ConvCBasicArray(name,ReadArrayFunc)                                             \
00392    {                                                                      \
00393       int j, len = fLength[i];                                            \
00394       name* readbuf = new name[len];                                      \
00395       int newtype = fNewType[i]%20;                                       \
00396       DOLOOP {                                                            \
00397           b.ReadArrayFunc(readbuf, len);                                  \
00398           switch(newtype) {                                               \
00399              case TStreamerInfo::kBool:     ConvCBasicArrayTo(Bool_t);    \
00400              case TStreamerInfo::kChar:     ConvCBasicArrayTo(Char_t);    \
00401              case TStreamerInfo::kShort:    ConvCBasicArrayTo(Short_t);   \
00402              case TStreamerInfo::kInt:      ConvCBasicArrayTo(Int_t);     \
00403              case TStreamerInfo::kLong:     ConvCBasicArrayTo(Long_t);    \
00404              case TStreamerInfo::kLong64:   ConvCBasicArrayTo(Long64_t);  \
00405              case TStreamerInfo::kFloat:    ConvCBasicArrayTo(Float_t);   \
00406              case TStreamerInfo::kFloat16:  ConvCBasicArrayTo(Float_t);   \
00407              case TStreamerInfo::kDouble:   ConvCBasicArrayTo(Double_t);  \
00408              case TStreamerInfo::kDouble32: ConvCBasicArrayTo(Double_t);  \
00409              case TStreamerInfo::kUChar:    ConvCBasicArrayTo(UChar_t);   \
00410              case TStreamerInfo::kUShort:   ConvCBasicArrayTo(UShort_t);  \
00411              case TStreamerInfo::kUInt:     ConvCBasicArrayTo(UInt_t);    \
00412              case TStreamerInfo::kULong:    ConvCBasicArrayTo(ULong_t);   \
00413              case TStreamerInfo::kULong64:  ConvCBasicArrayTo(ULong64_t); \
00414           }                                                               \
00415       }                                                                   \
00416       delete[] readbuf;                                                   \
00417       break;                                                              \
00418    }
00419 
00420 #define ConvCBasicPointerTo(newtype,ReadArrayFunc)                        \
00421    {                                                                      \
00422      newtype **f=(newtype**)(arr[k]+ioffset);                             \
00423      for (j=0;j<len;j++) {                                                \
00424        delete [] f[j];                                                    \
00425        f[j] = 0;                                                          \
00426        if (*l <=0 || *l > b.BufferSize()) continue;                       \
00427        f[j] = new newtype[*l];                                            \
00428        newtype *af = f[j];                                                \
00429        b.ReadArrayFunc(readbuf, *l);                                      \
00430        for (jj=0;jj<*l;jj++) af[jj] = (newtype)readbuf[jj];               \
00431      }                                                                    \
00432      break;                                                               \
00433    }
00434 
00435 #define ConvCBasicPointer(name,ReadArrayFunc)                                           \
00436    {                                                                      \
00437       Char_t isArray;                                                     \
00438       int j, jj, len = aElement->GetArrayDim()?aElement->GetArrayLength():1; \
00439       name* readbuf = 0;                                                  \
00440       int newtype = fNewType[i] %20;                                      \
00441       Int_t imethod = fMethod[i]+eoffset;                                 \
00442       DOLOOP {                                                            \
00443          b >> isArray;                                                    \
00444          Int_t *l = (Int_t*)(arr[k]+imethod);                             \
00445          if (*l>0 && *l < b.BufferSize()) readbuf = new name[*l];         \
00446          switch(newtype) {                                                \
00447             case TStreamerInfo::kBool:     ConvCBasicPointerTo(Bool_t,ReadArrayFunc);   \
00448             case TStreamerInfo::kChar:     ConvCBasicPointerTo(Char_t,ReadArrayFunc);   \
00449             case TStreamerInfo::kShort:    ConvCBasicPointerTo(Short_t,ReadArrayFunc);  \
00450             case TStreamerInfo::kInt:      ConvCBasicPointerTo(Int_t,ReadArrayFunc);    \
00451             case TStreamerInfo::kLong:     ConvCBasicPointerTo(Long_t,ReadArrayFunc);   \
00452             case TStreamerInfo::kLong64:   ConvCBasicPointerTo(Long64_t,ReadArrayFunc); \
00453             case TStreamerInfo::kFloat:    ConvCBasicPointerTo(Float_t,ReadArrayFunc);  \
00454             case TStreamerInfo::kFloat16:  ConvCBasicPointerTo(Float_t,ReadArrayFunc);  \
00455             case TStreamerInfo::kDouble:   ConvCBasicPointerTo(Double_t,ReadArrayFunc); \
00456             case TStreamerInfo::kDouble32: ConvCBasicPointerTo(Double_t,ReadArrayFunc); \
00457             case TStreamerInfo::kUChar:    ConvCBasicPointerTo(UChar_t,ReadArrayFunc);  \
00458             case TStreamerInfo::kUShort:   ConvCBasicPointerTo(UShort_t,ReadArrayFunc); \
00459             case TStreamerInfo::kUInt:     ConvCBasicPointerTo(UInt_t,ReadArrayFunc);   \
00460             case TStreamerInfo::kULong:    ConvCBasicPointerTo(ULong_t,ReadArrayFunc);  \
00461             case TStreamerInfo::kULong64:  ConvCBasicPointerTo(ULong64_t,ReadArrayFunc); \
00462          }                                                                \
00463          delete[] readbuf;                                                \
00464          readbuf = 0;                                                     \
00465       } break;                                                            \
00466    }
00467 
00468 //______________________________________________________________________________
00469 #ifdef R__BROKEN_FUNCTION_TEMPLATES
00470 // Support for non standard compilers
00471 template <class T>
00472 Int_t TStreamerInfo__ReadBufferArtificialImp(TBuffer &b, const T &arr,  Int_t i, Int_t kase,
00473                                              TStreamerElement *aElement, Int_t narr,
00474                                              Int_t eoffset,
00475                                              ULong_t *&fMethod, ULong_t *& /*fElem*/,Int_t *&fLength,
00476                                              TClass *& /*fClass*/, Int_t *&fOffset, Int_t *&fNewType,
00477                                              Int_t & /*fNdata*/, Int_t *& /*fType*/, TStreamerElement *& /*fgElement*/,
00478                                              TStreamerInfo::TCompInfo *& /*fComp*/,
00479                                              Version_t & /* fOldVersion */ )
00480 #else
00481 template <class T>
00482 Int_t TStreamerInfo::ReadBufferArtificial(TBuffer &b, const T &arr,  Int_t /* i */, Int_t /* kase */,
00483                                           TStreamerElement *aElement, Int_t narr,
00484                                           Int_t eoffset)
00485 #endif
00486 {
00487    // Handle Artificial StreamerElement
00488 
00489    TStreamerArtificial *artElement = (TStreamerArtificial*)aElement;
00490    ROOT::TSchemaRule::ReadRawFuncPtr_t rawfunc = artElement->GetReadRawFunc();
00491 
00492    if (rawfunc) {
00493       for(Int_t k=0; k<narr; ++k) {
00494          rawfunc( arr[k], b ); // Intentionally pass the object, so that the member can be set from other members.
00495       }
00496       return 0;
00497    }
00498 
00499    ROOT::TSchemaRule::ReadFuncPtr_t readfunc = artElement->GetReadFunc();
00500    // Process the result
00501    if (readfunc) {
00502       TVirtualObject obj(0);
00503       TVirtualArray *objarr = ((TBufferFile&)b).PeekDataCache();
00504       if (objarr) {
00505          obj.fClass = objarr->fClass;
00506          for(Int_t k=0; k<narr; ++k) {
00507             obj.fObject = objarr->GetObjectAt(k);
00508             readfunc(arr[k]+eoffset, &obj);
00509          }
00510          obj.fObject = 0; // Prevent auto deletion
00511       } else {
00512          for(Int_t k=0; k<narr; ++k) {
00513             readfunc(arr[k]+eoffset, &obj);
00514          }
00515       }
00516       return 0;
00517    }
00518 
00519    return 0;
00520 }
00521 
00522 //______________________________________________________________________________
00523 #ifdef R__BROKEN_FUNCTION_TEMPLATES
00524 // Support for non standard compilers
00525 template <class T>
00526 Int_t TStreamerInfo__ReadBufferConvImp(TBuffer &b, const T &arr,  Int_t i, Int_t kase,
00527                                        TStreamerElement *aElement, Int_t narr,
00528                                        Int_t eoffset,
00529                                        ULong_t *&fMethod, ULong_t *& /*fElem*/,Int_t *&fLength,
00530                                        TClass *& /*fClass*/, Int_t *&fOffset, Int_t *&fNewType,
00531                                        Int_t & /*fNdata*/, Int_t *& /*fType*/, TStreamerElement *& /*fgElement*/,
00532                                        TStreamerInfo::TCompInfo *& /*fComp*/,
00533                                        Version_t & /* fOldVersion */ )
00534 #else
00535 template <class T>
00536 Int_t TStreamerInfo::ReadBufferConv(TBuffer &b, const T &arr,  Int_t i, Int_t kase,
00537                                     TStreamerElement *aElement, Int_t narr,
00538                                     Int_t eoffset)
00539 #endif
00540 {
00541    //  Convert elements of a TClonesArray
00542 
00543    Int_t ioffset = eoffset+fOffset[i];
00544 
00545    switch (kase) {
00546 
00547       // convert basic types
00548       case TStreamerInfo::kConv + TStreamerInfo::kBool:    ConvCBasicType(Bool_t,b >> u);
00549       case TStreamerInfo::kConv + TStreamerInfo::kChar:    ConvCBasicType(Char_t,b >> u);
00550       case TStreamerInfo::kConv + TStreamerInfo::kShort:   ConvCBasicType(Short_t,b >> u);
00551       case TStreamerInfo::kConv + TStreamerInfo::kInt:     ConvCBasicType(Int_t,b >> u);
00552       case TStreamerInfo::kConv + TStreamerInfo::kLong:    if (fNewType[i]==TStreamerInfo::kLong64 || fNewType[i]==TStreamerInfo::kULong64) {
00553                                                               ConvCBasicType(Long64_t,b >> u);
00554                                                            } else {
00555                                                               ConvCBasicType(Long_t,b >> u);
00556                                                            }
00557       case TStreamerInfo::kConv + TStreamerInfo::kLong64:  ConvCBasicType(Long64_t,b >> u);
00558       case TStreamerInfo::kConv + TStreamerInfo::kFloat:   ConvCBasicType(Float_t,b >> u);
00559       case TStreamerInfo::kConv + TStreamerInfo::kFloat16: ConvCBasicType(Float_t,b.ReadFloat16(&u,aElement));
00560       case TStreamerInfo::kConv + TStreamerInfo::kDouble:  ConvCBasicType(Double_t,b >> u);
00561       case TStreamerInfo::kConv + TStreamerInfo::kDouble32:ConvCBasicType(Double_t,b.ReadDouble32(&u,aElement));
00562       case TStreamerInfo::kConv + TStreamerInfo::kUChar:   ConvCBasicType(UChar_t,b >> u);
00563       case TStreamerInfo::kConv + TStreamerInfo::kUShort:  ConvCBasicType(UShort_t,b >> u);
00564       case TStreamerInfo::kConv + TStreamerInfo::kUInt:    ConvCBasicType(UInt_t,b >> u);
00565       case TStreamerInfo::kConv + TStreamerInfo::kULong:   if (fNewType[i]==TStreamerInfo::kLong64 || fNewType[i]==TStreamerInfo::kULong64) {
00566 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00567                                                               ConvCBasicType(Long64_t,b >> u);
00568 #else
00569                                                               ConvCBasicType(ULong64_t,b >> u);         
00570 #endif
00571                                                            } else {
00572                                                               ConvCBasicType(ULong_t,b >> u);
00573                                                            }
00574 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00575       case TStreamerInfo::kConv + TStreamerInfo::kULong64: ConvCBasicType(Long64_t,b >> u)
00576 #else
00577       case TStreamerInfo::kConv + TStreamerInfo::kULong64: ConvCBasicType(ULong64_t,b >> u)
00578 #endif
00579       case TStreamerInfo::kConv + TStreamerInfo::kBits:    ConvCBasicType(UInt_t,b >> u);
00580 
00581          // convert array of basic types  array[8]
00582       case TStreamerInfo::kConvL + TStreamerInfo::kBool:    ConvCBasicArray(Bool_t,ReadFastArray);
00583       case TStreamerInfo::kConvL + TStreamerInfo::kChar:    ConvCBasicArray(Char_t,ReadFastArray);
00584       case TStreamerInfo::kConvL + TStreamerInfo::kShort:   ConvCBasicArray(Short_t,ReadFastArray);
00585       case TStreamerInfo::kConvL + TStreamerInfo::kInt:     ConvCBasicArray(Int_t,ReadFastArray);
00586       case TStreamerInfo::kConvL + TStreamerInfo::kLong:    
00587          if (fNewType[i]==TStreamerInfo::kLong64 || fNewType[i]==TStreamerInfo::kULong64) {
00588             ConvCBasicArray(Long64_t,ReadFastArray);
00589          } else {
00590             ConvCBasicArray(Long_t,ReadFastArray);
00591          }
00592       case TStreamerInfo::kConvL + TStreamerInfo::kLong64:  ConvCBasicArray(Long64_t,ReadFastArray);
00593       case TStreamerInfo::kConvL + TStreamerInfo::kFloat:   ConvCBasicArray(Float_t,ReadFastArray);
00594       case TStreamerInfo::kConvL + TStreamerInfo::kFloat16: ConvCBasicArray(Float_t,ReadFastArrayFloat16);
00595       case TStreamerInfo::kConvL + TStreamerInfo::kDouble:  ConvCBasicArray(Double_t,ReadFastArray);
00596       case TStreamerInfo::kConvL + TStreamerInfo::kDouble32:ConvCBasicArray(Double_t,ReadFastArrayDouble32);
00597       case TStreamerInfo::kConvL + TStreamerInfo::kUChar:   ConvCBasicArray(UChar_t,ReadFastArray);
00598       case TStreamerInfo::kConvL + TStreamerInfo::kUShort:  ConvCBasicArray(UShort_t,ReadFastArray);
00599       case TStreamerInfo::kConvL + TStreamerInfo::kUInt:    ConvCBasicArray(UInt_t,ReadFastArray);
00600       case TStreamerInfo::kConvL + TStreamerInfo::kULong:   
00601          if (fNewType[i]==TStreamerInfo::kLong64 || fNewType[i]==TStreamerInfo::kULong64) {
00602 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00603             ConvCBasicArray(Long64_t,ReadFastArray)
00604 #else
00605             ConvCBasicArray(ULong64_t,ReadFastArray)
00606 #endif
00607          } else {
00608             ConvCBasicArray(ULong_t,ReadFastArray);
00609          }
00610 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00611       case TStreamerInfo::kConvL + TStreamerInfo::kULong64: ConvCBasicArray(Long64_t,ReadFastArray)
00612 #else
00613       case TStreamerInfo::kConvL + TStreamerInfo::kULong64: ConvCBasicArray(ULong64_t,ReadFastArray)
00614 #endif
00615 
00616    // convert pointer to an array of basic types  array[n]
00617       case TStreamerInfo::kConvP + TStreamerInfo::kBool:    ConvCBasicPointer(Bool_t,ReadFastArray);
00618       case TStreamerInfo::kConvP + TStreamerInfo::kChar:    ConvCBasicPointer(Char_t,ReadFastArray);
00619       case TStreamerInfo::kConvP + TStreamerInfo::kShort:   ConvCBasicPointer(Short_t,ReadFastArray);
00620       case TStreamerInfo::kConvP + TStreamerInfo::kInt:     ConvCBasicPointer(Int_t,ReadFastArray);
00621       case TStreamerInfo::kConvP + TStreamerInfo::kLong:    
00622          if (fNewType[i]==TStreamerInfo::kLong64 || fNewType[i]==TStreamerInfo::kULong64) {
00623             ConvCBasicPointer(Long64_t,ReadFastArray);
00624          } else {
00625             ConvCBasicPointer(Long_t,ReadFastArray);
00626          }
00627       case TStreamerInfo::kConvP + TStreamerInfo::kLong64:  ConvCBasicPointer(Long64_t,ReadFastArray);
00628       case TStreamerInfo::kConvP + TStreamerInfo::kFloat:   ConvCBasicPointer(Float_t,ReadFastArray);
00629       case TStreamerInfo::kConvP + TStreamerInfo::kFloat16: ConvCBasicPointer(Float_t,ReadFastArrayFloat16);
00630       case TStreamerInfo::kConvP + TStreamerInfo::kDouble:  ConvCBasicPointer(Double_t,ReadFastArray);
00631       case TStreamerInfo::kConvP + TStreamerInfo::kDouble32:ConvCBasicPointer(Double_t,ReadFastArrayDouble32);
00632       case TStreamerInfo::kConvP + TStreamerInfo::kUChar:   ConvCBasicPointer(UChar_t,ReadFastArray);
00633       case TStreamerInfo::kConvP + TStreamerInfo::kUShort:  ConvCBasicPointer(UShort_t,ReadFastArray);
00634       case TStreamerInfo::kConvP + TStreamerInfo::kUInt:    ConvCBasicPointer(UInt_t,ReadFastArray);
00635       case TStreamerInfo::kConvP + TStreamerInfo::kULong:   
00636          if (fNewType[i]==TStreamerInfo::kLong64 || fNewType[i]==TStreamerInfo::kULong64) {
00637 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00638             ConvCBasicPointer(Long64_t,ReadFastArray)
00639 #else
00640             ConvCBasicPointer(ULong64_t,ReadFastArray)
00641 #endif
00642          } else {
00643             ConvCBasicPointer(ULong_t,ReadFastArray);
00644          }
00645 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
00646       case TStreamerInfo::kConvP + TStreamerInfo::kULong64: ConvCBasicPointer(Long64_t,ReadFastArray)
00647 #else
00648       case TStreamerInfo::kConvP + TStreamerInfo::kULong64: ConvCBasicPointer(ULong64_t,ReadFastArray)
00649 #endif
00650 
00651       default:
00652          // Warning("ReadBufferConv","The element type %d is not supported yet",fType[i]);
00653          return -1;
00654 
00655    }
00656 
00657    return 0;
00658 }
00659 
00660 // Helper function for TStreamerInfo::ReadBuffer
00661 namespace {
00662    template <class T> Bool_t R__TestUseCache(TStreamerElement *element)
00663    {
00664       return element->TestBit(TStreamerElement::kCache);
00665    }
00666 
00667    template <> Bool_t R__TestUseCache<TVirtualArray>(TStreamerElement*)
00668    {
00669       // We are already using the cache, no need to recurse one more time.
00670       return kFALSE;
00671    }
00672 }
00673 
00674 //______________________________________________________________________________
00675 #ifdef R__BROKEN_FUNCTION_TEMPLATES
00676 // Support for non standard compilers
00677 template <class T>
00678 Int_t TStreamerInfo__ReadBufferImp(TStreamerInfo *thisVar,
00679                                    TBuffer &b, const T &arr, Int_t first,
00680                                    Int_t narr, Int_t eoffset, Int_t arrayMode,
00681                                    ULong_t *&fMethod, ULong_t *&fElem, Int_t *&fLength,
00682                                    TClass *&fClass, Int_t *&fOffset, Int_t *& /*fNewType*/,
00683                                    Int_t &fNdata, Int_t *&fType, TStreamerElement *&fgElement,
00684                                    TStreamerInfo::TCompInfo *&fComp,
00685                                    Version_t &fOldVersion)
00686 {
00687    //  Deserialize information from buffer b into object at pointer
00688    //  if (arrayMode & 1) ptr is a pointer to array of pointers to the objects
00689    //  otherwise it is a pointer to a pointer to a single object.
00690    //  This also means that T is of a type such that arr[i] is a pointer to an
00691    //  object.  Currently the only anticipated instantiation are for T==char**
00692    //  and T==TVirtualCollectionProxy
00693 
00694 #else
00695 template <class T>
00696 Int_t TStreamerInfo::ReadBuffer(TBuffer &b, const T &arr, Int_t first,
00697                                 Int_t narr, Int_t eoffset, Int_t arrayMode)
00698 {
00699    //  Deserialize information from buffer b into object at pointer
00700    //  if (arrayMode & 1) ptr is a pointer to array of pointers to the objects
00701    //  otherwise it is a pointer to a pointer to a single object.
00702    //  This also means that T is of a type such that arr[i] is a pointer to an
00703    //  object.  Currently the only anticipated instantiation are for T==char**
00704    //  and T==TVirtualCollectionProxy
00705 
00706    TStreamerInfo *thisVar = this;
00707 #endif
00708    Bool_t needIncrement = !( arrayMode & 2 );
00709    arrayMode = arrayMode & (~2);
00710    
00711    if (needIncrement) b.IncrementLevel(thisVar);
00712 
00713    Int_t last;
00714 
00715    if (!fType) {
00716       char *ptr = (arrayMode&1)? 0:arr[0];
00717       fClass->BuildRealData(ptr);
00718       thisVar->BuildOld();
00719    }
00720 
00721    //loop on all active members
00722 
00723    if (first < 0) {first = 0; last = fNdata;}
00724    else            last = first+1;
00725 
00726    // In order to speed up the case where the object being written is
00727    // not in a collection (i.e. arrayMode is false), we actually
00728    // duplicate the code for the elementary types using this typeOffset.
00729    static const int kHaveLoop = 1024;
00730    const Int_t typeOffset = arrayMode ? kHaveLoop : 0;
00731 
00732    TClass     *cle      = 0;
00733    TClass     *newCle   = 0;
00734    TMemberStreamer *pstreamer=0;
00735    Int_t isPreAlloc = 0;
00736    for (Int_t i=first;i<last;i++) {
00737       if (needIncrement) b.SetStreamerElementNumber(i);
00738       TStreamerElement * aElement  = (TStreamerElement*)fElem[i];
00739       fgElement = aElement;
00740 
00741       if (R__TestUseCache<T>(aElement)) {
00742          Int_t bufpos = b.Length();
00743          if (((TBufferFile&)b).PeekDataCache()==0) {
00744             Warning("ReadBuffer","Skipping %s::%s because the cache is missing.",thisVar->GetName(),aElement->GetName());
00745             thisVar->ReadBufferSkip(b,arr,i,fType[i]+TStreamerInfo::kSkip,aElement,narr,eoffset);
00746          } else {
00747             if (gDebug > 1) {
00748                printf("ReadBuffer, class:%s, name=%s, fType[%d]=%d,"
00749                   " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n",
00750                   fClass->GetName(),aElement->GetName(),i,fType[i],
00751                   aElement->ClassName(),b.Length(),arr[0], eoffset,((TBufferFile&)b).PeekDataCache()->GetObjectAt(0));
00752             }
00753             thisVar->ReadBuffer(b,*((TBufferFile&)b).PeekDataCache(),i,narr,eoffset, arrayMode);
00754          }
00755          if (aElement->TestBit(TStreamerElement::kRepeat)) { b.SetBufferOffset(bufpos); }
00756          continue;
00757       }
00758       const Int_t ioffset = fOffset[i]+eoffset;
00759 
00760       if (gDebug > 1) {
00761          printf("ReadBuffer, class:%s, name=%s, fType[%d]=%d,"
00762                 " %s, bufpos=%d, arr=%p, offset=%d\n",
00763                 fClass->GetName(),aElement->GetName(),i,fType[i],
00764                 aElement->ClassName(),b.Length(),arr[0], ioffset);
00765       }
00766 
00767       Int_t kase = fType[i];
00768 
00769       switch (kase + typeOffset) {
00770 
00771          // read basic types
00772          case TStreamerInfo::kBool:               ReadBasicType(Bool_t);    continue;
00773          case TStreamerInfo::kChar:               ReadBasicType(Char_t);    continue;
00774          case TStreamerInfo::kShort:              ReadBasicType(Short_t);   continue;
00775          case TStreamerInfo::kInt:                ReadBasicType(Int_t);     continue;
00776          case TStreamerInfo::kLong:               ReadBasicType(Long_t);    continue;
00777          case TStreamerInfo::kLong64:             ReadBasicType(Long64_t);  continue;
00778          case TStreamerInfo::kFloat:              ReadBasicType(Float_t);   continue;
00779          case TStreamerInfo::kDouble:             ReadBasicType(Double_t);  continue;
00780          case TStreamerInfo::kUChar:              ReadBasicType(UChar_t);   continue;
00781          case TStreamerInfo::kUShort:             ReadBasicType(UShort_t);  continue;
00782          case TStreamerInfo::kUInt:               ReadBasicType(UInt_t);    continue;
00783          case TStreamerInfo::kULong:              ReadBasicType(ULong_t);   continue;
00784          case TStreamerInfo::kULong64:            ReadBasicType(ULong64_t); continue;
00785          case TStreamerInfo::kFloat16: {
00786             Float_t *x=(Float_t*)(arr[0]+ioffset);
00787             b.ReadFloat16(x,aElement);
00788             continue;
00789          }
00790          case TStreamerInfo::kDouble32: {
00791             Double_t *x=(Double_t*)(arr[0]+ioffset);
00792             b.ReadDouble32(x,aElement);
00793             continue;
00794          }
00795 
00796          case TStreamerInfo::kBool   + kHaveLoop: ReadBasicTypeLoop(Bool_t);    continue;
00797          case TStreamerInfo::kChar   + kHaveLoop: ReadBasicTypeLoop(Char_t);    continue;
00798          case TStreamerInfo::kShort  + kHaveLoop: ReadBasicTypeLoop(Short_t);   continue;
00799          case TStreamerInfo::kInt    + kHaveLoop: ReadBasicTypeLoop(Int_t);     continue;
00800          case TStreamerInfo::kLong   + kHaveLoop: ReadBasicTypeLoop(Long_t);    continue;
00801          case TStreamerInfo::kLong64 + kHaveLoop: ReadBasicTypeLoop(Long64_t);  continue;
00802          case TStreamerInfo::kFloat  + kHaveLoop: ReadBasicTypeLoop(Float_t);   continue;
00803          case TStreamerInfo::kDouble + kHaveLoop: ReadBasicTypeLoop(Double_t);  continue;
00804          case TStreamerInfo::kUChar  + kHaveLoop: ReadBasicTypeLoop(UChar_t);   continue;
00805          case TStreamerInfo::kUShort + kHaveLoop: ReadBasicTypeLoop(UShort_t);  continue;
00806          case TStreamerInfo::kUInt   + kHaveLoop: ReadBasicTypeLoop(UInt_t);    continue;
00807          case TStreamerInfo::kULong  + kHaveLoop: ReadBasicTypeLoop(ULong_t);   continue;
00808          case TStreamerInfo::kULong64+ kHaveLoop: ReadBasicTypeLoop(ULong64_t); continue;
00809          case TStreamerInfo::kFloat16 + kHaveLoop: {
00810             for(Int_t k=0; k<narr; ++k) {
00811                Float_t *x=(Float_t*)(arr[k]+ioffset);
00812                b.ReadFloat16(x,aElement);
00813             }
00814             continue;
00815          }
00816          case TStreamerInfo::kDouble32 + kHaveLoop: {
00817             for(Int_t k=0; k<narr; ++k) {
00818                Double_t *x=(Double_t*)(arr[k]+ioffset);
00819                b.ReadDouble32(x,aElement);
00820             }
00821             continue;
00822          }
00823 
00824          // read array of basic types  like array[8]
00825          case TStreamerInfo::kOffsetL + TStreamerInfo::kBool:   ReadBasicArray(Bool_t);    continue;
00826          case TStreamerInfo::kOffsetL + TStreamerInfo::kChar:   ReadBasicArray(Char_t);    continue;
00827          case TStreamerInfo::kOffsetL + TStreamerInfo::kShort:  ReadBasicArray(Short_t);   continue;
00828          case TStreamerInfo::kOffsetL + TStreamerInfo::kInt:    ReadBasicArray(Int_t);     continue;
00829          case TStreamerInfo::kOffsetL + TStreamerInfo::kLong:   ReadBasicArray(Long_t);    continue;
00830          case TStreamerInfo::kOffsetL + TStreamerInfo::kLong64: ReadBasicArray(Long64_t);  continue;
00831          case TStreamerInfo::kOffsetL + TStreamerInfo::kFloat:  ReadBasicArray(Float_t);   continue;
00832          case TStreamerInfo::kOffsetL + TStreamerInfo::kDouble: ReadBasicArray(Double_t);  continue;
00833          case TStreamerInfo::kOffsetL + TStreamerInfo::kUChar:  ReadBasicArray(UChar_t);   continue;
00834          case TStreamerInfo::kOffsetL + TStreamerInfo::kUShort: ReadBasicArray(UShort_t);  continue;
00835          case TStreamerInfo::kOffsetL + TStreamerInfo::kUInt:   ReadBasicArray(UInt_t);    continue;
00836          case TStreamerInfo::kOffsetL + TStreamerInfo::kULong:  ReadBasicArray(ULong_t);   continue;
00837          case TStreamerInfo::kOffsetL + TStreamerInfo::kULong64:ReadBasicArray(ULong64_t); continue;
00838          case TStreamerInfo::kOffsetL + TStreamerInfo::kFloat16: {
00839             b.ReadFastArrayFloat16((Float_t*)(arr[0]+ioffset),fLength[i],aElement);
00840             continue;
00841          }
00842          case TStreamerInfo::kOffsetL + TStreamerInfo::kDouble32: {
00843             b.ReadFastArrayDouble32((Double_t*)(arr[0]+ioffset),fLength[i],aElement);
00844             continue;
00845          }
00846 
00847          case TStreamerInfo::kOffsetL + TStreamerInfo::kBool    + kHaveLoop: ReadBasicArrayLoop(Bool_t);    continue;
00848          case TStreamerInfo::kOffsetL + TStreamerInfo::kChar    + kHaveLoop: ReadBasicArrayLoop(Char_t);    continue;
00849          case TStreamerInfo::kOffsetL + TStreamerInfo::kShort   + kHaveLoop: ReadBasicArrayLoop(Short_t);   continue;
00850          case TStreamerInfo::kOffsetL + TStreamerInfo::kInt     + kHaveLoop: ReadBasicArrayLoop(Int_t);     continue;
00851          case TStreamerInfo::kOffsetL + TStreamerInfo::kLong    + kHaveLoop: ReadBasicArrayLoop(Long_t);    continue;
00852          case TStreamerInfo::kOffsetL + TStreamerInfo::kLong64  + kHaveLoop: ReadBasicArrayLoop(Long64_t);  continue;
00853          case TStreamerInfo::kOffsetL + TStreamerInfo::kFloat   + kHaveLoop: ReadBasicArrayLoop(Float_t);   continue;
00854          case TStreamerInfo::kOffsetL + TStreamerInfo::kDouble  + kHaveLoop: ReadBasicArrayLoop(Double_t);  continue;
00855          case TStreamerInfo::kOffsetL + TStreamerInfo::kUChar   + kHaveLoop: ReadBasicArrayLoop(UChar_t);   continue;
00856          case TStreamerInfo::kOffsetL + TStreamerInfo::kUShort  + kHaveLoop: ReadBasicArrayLoop(UShort_t);  continue;
00857          case TStreamerInfo::kOffsetL + TStreamerInfo::kUInt    + kHaveLoop: ReadBasicArrayLoop(UInt_t);    continue;
00858          case TStreamerInfo::kOffsetL + TStreamerInfo::kULong   + kHaveLoop: ReadBasicArrayLoop(ULong_t);   continue;
00859          case TStreamerInfo::kOffsetL + TStreamerInfo::kULong64 + kHaveLoop: ReadBasicArrayLoop(ULong64_t); continue;
00860          case TStreamerInfo::kOffsetL + TStreamerInfo::kFloat16 + kHaveLoop: {
00861             for(Int_t k=0; k<narr; ++k) {
00862                b.ReadFastArrayFloat16((Float_t*)(arr[k]+ioffset),fLength[i],aElement);
00863             }
00864             continue;
00865          }
00866          case TStreamerInfo::kOffsetL + TStreamerInfo::kDouble32+ kHaveLoop: {
00867             for(Int_t k=0; k<narr; ++k) {
00868                b.ReadFastArrayDouble32((Double_t*)(arr[k]+ioffset),fLength[i],aElement);
00869             }
00870             continue;
00871          }
00872 
00873          // read pointer to an array of basic types  array[n]
00874          case TStreamerInfo::kOffsetP + TStreamerInfo::kBool:   ReadBasicPointer(Bool_t);  continue;
00875          case TStreamerInfo::kOffsetP + TStreamerInfo::kChar:   ReadBasicPointer(Char_t);  continue;
00876          case TStreamerInfo::kOffsetP + TStreamerInfo::kShort:  ReadBasicPointer(Short_t);  continue;
00877          case TStreamerInfo::kOffsetP + TStreamerInfo::kInt:    ReadBasicPointer(Int_t);  continue;
00878          case TStreamerInfo::kOffsetP + TStreamerInfo::kLong:   ReadBasicPointer(Long_t);  continue;
00879          case TStreamerInfo::kOffsetP + TStreamerInfo::kLong64: ReadBasicPointer(Long64_t);  continue;
00880          case TStreamerInfo::kOffsetP + TStreamerInfo::kFloat:  ReadBasicPointer(Float_t);  continue;
00881          case TStreamerInfo::kOffsetP + TStreamerInfo::kDouble: ReadBasicPointer(Double_t);  continue;
00882          case TStreamerInfo::kOffsetP + TStreamerInfo::kUChar:  ReadBasicPointer(UChar_t);  continue;
00883          case TStreamerInfo::kOffsetP + TStreamerInfo::kUShort: ReadBasicPointer(UShort_t);  continue;
00884          case TStreamerInfo::kOffsetP + TStreamerInfo::kUInt:   ReadBasicPointer(UInt_t);  continue;
00885          case TStreamerInfo::kOffsetP + TStreamerInfo::kULong:  ReadBasicPointer(ULong_t);  continue;
00886          case TStreamerInfo::kOffsetP + TStreamerInfo::kULong64:ReadBasicPointer(ULong64_t);  continue;
00887          case TStreamerInfo::kOffsetP + TStreamerInfo::kFloat16: {
00888             Char_t isArray;
00889             b >> isArray;
00890             const int imethod = fMethod[i]+eoffset;
00891             Int_t *l = (Int_t*)(arr[0]+imethod);
00892             Float_t **f = (Float_t**)(arr[0]+ioffset);
00893             int j;
00894             for(j=0;j<fLength[i];j++) {
00895                delete [] f[j];
00896                f[j] = 0; if (*l <=0) continue;
00897                f[j] = new Float_t[*l];
00898                b.ReadFastArrayFloat16(f[j],*l,aElement);
00899             }
00900             continue;
00901          }
00902          case TStreamerInfo::kOffsetP + TStreamerInfo::kDouble32: {
00903             Char_t isArray;
00904             b >> isArray;
00905             const int imethod = fMethod[i]+eoffset;
00906             Int_t *l = (Int_t*)(arr[0]+imethod);
00907             Double_t **f = (Double_t**)(arr[0]+ioffset);
00908             int j;
00909             for(j=0;j<fLength[i];j++) {
00910                delete [] f[j];
00911                f[j] = 0; if (*l <=0) continue;
00912                f[j] = new Double_t[*l];
00913                b.ReadFastArrayDouble32(f[j],*l,aElement);
00914             }
00915             continue;
00916          }
00917 
00918          case TStreamerInfo::kOffsetP + TStreamerInfo::kBool    + kHaveLoop: ReadBasicPointerLoop(Bool_t);    continue;
00919          case TStreamerInfo::kOffsetP + TStreamerInfo::kChar    + kHaveLoop: ReadBasicPointerLoop(Char_t);    continue;
00920          case TStreamerInfo::kOffsetP + TStreamerInfo::kShort   + kHaveLoop: ReadBasicPointerLoop(Short_t);   continue;
00921          case TStreamerInfo::kOffsetP + TStreamerInfo::kInt     + kHaveLoop: ReadBasicPointerLoop(Int_t);     continue;
00922          case TStreamerInfo::kOffsetP + TStreamerInfo::kLong    + kHaveLoop: ReadBasicPointerLoop(Long_t);    continue;
00923          case TStreamerInfo::kOffsetP + TStreamerInfo::kLong64  + kHaveLoop: ReadBasicPointerLoop(Long64_t);  continue;
00924          case TStreamerInfo::kOffsetP + TStreamerInfo::kFloat   + kHaveLoop: ReadBasicPointerLoop(Float_t);   continue;
00925          case TStreamerInfo::kOffsetP + TStreamerInfo::kDouble  + kHaveLoop: ReadBasicPointerLoop(Double_t);  continue;
00926          case TStreamerInfo::kOffsetP + TStreamerInfo::kUChar   + kHaveLoop: ReadBasicPointerLoop(UChar_t);   continue;
00927          case TStreamerInfo::kOffsetP + TStreamerInfo::kUShort  + kHaveLoop: ReadBasicPointerLoop(UShort_t);  continue;
00928          case TStreamerInfo::kOffsetP + TStreamerInfo::kUInt    + kHaveLoop: ReadBasicPointerLoop(UInt_t);    continue;
00929          case TStreamerInfo::kOffsetP + TStreamerInfo::kULong   + kHaveLoop: ReadBasicPointerLoop(ULong_t);   continue;
00930          case TStreamerInfo::kOffsetP + TStreamerInfo::kULong64 + kHaveLoop: ReadBasicPointerLoop(ULong64_t); continue;
00931          case TStreamerInfo::kOffsetP + TStreamerInfo::kFloat16 + kHaveLoop: {
00932             const int imethod = fMethod[i]+eoffset;
00933             for(Int_t k=0; k<narr; ++k) {
00934                Char_t isArray;
00935                b >> isArray;
00936                Int_t *l = (Int_t*)(arr[k]+imethod);
00937                Float_t **f = (Float_t**)(arr[k]+ioffset);
00938                int j;
00939                for(j=0;j<fLength[i];j++) {
00940                   delete [] f[j];
00941                   f[j] = 0; if (*l <=0) continue;
00942                   f[j] = new Float_t[*l];
00943                   b.ReadFastArrayFloat16(f[j],*l,aElement);
00944                }
00945             }
00946             continue;
00947          }
00948          case TStreamerInfo::kOffsetP + TStreamerInfo::kDouble32+ kHaveLoop: {
00949             const int imethod = fMethod[i]+eoffset;
00950             for(Int_t k=0; k<narr; ++k) {
00951                Char_t isArray;
00952                b >> isArray;
00953                Int_t *l = (Int_t*)(arr[k]+imethod);
00954                Double_t **f = (Double_t**)(arr[k]+ioffset);
00955                int j;
00956                for(j=0;j<fLength[i];j++) {
00957                   delete [] f[j];
00958                   f[j] = 0; if (*l <=0) continue;
00959                   f[j] = new Double_t[*l];
00960                   b.ReadFastArrayDouble32(f[j],*l,aElement);
00961                }
00962             }
00963             continue;
00964          }
00965       }
00966 
00967       switch (kase) {
00968 
00969          // char*
00970          case TStreamerInfo::kCharStar: {
00971             DOLOOP {
00972                Int_t nch; b >> nch;
00973                char **f = (char**)(arr[k]+ioffset);
00974                delete [] *f;
00975                *f = 0; if (nch <=0) continue;
00976                *f = new char[nch+1];
00977                b.ReadFastArray(*f,nch); (*f)[nch] = 0;
00978             }
00979          }
00980          continue;
00981 
00982          // special case for TObject::fBits in case of a referenced object
00983          case TStreamerInfo::kBits: {
00984             DOLOOP {
00985                UInt_t *x=(UInt_t*)(arr[k]+ioffset); b >> *x;
00986                if ((*x & kIsReferenced) != 0) {
00987                   UShort_t pidf;
00988                   b >> pidf;
00989                   pidf += b.GetPidOffset();
00990                   TProcessID *pid = b.ReadProcessID(pidf);
00991                   if (pid!=0) {
00992                      TObject *obj = (TObject*)(arr[k]+eoffset);
00993                      UInt_t gpid = pid->GetUniqueID();
00994                      UInt_t uid;
00995                      if (gpid>=0xff) {
00996                         uid = obj->GetUniqueID() | 0xff000000;
00997                      } else {
00998                         uid = ( obj->GetUniqueID() & 0xffffff) + (gpid<<24);
00999                      }
01000                      obj->SetUniqueID(uid);
01001                      pid->PutObjectWithID(obj);
01002                   }
01003                }
01004             }
01005          }
01006          continue;
01007 
01008          // array counter //[n]
01009          case TStreamerInfo::kCounter: {
01010             DOLOOP {
01011                Int_t *x=(Int_t*)(arr[k]+ioffset);
01012                b >> *x;
01013             }
01014          }
01015          continue;
01016 
01017 
01018          // Special case for TString, TObject, TNamed
01019          case TStreamerInfo::kTString: { DOLOOP { ((TString*)(arr[k]+ioffset))->Streamer(b);         } } continue;
01020          case TStreamerInfo::kTObject: { DOLOOP { ((TObject*)(arr[k]+ioffset))->TObject::Streamer(b);} } continue;
01021          case TStreamerInfo::kTNamed:  { DOLOOP { ((TNamed*) (arr[k]+ioffset))->TNamed::Streamer(b) ;} } continue;
01022 
01023       }
01024 
01025    SWIT:
01026       isPreAlloc= 0;
01027       cle       = fComp[i].fClass;
01028       newCle    = fComp[i].fNewClass;
01029       pstreamer = fComp[i].fStreamer;
01030 
01031       switch (kase) {
01032 
01033          case TStreamerInfo::kAnyp:    // Class*  not derived from TObject with    comment field //->
01034          case TStreamerInfo::kAnyp+TStreamerInfo::kOffsetL:
01035          case TStreamerInfo::kObjectp: // Class*      derived from TObject with    comment field  //->
01036          case TStreamerInfo::kObjectp+TStreamerInfo::kOffsetL:
01037             isPreAlloc = 1;
01038             // Intentional fallthrough now that isPreAlloc is set.
01039          case TStreamerInfo::kObjectP: // Class* derived from TObject with no comment field NOTE: Re-added by Phil
01040          case TStreamerInfo::kObjectP+TStreamerInfo::kOffsetL:
01041          case TStreamerInfo::kAnyP:    // Class*  not derived from TObject with no comment field NOTE:: Re-added by Phil
01042          case TStreamerInfo::kAnyP+TStreamerInfo::kOffsetL: {
01043             DOLOOP {
01044                b.ReadFastArray((void**)(arr[k]+ioffset),cle,fLength[i],isPreAlloc,pstreamer);
01045             }
01046          }
01047          continue;
01048 
01049 //        case TStreamerInfo::kSTLvarp:           // Variable size array of STL containers.
01050 //             {
01051 //                TMemberStreamer *pstreamer = fComp[i].fStreamer;
01052 //                TClass *cl                 = fComp[i].fClass;
01053 //                ROOT::NewArrFunc_t arraynew = cl->GetNewArray();
01054 //                ROOT::DelArrFunc_t arraydel = cl->GetDeleteArray();
01055 //                UInt_t start,count;
01056 //                // Version_t v =
01057 //                b.ReadVersion(&start, &count, cle);
01058 //                if (pstreamer == 0) {
01059 //                   Int_t size = cl->Size();
01060 //                   Int_t imethod = fMethod[i]+eoffset;
01061 //                   DOLOOP {
01062 //                      char **contp = (char**)(arr[k]+ioffset);
01063 //                      const Int_t *counter = (Int_t*)(arr[k]+imethod);
01064 //                      const Int_t sublen = (*counter);
01065 
01066 //                      for(int j=0;j<fLength[i];++j) {
01067 //                         if (arraydel) arraydel(contp[j]);
01068 //                         contp[j] = 0;
01069 //                         if (sublen<=0) continue;
01070 //                         if (arraynew) {
01071 //                            contp[j] = (char*)arraynew(sublen, 0);
01072 //                            char *cont = contp[j];
01073 //                            for(int k=0;k<sublen;++k) {
01074 //                               cl->Streamer( cont, b );
01075 //                               cont += size;
01076 //                            }
01077 //                         } else {
01078 //                            // Can't create an array of object
01079 //                            Error("ReadBuffer","The element %s::%s type %d (%s) can be read because of the class does not have access to new %s[..]\n",
01080 //                                  GetName(),aElement->GetFullName(),kase,aElement->GetTypeName(),GetName());
01081 //                            void *cont = cl->New();
01082 //                            for(int k=0;k<sublen;++k) {
01083 //                               cl->Streamer( cont, b );
01084 //                            }
01085 //                         }
01086 //                      }
01087 //                   }
01088 //                } else {
01089 //                   DOLOOP{(*pstreamer)(b,arr[k]+ioffset,fLength[i]);}
01090 //                }
01091 //                b.CheckByteCount(start,count,aElement->GetFullName());
01092 //             }
01093 //             continue;
01094 
01095          case TStreamerInfo::kSTLp:            // Pointer to Container with no virtual table (stl) and no comment
01096          case TStreamerInfo::kSTLp + TStreamerInfo::kOffsetL: // array of pointers to Container with no virtual table (stl) and no comment
01097             {
01098                UInt_t start,count;
01099                Version_t vers = b.ReadVersion(&start, &count, cle);
01100 
01101                if ( vers & TBufferFile::kStreamedMemberWise ) {
01102                   // Collection was saved member-wise
01103 
01104                   vers &= ~( TBufferFile::kStreamedMemberWise );
01105                   
01106                   TClass *newClass = aElement->GetNewClass();
01107                   TClass *oldClass = aElement->GetClassPointer();
01108                   if( vers < 9 && newClass && newClass!=oldClass ) {
01109                      Error( "ReadBuffer", "Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
01110                            vers, b.GetParent() ? b.GetParent()->GetName() : "memory/socket", oldClass->GetName(), newClass->GetName() );
01111                      continue;
01112                   }
01113 
01114                   UInt_t startDummy, countDummy;
01115                   Version_t vClVersion = 0; // For vers less than 9, we have to use the current version.
01116                   if( vers >= 9 ) {
01117                      vClVersion = b.ReadVersion( &startDummy, &countDummy, cle->GetCollectionProxy()->GetValueClass() );
01118                   }
01119 
01120                   TVirtualCollectionProxy *newProxy = (newClass ? newClass->GetCollectionProxy() : 0);
01121                   TVirtualCollectionProxy *oldProxy = oldClass->GetCollectionProxy();
01122                   TStreamerInfo *subinfo = 0;
01123                   
01124                   if( newProxy ) {
01125                      // coverity[dererence] oldProxy->GetValueClass() can not be null since this was streamed memberwise.
01126                      subinfo = (TStreamerInfo*)newProxy->GetValueClass()->GetConversionStreamerInfo( oldProxy->GetValueClass(), vClVersion );
01127                   } else {
01128                      subinfo = (TStreamerInfo*)oldProxy->GetValueClass()->GetStreamerInfo( vClVersion );
01129                      newProxy = oldProxy;
01130                   }
01131                   if (subinfo->IsOptimized()) {
01132                      subinfo->SetBit(TVirtualStreamerInfo::kCannotOptimize);
01133                      subinfo->Compile();
01134                   }
01135                   DOLOOP {
01136                      void* env;
01137                      void **contp = (void**)(arr[k]+ioffset);
01138                      int j;
01139                      for(j=0;j<fLength[i];j++) {
01140                         void *cont = contp[j];
01141                         if (cont==0) {
01142                            contp[j] = cle->New();
01143                            cont = contp[j];
01144                         }
01145                         TVirtualCollectionProxy::TPushPop helper( newProxy, cont );
01146                         Int_t nobjects;
01147                         b >> nobjects;
01148                         env = newProxy->Allocate(nobjects,true);
01149                         if (vers<7) {
01150                            subinfo->ReadBuffer(b,*newProxy,-1,nobjects,0,1);
01151                         } else {
01152                            subinfo->ReadBufferSTL(b,newProxy,nobjects,-1,0);
01153                         }
01154                         newProxy->Commit(env);
01155                      }
01156                   }
01157                   b.CheckByteCount(start,count,aElement->GetFullName());
01158                   continue;
01159                }
01160                if (pstreamer == 0) {
01161                   DOLOOP {
01162                      void **contp = (void**)(arr[k]+ioffset);
01163                      int j;
01164                      for(j=0;j<fLength[i];j++) {
01165                         void *cont = contp[j];
01166                         if (cont==0) {
01167                            // int R__n;
01168                            // b >> R__n;
01169                            // b.SetOffset(b.GetOffset()-4); // rewind to the start of the int
01170                            // if (R__n) continue;
01171                            contp[j] = cle->New();
01172                            cont = contp[j];
01173                         }
01174                         cle->Streamer( cont, b );
01175                      }
01176                   }
01177                } else {
01178                   DOLOOP {(*pstreamer)(b,arr[k]+ioffset,fLength[i]);}
01179                }
01180                b.CheckByteCount(start,count,aElement->GetFullName());
01181             }
01182             continue;
01183 
01184          case TStreamerInfo::kSTL:                // Container with no virtual table (stl) and no comment
01185          case TStreamerInfo::kSTL + TStreamerInfo::kOffsetL:     // array of Container with no virtual table (stl) and no comment
01186             {
01187                UInt_t start, count;
01188                Version_t vers = b.ReadVersion(&start, &count, cle);
01189 
01190                if ( vers & TBufferFile::kStreamedMemberWise ) {
01191                   // Collection was saved member-wise
01192                   vers &= ~( TBufferFile::kStreamedMemberWise );
01193 
01194                   TClass *newClass = aElement->GetNewClass();
01195                   TClass *oldClass = aElement->GetClassPointer();
01196 
01197                   if( vers < 8 && newClass && newClass!=oldClass ) {
01198                      Error( "ReadBuffer", "Unfortunately, version %d of TStreamerInfo (used in %s) did not record enough information to convert a %s into a %s.",
01199                            vers, b.GetParent() ? b.GetParent()->GetName() : "memory/socket", oldClass->GetName(), newClass->GetName() );
01200                      continue;
01201                   }
01202                   TVirtualCollectionProxy *oldProxy = oldClass->GetCollectionProxy();
01203                   TClass *valueClass = oldClass->GetCollectionProxy()->GetValueClass();
01204                   UInt_t startDummy, countDummy;
01205                   Version_t vClVersion = 0; // For vers less than 8, we have to use the current version.
01206                   if( vers >= 8 ) {
01207                      vClVersion = b.ReadVersion( &startDummy, &countDummy, valueClass );
01208                   }
01209 
01210                   if (valueClass == 0) {
01211                      // MemberWise streaming applies to only collection of classes, and hence
01212                      // valueClass can only be null if we are reading without the original library
01213                      // and the collection is always empty,
01214                      // So let's skip the rest (which requires the StreamerInfo of the valueClass ... which we do not have)
01215 
01216                      b.SetBufferOffset(start+count+sizeof(UInt_t));
01217                      continue;
01218                   }
01219 
01220                   TVirtualCollectionProxy *newProxy = (newClass ? newClass->GetCollectionProxy() : 0);
01221                   TStreamerInfo *subinfo = 0;
01222 
01223                   if( newProxy ) {
01224                      // coverity[dererence] oldProxy->GetValueClass() can not be null since this was streamed memberwise.
01225                      subinfo = (TStreamerInfo*)newProxy->GetValueClass()->GetConversionStreamerInfo( oldProxy->GetValueClass(), vClVersion );
01226                   } else {
01227                      subinfo = (TStreamerInfo*)valueClass->GetStreamerInfo( vClVersion );
01228                      newProxy = oldProxy;
01229                   }
01230                   if (subinfo->IsOptimized()) {
01231                      subinfo->SetBit(TVirtualStreamerInfo::kCannotOptimize);
01232                      subinfo->Compile();
01233                   }
01234 
01235                   DOLOOP {
01236                      int objectSize = cle->Size();
01237                      char *obj = arr[k]+ioffset;
01238                      char *end = obj + fLength[i]*objectSize;
01239 
01240                      for(; obj<end; obj+=objectSize) {
01241                         TVirtualCollectionProxy::TPushPop helper( newProxy, obj );
01242                         Int_t nobjects;
01243                         b >> nobjects;
01244                         void* env = newProxy->Allocate(nobjects,true);
01245                         if (vers<7) {
01246                            subinfo->ReadBuffer(b,*newProxy,-1,nobjects,0,1);
01247                         } else {
01248                            subinfo->ReadBufferSTL(b,newProxy,nobjects,-1,0);
01249                         }
01250                         newProxy->Commit(env);
01251                      }
01252                   }
01253                   b.CheckByteCount(start,count,aElement->GetTypeName());
01254                   continue;
01255                }
01256                if (fOldVersion<3){   // case of old TStreamerInfo
01257                   //  Backward compatibility. Some TStreamerElement's where without
01258                   //  Streamer but were not removed from element list
01259                   if (aElement->IsBase() && aElement->IsA()!=TStreamerBase::Class()) {
01260                      b.SetBufferOffset(start);  //there is no byte count
01261                   } else if (vers==0) {
01262                      b.SetBufferOffset(start);  //there is no byte count
01263                   }
01264                }
01265                if (pstreamer == 0) {
01266                   if( !newCle ) {
01267                      newCle = cle;
01268                      cle = 0;
01269                   }
01270                   DOLOOP {
01271                      b.ReadFastArray((void*)(arr[k]+ioffset),newCle,fLength[i],(TMemberStreamer*)0, cle );
01272                   }
01273                } else {
01274                   DOLOOP {(*pstreamer)(b,arr[k]+ioffset,fLength[i]);}
01275                }
01276                b.CheckByteCount(start,count,aElement->GetTypeName());
01277             }
01278             continue;
01279 
01280          case TStreamerInfo::kObject: // Class derived from TObject
01281             if (cle->IsStartingWithTObject() && cle->GetClassInfo()) {
01282                DOLOOP {((TObject*)(arr[k]+ioffset))->Streamer(b);}
01283                continue; // intentionally inside the if statement.
01284                       // if the class does not start with its TObject part (or does
01285                       // not have one), we use the generic case.
01286             }
01287          case TStreamerInfo::kAny:    // Class not derived from TObject
01288             if (pstreamer) {
01289                DOLOOP {(*pstreamer)(b,arr[k]+ioffset,0);}
01290             } else {
01291                if( newCle )
01292                   DOLOOP { newCle->Streamer( arr[k]+ioffset, b, cle ); }
01293                else
01294                   DOLOOP { cle->Streamer(arr[k]+ioffset,b);}
01295             }
01296             continue;
01297 
01298          case TStreamerInfo::kObject+TStreamerInfo::kOffsetL:  {
01299             TFile *file = (TFile*)b.GetParent();
01300             if (file && file->GetVersion() < 30208) {
01301                // For older ROOT file we use a totally different case to treat
01302                // this situation, so we change 'kase' and restart.
01303                kase = TStreamerInfo::kStreamer;
01304                goto SWIT;
01305             }
01306             // there is intentionally no break/continue statement here.
01307             // For newer ROOT file, we always use the generic case for kOffsetL(s)
01308          }
01309 
01310          case TStreamerInfo::kAny+TStreamerInfo::kOffsetL: {
01311             DOLOOP {
01312                b.ReadFastArray((void*)(arr[k]+ioffset),cle,fLength[i],pstreamer);
01313             }
01314             continue;
01315          }
01316 
01317          // Base Class
01318          case TStreamerInfo::kBase:
01319             if (!(arrayMode&1)) {
01320                if(pstreamer)  {kase = TStreamerInfo::kStreamer; goto SWIT;}
01321                DOLOOP { ((TStreamerBase*)aElement)->ReadBuffer(b,arr[k]);}
01322             } else {
01323                // FIXME: what is that?
01324                Int_t clversion = ((TStreamerBase*)aElement)->GetBaseVersion();
01325                TStreamerInfo *binfo = ((TStreamerInfo*)cle->GetStreamerInfo(clversion));
01326                if (!binfo->TestBit(kCannotOptimize) && binfo->IsCompiled()) { 
01327                   binfo->SetBit(kCannotOptimize);
01328                   binfo->Compile();
01329                }
01330                binfo->ReadBuffer(b,arr,-1,narr,ioffset,arrayMode);
01331             }
01332             continue;
01333 
01334          case TStreamerInfo::kOffsetL + TStreamerInfo::kTString:
01335          case TStreamerInfo::kOffsetL + TStreamerInfo::kTObject:
01336          case TStreamerInfo::kOffsetL + TStreamerInfo::kTNamed:
01337          {
01338             //  Backward compatibility. Some TStreamerElement's where without
01339             //  Streamer but were not removed from element list
01340             UInt_t start,count;
01341             Version_t v = b.ReadVersion(&start, &count, cle);
01342             if (fOldVersion<3){   // case of old TStreamerInfo
01343                if (count<= 0    || v   !=  fOldVersion) {
01344                   b.SetBufferOffset(start);
01345                   continue;
01346                }
01347             }
01348             DOLOOP {
01349                b.ReadFastArray((void*)(arr[k]+ioffset),cle,fLength[i],pstreamer);
01350             }
01351             b.CheckByteCount(start,count,aElement->GetFullName());
01352             continue;
01353          }
01354 
01355 
01356          case TStreamerInfo::kStreamer:{
01357             //  Backward compatibility. Some TStreamerElement's where without
01358             //  Streamer but were not removed from element list
01359             UInt_t start,count;
01360             Version_t v = b.ReadVersion(&start, &count, cle);
01361             if (fOldVersion<3){   // case of old TStreamerInfo
01362                if (aElement->IsBase() && aElement->IsA()!=TStreamerBase::Class()) {
01363                   b.SetBufferOffset(start);  //it was no byte count
01364                } else if (kase == TStreamerInfo::kSTL || kase == TStreamerInfo::kSTL+TStreamerInfo::kOffsetL ||
01365                           count<= 0    || v   !=  fOldVersion) {
01366                   b.SetBufferOffset(start);
01367                   continue;
01368                }
01369             }
01370             if (pstreamer == 0) {
01371                Error("ReadBuffer","Streamer for %s is null\n",aElement->GetName());
01372                if (gDebug > 0) {
01373                   aElement->ls(); continue;
01374                }
01375             } else {
01376                DOLOOP {(*pstreamer)(b,arr[k]+ioffset,fLength[i]);}
01377             }
01378             b.CheckByteCount(start,count,aElement->GetFullName());
01379          }
01380          continue;
01381 
01382          case TStreamerInfo::kStreamLoop:
01383             // -- A pointer to a varying-length array of objects.
01384             // MyClass* ary; //[n]
01385             // -- Or a pointer to a varying-length array of pointers to objects.
01386             // MyClass** ary; //[n]
01387          case TStreamerInfo::kStreamLoop + TStreamerInfo::kOffsetL:
01388             // -- An array of pointers to a varying-length array of objects.
01389             // MyClass* ary[d]; //[n]
01390             // -- Or an array of pointers to a varying-length array of pointers to objects.
01391             // MyClass** ary[d]; //[n]
01392          {
01393             // Get the class of the data member.
01394             TClass* cl = fComp[i].fClass;
01395             // Which are we, an array of objects or an array of pointers to objects?
01396             Bool_t isPtrPtr = (strstr(aElement->GetTypeName(), "**") != 0);
01397             // Check for a private streamer.
01398             if (pstreamer) {
01399                // -- We have a private streamer.
01400                // Read the class version and byte count from the buffer.
01401                UInt_t start = 0;
01402                UInt_t count = 0;
01403                b.ReadVersion(&start, &count, cl);
01404                // Loop over the entries in the clones array or the STL container.
01405                for (Int_t k = 0; k < narr; ++k) {
01406                   Int_t* counter = (Int_t*) (arr[k] /*entry pointer*/ + eoffset /*entry offset*/ + fMethod[i] /*counter offset*/);
01407                   // And call the private streamer, passing it the buffer, the object, and the counter.
01408                   (*pstreamer)(b, arr[k] /*entry pointer*/ + ioffset /*object offset*/, *counter);
01409                }
01410                b.CheckByteCount(start, count, aElement->GetFullName());
01411                // We are done, next streamer element.
01412                continue;
01413             }
01414             // At this point we do *not* have a private streamer.
01415             // Get the version of the file we are reading from.
01416             TFile* file = (TFile*) b.GetParent();
01417             // By default assume the file version is the newest.
01418             Int_t fileVersion = kMaxInt;
01419             if (file) {
01420                fileVersion = file->GetVersion();
01421             }
01422             // Read the class version and byte count from the buffer.
01423             UInt_t start = 0;
01424             UInt_t count = 0;
01425             b.ReadVersion(&start, &count, cl);
01426             if (fileVersion > 51508) {
01427                // -- Newer versions allow polymorpic pointers.
01428                // Loop over the entries in the clones array or the STL container.
01429                for (Int_t k = 0; k < narr; ++k) {
01430                   // Get the counter for the varying length array.
01431                   Int_t vlen = *((Int_t*) (arr[k] /*entry pointer*/ + eoffset /*entry offset*/ + fMethod[i] /*counter offset*/));
01432                   //Int_t realLen;
01433                   //b >> realLen;
01434                   //if (realLen != vlen) {
01435                   //   fprintf(stderr, "read vlen: %d  realLen: %s\n", vlen, realLen);
01436                   //}
01437                   // Get a pointer to the array of pointers.
01438                   char** pp = (char**) (arr[k] /*entry pointer*/ + ioffset /*object offset*/);
01439                   if (!pp) {
01440                      continue;
01441                   }
01442                   // Loop over each element of the array of pointers to varying-length arrays.
01443                   for (Int_t ndx = 0; ndx < fLength[i]; ++ndx) {
01444                      //if (!pp[ndx]) {
01445                         // -- We do not have a pointer to a varying-length array.
01446                         //Error("ReadBuffer", "The pointer to element %s::%s type %d (%s) is null\n", thisVar->GetName(), aElement->GetFullName(), fType[i], aElement->GetTypeName());
01447                         //continue;
01448                      //}
01449                      // Delete any memory at pp[ndx].
01450                      if (!isPtrPtr) {
01451                         cl->DeleteArray(pp[ndx]);
01452                         pp[ndx] = 0;
01453                      } else {
01454                         // Using vlen is wrong here because it has already
01455                         // been overwritten with the value needed to read
01456                         // the current record.  Fixing this will require
01457                         // doing a pass over the object at the beginning
01458                         // of the I/O and releasing all the buffer memory
01459                         // for varying length arrays before we overwrite
01460                         // the counter values.
01461                         //
01462                         // For now we will just leak memory, just as we
01463                         // have always done in the past.  Fix this.
01464                         //
01465                         //char** r = (char**) pp[ndx];
01466                         //if (r) {
01467                         //   for (Int_t v = 0; v < vlen; ++v) {
01468                         //      cl->Destructor(r[v]);
01469                         //      r[v] = 0;
01470                         //   }
01471                         //}
01472                         delete[] pp[ndx];
01473                         pp[ndx] = 0;
01474                      }
01475                      if (!vlen) {
01476                         continue;
01477                      }
01478                      // Note: We now have pp[ndx] is null.
01479                      // Allocate memory to read into.
01480                      if (!isPtrPtr) {
01481                         // -- We are a varying-length array of objects.
01482                         // Note: Polymorphism is not allowed here.
01483                         // Allocate a new array of objects to read into.
01484                         pp[ndx] = (char*) cl->NewArray(vlen);
01485                         if (!pp[ndx]) {
01486                            Error("ReadBuffer", "Memory allocation failed!\n");
01487                            continue;
01488                         }
01489                      } else {
01490                         // -- We are a varying-length array of pointers to objects.
01491                         // Note: The object pointers are allowed to be polymorphic.
01492                         // Allocate a new array of pointers to objects to read into.
01493                         pp[ndx] = (char*) new char*[vlen];
01494                         if (!pp[ndx]) {
01495                            Error("ReadBuffer", "Memory allocation failed!\n");
01496                            continue;
01497                         }
01498                         // And set each pointer to null.
01499                         memset(pp[ndx], 0, vlen * sizeof(char*)); // This is the right size we really have a char**: pp[ndx] = (char*) new char*[vlen];
01500                      }
01501                      if (!isPtrPtr) {
01502                         // -- We are a varying-length array of objects.
01503                         b.ReadFastArray(pp[ndx], cl, vlen, 0);
01504                      }
01505                      else {
01506                         // -- We are a varying-length array of object pointers.
01507                         b.ReadFastArray((void**) pp[ndx], cl, vlen, kFALSE, 0);
01508                      } // isPtrPtr
01509                   } // ndx
01510                } // k
01511             }
01512             else {
01513                // -- Older versions do *not* allow polymorpic pointers.
01514                // Loop over the entries in the clones array or the STL container.
01515                for (Int_t k = 0; k < narr; ++k) {
01516                   // Get the counter for the varying length array.
01517                   Int_t vlen = *((Int_t*) (arr[k] /*entry pointer*/ + eoffset /*entry offset*/ + fMethod[i] /*counter offset*/));
01518                   //Int_t realLen;
01519                   //b >> realLen;
01520                   //if (realLen != vlen) {
01521                   //   fprintf(stderr, "read vlen: %d  realLen: %s\n", vlen, realLen);
01522                   //}
01523                   // Get a pointer to the array of pointers.
01524                   char** pp = (char**) (arr[k] /*entry pointer*/ + ioffset /*object offset*/);
01525                   if (!pp) {
01526                      continue;
01527                   }
01528                   // Loop over each element of the array of pointers to varying-length arrays.
01529                   for (Int_t ndx = 0; ndx < fLength[i]; ++ndx) {
01530                      //if (!pp[ndx]) {
01531                         // -- We do not have a pointer to a varying-length array.
01532                         //Error("ReadBuffer", "The pointer to element %s::%s type %d (%s) is null\n", thisVar->GetName(), aElement->GetFullName(), fType[i], aElement->GetTypeName());
01533                         //continue;
01534                      //}
01535                      // Delete any memory at pp[ndx].
01536                      if (!isPtrPtr) {
01537                         cl->DeleteArray(pp[ndx]);
01538                         pp[ndx] = 0;
01539                      } else {
01540                         // Using vlen is wrong here because it has already
01541                         // been overwritten with the value needed to read
01542                         // the current record.  Fixing this will require
01543                         // doing a pass over the object at the beginning
01544                         // of the I/O and releasing all the buffer memory
01545                         // for varying length arrays before we overwrite
01546                         // the counter values.
01547                         //
01548                         // For now we will just leak memory, just as we
01549                         // have always done in the past.  Fix this.
01550                         //
01551                         //char** r = (char**) pp[ndx];
01552                         //if (r) {
01553                         //   for (Int_t v = 0; v < vlen; ++v) {
01554                         //      cl->Destructor(r[v]);
01555                         //      r[v] = 0;
01556                         //   }
01557                         //}
01558                         delete[] pp[ndx];
01559                         pp[ndx] = 0;
01560                      }
01561                      if (!vlen) {
01562                         continue;
01563                      }
01564                      // Note: We now have pp[ndx] is null.
01565                      // Allocate memory to read into.
01566                      if (!isPtrPtr) {
01567                         // -- We are a varying-length array of objects.
01568                         // Note: Polymorphism is not allowed here.
01569                         // Allocate a new array of objects to read into.
01570                         pp[ndx] = (char*) cl->NewArray(vlen);
01571                         if (!pp[ndx]) {
01572                            Error("ReadBuffer", "Memory allocation failed!\n");
01573                            continue;
01574                         }
01575                      } else {
01576                         // -- We are a varying-length array of pointers to objects.
01577                         // Note: The object pointers are allowed to be polymorphic.
01578                         // Allocate a new array of pointers to objects to read into.
01579                         pp[ndx] = (char*) new char*[vlen];
01580                         if (!pp[ndx]) {
01581                            Error("ReadBuffer", "Memory allocation failed!\n");
01582                            continue;
01583                         }
01584                         // And set each pointer to null.
01585                         memset(pp[ndx], 0, vlen * sizeof(char*)); // This is the right size we really have a char**: pp[ndx] = (char*) new char*[vlen];
01586                      }
01587                      if (!isPtrPtr) {
01588                         // -- We are a varying-length array of objects.
01589                         // Loop over the elements of the varying length array.
01590                         for (Int_t v = 0; v < vlen; ++v) {
01591                            // Read the object from the buffer.
01592                            cl->Streamer(pp[ndx] + (v * cl->Size()), b);
01593                         } // v
01594                      }
01595                      else {
01596                         // -- We are a varying-length array of object pointers.
01597                         // Get a pointer to the object pointer array.
01598                         char** r = (char**) pp[ndx];
01599                         // Loop over the elements of the varying length array.
01600                         for (Int_t v = 0; v < vlen; ++v) {
01601                            // Allocate an object to read into.
01602                            r[v] = (char*) cl->New();
01603                            if (!r[v]) {
01604                               // Do not print a second error messsage here.
01605                               //Error("ReadBuffer", "Memory allocation failed!\n");
01606                               continue;
01607                            }
01608                            // Read the object from the buffer.
01609                            cl->Streamer(r[v], b);
01610                         } // v
01611                      } // isPtrPtr
01612                   } // ndx
01613                } // k
01614             } // fileVersion
01615             b.CheckByteCount(start, count, aElement->GetFullName());
01616             continue;
01617          }
01618 
01619          case TStreamerInfo::kCacheNew:
01620             ((TBufferFile&)b).PushDataCache( new TVirtualArray( aElement->GetClassPointer(), narr ) );
01621             continue;
01622          case TStreamerInfo::kCacheDelete:
01623             delete ((TBufferFile&)b).PopDataCache();
01624             continue;
01625 
01626          default: {
01627             int ans = -1;
01628 
01629             if (TStreamerInfo::kCache <= kase && kase < TStreamerInfo::kArtificial) {
01630 
01631                //T &cache_add = *(T*)b.PeekDataCacheArray();
01632                R__ASSERT(kFALSE); // cache_add);
01633 
01634                // thisVar->ReadBuffer(b,cache_addr,i,kase-TStreamerInfo::kCache,aElement,narr,eoffset)
01635 
01636                continue;
01637             }
01638 
01639             if (kase >= TStreamerInfo::kConv)
01640                ans = thisVar->ReadBufferConv(b,arr,i,kase,aElement,narr,eoffset);
01641             if (ans==0) continue;
01642 
01643             if (kase >= TStreamerInfo::kSkip)
01644                ans = thisVar->ReadBufferSkip(b,arr,i,kase,aElement,narr,eoffset);
01645             if (ans==0) continue;
01646 
01647             if (kase >= TStreamerInfo::kArtificial) {
01648                ans = thisVar->ReadBufferArtificial(b,arr,i,kase,aElement,narr,eoffset);
01649             }
01650             if (ans==0) continue;
01651          }
01652          if (aElement)
01653             Error("ReadBuffer","The element %s::%s type %d (%s) is not supported yet\n",
01654                   thisVar->GetName(),aElement->GetFullName(),kase,aElement->GetTypeName());
01655          else
01656             Error("ReadBuffer","The TStreamerElement for %s %d is missing!\n",
01657                   thisVar->GetName(),i);
01658 
01659          continue;
01660       }
01661    }
01662    if (needIncrement) b.DecrementLevel(thisVar);
01663    return 0;
01664 }
01665 
01666 #ifdef R__BROKEN_FUNCTION_TEMPLATES
01667 
01668 Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, char** const &arr, Int_t i, Int_t kase,
01669                                     TStreamerElement *aElement, Int_t narr,
01670                                     Int_t eoffset)
01671 {
01672   return TStreamerInfo__ReadBufferSkipImp(this,b,arr,i,kase,aElement,narr,eoffset,
01673                                           fMethod,fLength,fComp,fOldVersion);
01674 }
01675 
01676 Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, const TVirtualCollectionProxy &arr, Int_t i, Int_t kase,
01677                                     TStreamerElement *aElement, Int_t narr,
01678                                     Int_t eoffset)
01679 {
01680   return TStreamerInfo__ReadBufferSkipImp(this, b,arr,i,kase,aElement,narr,eoffset,
01681                                           fMethod,fLength,fComp,fOldVersion);
01682 }
01683 
01684 Int_t TStreamerInfo::ReadBufferSkip(TBuffer &b, const TVirtualArray &arr, Int_t i, Int_t kase,
01685                                     TStreamerElement *aElement, Int_t narr,
01686                                     Int_t eoffset)
01687 {
01688   return TStreamerInfo__ReadBufferSkipImp(this, b,arr,i,kase,aElement,narr,eoffset,
01689                                           fMethod,fLength,fComp,fOldVersion);
01690 }
01691 
01692 Int_t TStreamerInfo::ReadBufferConv(TBuffer &b, char** const &arr,  Int_t i, Int_t kase,
01693                                     TStreamerElement *aElement, Int_t narr,
01694                                     Int_t eoffset)
01695 {
01696   return TStreamerInfo__ReadBufferConvImp(b,arr,i,kase,aElement,narr,eoffset,fMethod,
01697                                           fElem,fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,
01698                                           fOldVersion);
01699 }
01700 
01701 Int_t TStreamerInfo::ReadBufferConv(TBuffer &b, const TVirtualCollectionProxy &arr,  Int_t i, Int_t kase,
01702                                     TStreamerElement *aElement, Int_t narr,
01703                                     Int_t eoffset)
01704 {
01705   return TStreamerInfo__ReadBufferConvImp(b,arr,i,kase,aElement,narr,eoffset,fMethod,
01706                                           fElem,fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,
01707                                           fOldVersion);
01708 }
01709 
01710 Int_t TStreamerInfo::ReadBufferConv(TBuffer &b, const TVirtualArray &arr,  Int_t i, Int_t kase,
01711                                     TStreamerElement *aElement, Int_t narr,
01712                                     Int_t eoffset)
01713 {
01714   return TStreamerInfo__ReadBufferConvImp(b,arr,i,kase,aElement,narr,eoffset,fMethod,
01715                                           fElem,fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,
01716                                           fOldVersion);
01717 }
01718 
01719 Int_t TStreamerInfo::ReadBufferArtificial(TBuffer &b, char** const &arr,  Int_t i, Int_t kase,
01720                                     TStreamerElement *aElement, Int_t narr,
01721                                     Int_t eoffset)
01722 {
01723   return TStreamerInfo__ReadBufferArtificialImp(b,arr,i,kase,aElement,narr,eoffset,fMethod,
01724                                           fElem,fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,
01725                                           fOldVersion);
01726 }
01727 
01728 Int_t TStreamerInfo::ReadBufferArtificial(TBuffer &b, const TVirtualCollectionProxy &arr,  Int_t i, Int_t kase,
01729                                     TStreamerElement *aElement, Int_t narr,
01730                                     Int_t eoffset)
01731 {
01732   return TStreamerInfo__ReadBufferArtificialImp(b,arr,i,kase,aElement,narr,eoffset,fMethod,
01733                                           fElem,fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,
01734                                           fOldVersion);
01735 }
01736 
01737 Int_t TStreamerInfo::ReadBufferArtificial(TBuffer &b, const TVirtualArray &arr,  Int_t i, Int_t kase,
01738                                     TStreamerElement *aElement, Int_t narr,
01739                                     Int_t eoffset)
01740 {
01741   return TStreamerInfo__ReadBufferArtificialImp(b,arr,i,kase,aElement,narr,eoffset,fMethod,
01742                                           fElem,fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,
01743                                           fOldVersion);
01744 }
01745 
01746 Int_t TStreamerInfo::ReadBuffer(TBuffer &b, char** const &arr, Int_t first,
01747                                 Int_t narr, Int_t eoffset, Int_t arrayMode)
01748 {
01749   return TStreamerInfo__ReadBufferImp(this,b,arr,first,narr,eoffset,arrayMode,fMethod,fElem,
01750                                       fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,fOldVersion);
01751 }
01752 
01753 Int_t TStreamerInfo::ReadBuffer(TBuffer &b, const TVirtualCollectionProxy &arr, Int_t first,
01754                                 Int_t narr, Int_t eoffset, Int_t arrayMode)
01755 {
01756   return TStreamerInfo__ReadBufferImp(this,b,arr,first,narr,eoffset,arrayMode,fMethod,fElem,
01757                                       fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,fOldVersion);
01758 }
01759 
01760 Int_t TStreamerInfo::ReadBuffer(TBuffer &b, const TVirtualArray &arr, Int_t first,
01761                                 Int_t narr, Int_t eoffset, Int_t arrayMode)
01762 {
01763   return TStreamerInfo__ReadBufferImp(this,b,arr,first,narr,eoffset,arrayMode,fMethod,fElem,
01764                                       fLength,fClass,fOffset,fNewType,fNdata,fType,fgElement,fComp,fOldVersion);
01765 }
01766 
01767 #endif
01768 
01769 
01770 #ifdef R__EXPLICIT_FUNCTION_INSTANTIATION
01771 
01772 template Int_t TStreamerInfo::ReadBufferSkip<char**>(TBuffer &b, char** const &arr, Int_t i, Int_t kase,
01773                                        TStreamerElement *aElement, Int_t narr,
01774                                        Int_t eoffset);
01775 template Int_t TStreamerInfo::ReadBufferSkip<TVirtualCollectionProxy>(TBuffer &b, const TVirtualCollectionProxy &arr, Int_t i, Int_t kase,
01776                                        TStreamerElement *aElement, Int_t narr,
01777                                        Int_t eoffset);
01778 template Int_t TStreamerInfo::ReadBufferSkip<TVirtualArray>(TBuffer &b, const TVirtualArray &arr, Int_t i, Int_t kase,
01779                                        TStreamerElement *aElement, Int_t narr,
01780                                        Int_t eoffset);
01781 
01782 template Int_t TStreamerInfo::ReadBufferConv<char**>(TBuffer &b, char** const &arr,  Int_t i, Int_t kase,
01783                                        TStreamerElement *aElement, Int_t narr,
01784                                        Int_t eoffset);
01785 template Int_t TStreamerInfo::ReadBufferConv<TVirtualCollectionProxy>(TBuffer &b, const TVirtualCollectionProxy &arr,  Int_t i, Int_t kase,
01786                                        TStreamerElement *aElement, Int_t narr,
01787                                        Int_t eoffset);
01788 template Int_t TStreamerInfo::ReadBufferConv<TVirtualArray>(TBuffer &b, const TVirtualArray &arr,  Int_t i, Int_t kase,
01789                                        TStreamerElement *aElement, Int_t narr,
01790                                        Int_t eoffset);
01791 
01792 template Int_t TStreamerInfo::ReadBufferArtificial<char**>(TBuffer &b, char** const &arr,  Int_t i, Int_t kase,
01793                                              TStreamerElement *aElement, Int_t narr,
01794                                              Int_t eoffset);
01795 template Int_t TStreamerInfo::ReadBufferArtificial<TVirtualCollectionProxy>(TBuffer &b, const TVirtualCollectionProxy &arr,  Int_t i, Int_t kase,
01796                                              TStreamerElement *aElement, Int_t narr,
01797                                              Int_t eoffset);
01798 template Int_t TStreamerInfo::ReadBufferArtificial<TVirtualArray>(TBuffer &b, const TVirtualArray &arr,  Int_t i, Int_t kase,
01799                                              TStreamerElement *aElement, Int_t narr,
01800                                              Int_t eoffset);
01801 
01802 template Int_t TStreamerInfo::ReadBuffer<char**>(TBuffer &b, char** const &arr, Int_t first,
01803                                                  Int_t narr, Int_t eoffset, Int_t arrayMode);
01804 template Int_t TStreamerInfo::ReadBuffer<TVirtualCollectionProxy>(TBuffer &b, const TVirtualCollectionProxy &arr, Int_t first,
01805                                                                   Int_t narr, Int_t eoffset, Int_t arrayMode);
01806 template Int_t TStreamerInfo::ReadBuffer<TVirtualArray>(TBuffer &b, const TVirtualArray &arr, Int_t first,
01807                                                         Int_t narr, Int_t eoffset, Int_t arrayMode);
01808 
01809 #endif
01810 
01811 
01812 //______________________________________________________________________________
01813 Int_t TStreamerInfo::ReadBufferSTL(TBuffer &b, TVirtualCollectionProxy *cont,
01814                                    Int_t nc, Int_t first, Int_t eoffset)
01815 {
01816    //  The STL vector/list is deserialized from the buffer b
01817 
01818    if (!nc) return 0;
01819    int ret = ReadBuffer(b, *cont, first,nc,eoffset,1);
01820    return ret;
01821 }
01822 
01823 //______________________________________________________________________________
01824 Int_t TStreamerInfo::ReadBufferClones(TBuffer &b, TClonesArray *clones,
01825                                       Int_t nc, Int_t first, Int_t eoffset)
01826 {
01827    // Read for TClonesArray.
01828 
01829    char **arr = (char **)clones->GetObjectRef(0);
01830    return ReadBuffer(b,arr,first,nc,eoffset,1);
01831 }

Generated on Tue Jul 5 14:30:20 2011 for ROOT_528-00b_version by  doxygen 1.5.1