30 #define DOLOOP for(int k=0; k<narr; ++k) 32 #define WriteBasicTypeElem(name,index) \ 34 name *x=(name*)(arr[index]+ioffset); \ 38 #define WriteBasicType(name) \ 40 WriteBasicTypeElem(name,0); \ 43 #define WriteBasicTypeLoop(name) \ 45 for(int k=0; k<narr; ++k) WriteBasicTypeElem(name,k); \ 48 #define WriteBasicArrayElem(name,index) \ 50 name *x=(name*)(arr[index]+ioffset); \ 51 b.WriteFastArray(x,compinfo[i]->fLength); \ 54 #define WriteBasicArray(name) \ 56 WriteBasicArrayElem(name,0); \ 59 #define WriteBasicArrayLoop(name) \ 61 for(int k=0; k<narr; ++k) WriteBasicArrayElem(name,k); \ 64 #define WriteBasicPointerElem(name,index) \ 66 Int_t *l = (Int_t*)(arr[index]+imethod); \ 67 name **f = (name**)(arr[index]+ioffset); \ 69 if (af && *l) b << Char_t(1); \ 70 else {b << Char_t(0); continue;} \ 72 for(j=0;j<compinfo[i]->fLength;j++) { \ 73 b.WriteFastArray(f[j],*l); \ 77 #define WriteBasicPointer(name) \ 79 int imethod = compinfo[i]->fMethod+eoffset; \ 80 WriteBasicPointerElem(name,0); \ 83 #define WriteBasicPointerLoop(name) \ 85 int imethod = compinfo[i]->fMethod+eoffset; \ 86 for(int k=0; k<narr; ++k) { \ 87 WriteBasicPointerElem(name,k); \ 118 Bool_t needIncrement = !( arrayMode & 2 );
119 arrayMode = arrayMode & (~2);
136 static const int kHaveLoop = 1024;
137 const Int_t typeOffset = arrayMode ? kHaveLoop : 0;
139 for (
Int_t i=first;i<last;i++) {
147 if (R__TestUseCache<T>(aElement)) {
150 Warning(
"WriteBuffer",
"Skipping %s::%s because the cache is missing.",
GetName(),aElement->
GetName());
153 printf(
"WriteBuffer, class:%s, name=%s, fType[%d]=%d," 154 " %s, bufpos=%d, arr=%p, eoffset=%d, Redirect=%p\n",
163 printf(
"WriteBuffer, class:%s, name=%s, fType[%d]=%d," 164 " %s, bufpos=%d, arr=%p, eoffset=%d, not a write rule, skipping.\n",
171 ioffset = eoffset+compinfo[i]->
fOffset;
177 printf(
"WriteBuffer, class:%s, name=%s, fType[%d]=%d, %s, " 178 "bufpos=%d, arr=%p, offset=%d\n",
180 b.
Length(),arr[0],ioffset);
183 switch (compinfo[i]->
fType+typeOffset) {
226 for(
int k=0; k<narr; ++k) {
233 for(
int k=0; k<narr; ++k) {
277 for(
int k=0; k<narr; ++k) {
283 for(
int k=0; k<narr; ++k) {
304 int imethod = compinfo[i]->
fMethod+eoffset;
308 if (af && *l) b <<
Char_t(1);
309 else {b <<
Char_t(0);
continue;}
311 for(j=0;j<compinfo[i]->
fLength;j++) {
317 int imethod = compinfo[i]->
fMethod+eoffset;
321 if (af && *l) b <<
Char_t(1);
322 else {b <<
Char_t(0);
continue;}
324 for(j=0;j<compinfo[i]->
fLength;j++) {
344 int imethod = compinfo[i]->
fMethod+eoffset;
345 for(
int k=0; k<narr; ++k) {
349 if (af && *l) b <<
Char_t(1);
350 else {b <<
Char_t(0);
continue;}
352 for(j=0;j<compinfo[i]->
fLength;j++) {
359 int imethod = compinfo[i]->
fMethod+eoffset;
360 for(
int k=0; k<narr; ++k) {
364 if (af && *l) b <<
Char_t(1);
365 else {b <<
Char_t(0);
continue;}
367 for(j=0;j<compinfo[i]->
fLength;j++) {
396 switch (compinfo[i]->
fType) {
401 char **
f = (
char**)(arr[k]+ioffset);
449 Int_t res = b.
WriteFastArray((
void**)(arr[k]+ioffset),cl,compinfo[i]->fLength,isPreAlloc,pstreamer);
452 "The actual class of %s::%s is not available. Only the \"%s\" part will be written\n",
464 void **
f = (
void**)(arr[k]+ioffset);
466 for(j=0;j<compinfo[i]->
fLength;j++) {
469 else {b <<
Char_t(0);
continue;}
470 if (pstreamer) (*pstreamer)(
b, af, 0);
518 && !(strspn(aElement->
GetTitle(),
"||") == 2)
526 char **contp = (
char**)(arr[k]+ioffset);
527 for(
int j=0;j<compinfo[i]->
fLength;++j) {
528 char *cont = contp[j];
530 Int_t nobjects = cont ? proxy->
Size() : 0;
539 if (pstreamer == 0) {
541 char **contp = (
char**)(arr[k]+ioffset);
542 for(
int j=0;j<compinfo[i]->
fLength;++j) {
543 char *cont = contp[j];
564 && !(strspn(aElement->
GetTitle(),
"||") == 2)
572 char *obj = (
char*)(arr[k]+ioffset);
575 int size = cl->
Size();
577 for(
Int_t j=0; j<
n; j++,obj+=size) {
588 if (pstreamer == 0) {
590 b.
WriteFastArray((
void*)(arr[k]+ioffset),cl,compinfo[i]->fLength,0);
607 {b.
WriteFastArray((
void*)(arr[k]+ioffset),cl,compinfo[i]->fLength,pstreamer);}
626 if (!(arrayMode&1)) {
648 if (pstreamer == 0) {
649 printf(
"ERROR, Streamer is null\n");
650 aElement->
ls();
continue;
679 for (
int k = 0; k < narr; ++k) {
681 Int_t* counter = (
Int_t*) (arr[k] + eoffset + compinfo[i]->fMethod );
683 (*pstreamer)(
b, arr[k] + ioffset , *counter);
699 if (fileVersion > 51508) {
702 for (
int k = 0; k < narr; ++k) {
704 Int_t vlen = *((
Int_t*) (arr[k] + eoffset + compinfo[i]->fMethod ));
708 char** pp = (
char**) (arr[k] + ioffset );
710 for (
Int_t ndx = 0; ndx < compinfo[i]->
fLength; ++ndx) {
735 for (
int k = 0; k < narr; ++k) {
737 Int_t vlen = *((
Int_t*) (arr[k] + eoffset + compinfo[i]->fMethod ));
741 char** pp = (
char**) (arr[k] + ioffset );
744 for (
Int_t ndx = 0; ndx < compinfo[i]->
fLength; ++ndx) {
763 char**
r = (
char**) pp[ndx];
785 ROOT::TSchemaRule::WriteFuncPtr_t writefunc = ((
TStreamerArtificial*)aElement)->GetWriteFunc();
787 DOLOOP( writefunc(arr[k]+eoffset, b) );
849 char **arr =
reinterpret_cast<char**
>(clones->
GetObjectRef(0));
Describe Streamer information for one class version.
virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual void WriteFloat16(Float_t *f, TStreamerElement *ele=0)=0
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
static Bool_t GetStreamMemberWise()
Return whether the TStreamerInfos will save the collections in "member-wise" order whenever possible...
virtual void WriteFastArrayFloat16(const Float_t *f, Int_t n, TStreamerElement *ele=0)=0
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
Equal to TDataType's kchar.
virtual TClass * GetValueClass() const =0
TObject * GetParent() const
Return pointer to parent of this buffer.
virtual void WriteDouble32(Double_t *d, TStreamerElement *ele=0)=0
#define WriteBasicArray(name)
Bool_t TestBit(UInt_t f) const
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Buffer base class used for serializing objects.
virtual UInt_t WriteVersionMemberWise(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Cache the value in memory than is not part of the object but is accessible via a SchemaRule.
Int_t fNdata
!number of optimized elements
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TObject ** GetObjectRef() const
#define WriteBasicPointerLoop(name)
TCompInfo ** fCompFull
![fElements->GetEntries()]
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Int_t WriteBufferSTLPtrs(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc, Int_t first, Int_t eoffset)
Write for STL container.
#define WriteBasicTypeLoop(name)
The TNamed class is the base class for all named ROOT classes.
virtual void SetStreamerElementNumber(TStreamerElement *elem, Int_t comp_type)=0
Int_t WriteBufferClones(TBuffer &b, TClonesArray *clones, Int_t nc, Int_t first, Int_t eoffset)
Write for ClonesArray ('first' is an id between -1 and fNfulldata).
TMemberStreamer * fStreamer
Not Owned.
Int_t fNfulldata
!number of elements
A TProcessID identifies a ROOT job in a unique way in time and space.
virtual void ls(Option_t *option="") const
Print the content of the element.
virtual UShort_t WriteProcessID(TProcessID *pid)=0
Always return 0 (current processID).
TClass * fClass
!pointer to class
static TProcessID * GetProcessWithUID(const TObject *obj)
static function returning a pointer to TProcessID with its pid encoded in the highest byte of obj->Ge...
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
#define WriteBasicArrayLoop(name)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
#define WriteBasicPointer(name)
Int_t Size() const
Return size of object of this class.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
TClass * fClass
Not Owned.
void Streamer(void *obj, TBuffer &b, const TClass *onfile_class=0) const
Int_t WriteBufferAux(TBuffer &b, const T &arr, TCompInfo *const *const compinfo, Int_t first, Int_t last, Int_t narr, Int_t eoffset, Int_t mode)
The object at pointer is serialized to the buffer b if (arrayMode & 1) ptr is a pointer to array of p...
virtual void WriteFastArray(const Bool_t *b, Int_t n)=0
#define WriteBasicType(name)
Int_t WriteBuffer(TBuffer &b, char *pointer, Int_t first)
General Write.
virtual void DecrementLevel(TVirtualStreamerInfo *)=0
Int_t WriteBufferSTL(TBuffer &b, TVirtualCollectionProxy *cont, Int_t nc)
Write for STL container. ('first' is an id between -1 and fNfulldata).
static TRefTable * GetRefTable()
Static function returning the current TRefTable.
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
unsigned long long ULong64_t
A TRefTable maintains the association between a referenced object and the parent object supporting th...
Mother of all ROOT objects.
virtual UInt_t Size() const =0
An array of clone (identical) objects.
virtual void TagStreamerInfo(TVirtualStreamerInfo *info)=0
const char * GetTypeName() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
if object is referenced by a TRef or TRefArray
TCompInfo ** fCompOpt
![fNdata]
virtual void IncrementLevel(TVirtualStreamerInfo *info)=0
virtual void WriteFastArrayDouble32(const Double_t *d, Int_t n, TStreamerElement *ele=0)=0
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual const char * GetTitle() const
Returns title of object.