Logo ROOT  
Reference Guide
TStreamerElement.cxx
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Rene Brun 12/10/2000
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 //////////////////////////////////////////////////////////////////////////
13 // //
14 // //
15 //////////////////////////////////////////////////////////////////////////
16 
17 
18 #include "TROOT.h"
19 #include "TStreamerElement.h"
20 #include "TVirtualStreamerInfo.h"
21 #include "TBuffer.h"
22 #include "TClass.h"
23 #include "TClassEdit.h"
24 #include "TClassStreamer.h"
25 #include "TClassTable.h"
26 #include "TBaseClass.h"
27 #include "TDataMember.h"
28 #include "TDataType.h"
29 #include "TRealData.h"
30 #include "ThreadLocalStorage.h"
31 #include "TList.h"
32 #include "TRef.h"
33 #include "TInterpreter.h"
34 #include "TError.h"
35 #include "TObjArray.h"
36 #include "TVirtualMutex.h"
38 #include "strlcpy.h"
39 #include "snprintf.h"
40 
41 #include <string>
42 
43 using namespace std;
44 
45 const Int_t kMaxLen = 1024;
46 
48  TTHREAD_TLS_DECL_ARG(TString,includeName,kMaxLen);
49  return includeName;
50 }
51 
52 static TString ExtractClassName(const TString &type_name)
53 {
54  TString className = type_name.Strip(TString::kTrailing, '*');
55  if (className.Index("const ")==0) className.Remove(0,6);
56  return className;
57 }
58 ////////////////////////////////////////////////////////////////////////////////
59 /// Helper function to initialize the 'index/counter' value of
60 /// the Pointer streamerElements. If directive is a StreamerInfo and it correspond to the
61 /// same class a 'countClass' the streamerInfo is used instead of the current StreamerInfo of the TClass
62 /// for 'countClass'.
63 
64 static TStreamerBasicType *InitCounter(const char *countClass, const char *countName, TVirtualStreamerInfo *directive)
65 {
66  TStreamerBasicType *counter = 0;
67 
68  TClass *cl = TClass::GetClass(countClass);
69 
70  if (directive) {
71 
72  if (directive->GetClass() == cl) {
73  // The info we have been passed is indeed describing the counter holder, just look there.
74 
75  TStreamerElement *element = (TStreamerElement *)directive->GetElements()->FindObject(countName);
76  if (!element) return 0;
77  if (element->IsA() != TStreamerBasicType::Class()) return 0;
78  counter = (TStreamerBasicType*)element;
79 
80  } else {
81  if (directive->GetClass()->GetListOfRealData()) {
82  TRealData* rdCounter = (TRealData*) directive->GetClass()->GetListOfRealData()->FindObject(countName);
83  if (!rdCounter) return 0;
84  TDataMember *dmCounter = rdCounter->GetDataMember();
85  cl = dmCounter->GetClass();
86  } else {
87  TStreamerElement *element = (TStreamerElement *)directive->GetElements()->FindObject(countName);
88  if (!element) return 0;
89  if (element->IsA() != TStreamerBasicType::Class()) return 0;
90  cl = directive->GetClass();
91  }
92  if (cl==0) return 0;
93  counter = TVirtualStreamerInfo::GetElementCounter(countName,cl);
94  }
95  } else {
96 
97  if (cl==0) return 0;
98  counter = TVirtualStreamerInfo::GetElementCounter(countName,cl);
99  }
100 
101  //at this point the counter may be declared to be skipped
102  if (counter) {
104  }
105  return counter;
106 }
107 
108 ////////////////////////////////////////////////////////////////////////////////
109 /// Parse comments to search for a range specifier of the style:
110 /// [xmin,xmax] or [xmin,xmax,nbits]
111 /// [0,1]
112 /// [-10,100];
113 /// [-pi,pi], [-pi/2,pi/4],[-2pi,2*pi]
114 /// [-10,100,16]
115 /// [0,0,8]
116 /// if nbits is not specified, or nbits <2 or nbits>32 it is set to 32
117 /// if (xmin==0 and xmax==0 and nbits <=16) the double word will be converted
118 /// to a float and its mantissa truncated to nbits significative bits.
119 ///
120 /// see comments in TBufferFile::WriteDouble32.
121 
122 static void GetRange(const char *comments, Double_t &xmin, Double_t &xmax, Double_t &factor)
123 {
124  const Double_t kPi =3.14159265358979323846 ;
125  factor = xmin = xmax = 0;
126  if (!comments) return;
127  const char *left = strstr(comments,"[");
128  if (!left) return;
129  const char *right = strstr(left,"]");
130  if (!right) return;
131  const char *comma = strstr(left,",");
132  if (!comma || comma > right) {
133  //may be first bracket was a dimension specifier
134  left = strstr(right,"[");
135  if (!left) return;
136  right = strstr(left,"]");
137  if (!right) return;
138  comma = strstr(left,",");
139  if (!comma || comma >right) return;
140  }
141  //search if nbits is specified
142  const char *comma2 = 0;
143  if (comma) comma2 = strstr(comma+1,",");
144  if (comma2 > right) comma2 = 0;
145  Int_t nbits = 32;
146  if (comma2) {
147  TString sbits(comma2+1,right-comma2-1);
148  sscanf(sbits.Data(),"%d",&nbits);
149  if (nbits < 2 || nbits > 32) {
150  ::Error("GetRange","Illegal specification for the number of bits; %d. reset to 32.",nbits);
151  nbits = 32;
152  }
153  right = comma2;
154  }
155  TString range(left+1,right-left-1);
156  TString sxmin(left+1,comma-left-1);
157  sxmin.ToLower();
158  sxmin.ReplaceAll(" ","");
159  if (sxmin.Contains("pi")) {
160  if (sxmin.Contains("2pi")) xmin = 2*kPi;
161  else if (sxmin.Contains("2*pi")) xmin = 2*kPi;
162  else if (sxmin.Contains("twopi")) xmin = 2*kPi;
163  else if (sxmin.Contains("pi/2")) xmin = kPi/2;
164  else if (sxmin.Contains("pi/4")) xmin = kPi/4;
165  else if (sxmin.Contains("pi")) xmin = kPi;
166  if (sxmin.Contains("-")) xmin = -xmin;
167  } else {
168  sscanf(sxmin.Data(),"%lg",&xmin);
169  }
170  TString sxmax(comma+1,right-comma-1);
171  sxmax.ToLower();
172  sxmax.ReplaceAll(" ","");
173  if (sxmax.Contains("pi")) {
174  if (sxmax.Contains("2pi")) xmax = 2*kPi;
175  else if (sxmax.Contains("2*pi")) xmax = 2*kPi;
176  else if (sxmax.Contains("twopi")) xmax = 2*kPi;
177  else if (sxmax.Contains("pi/2")) xmax = kPi/2;
178  else if (sxmax.Contains("pi/4")) xmax = kPi/4;
179  else if (sxmax.Contains("pi")) xmax = kPi;
180  if (sxmax.Contains("-")) xmax = -xmax;
181  } else {
182  sscanf(sxmax.Data(),"%lg",&xmax);
183  }
184  UInt_t bigint;
185  if (nbits < 32) bigint = 1<<nbits;
186  else bigint = 0xffffffff;
187  if (xmin < xmax) factor = bigint/(xmax-xmin);
188  if (xmin >= xmax && nbits <15) xmin = nbits+0.1;
189 }
190 
192 
193 ////////////////////////////////////////////////////////////////////////////////
194 /// Default ctor.
195 
197 {
198  fType = 0;
199  fSize = 0;
200  fNewType = 0;
201  fArrayDim = 0;
202  fArrayLength = 0;
203  fStreamer = 0;
204  fOffset = 0;
205  fClassObject = (TClass*)(-1);
206  fNewClass = 0;
207  fTObjectOffset = 0;
208  fFactor = 0;
209  fXmin = 0;
210  fXmax = 0;
211  for (Int_t i=0;i<5;i++) fMaxIndex[i] = 0;
212 }
213 
214 ////////////////////////////////////////////////////////////////////////////////
215 /// Create a TStreamerElement object.
216 
217 TStreamerElement::TStreamerElement(const char *name, const char *title, Int_t offset, Int_t dtype, const char *typeName)
218  : TNamed(name,title)
219 {
220  fOffset = offset;
221  fType = dtype;
222  fSize = 0;
223  fNewType = fType;
224  fArrayDim = 0;
225  fArrayLength = 0;
226  if (typeName && !strcmp(typeName, "BASE")) {
227  // TStreamerBase case; fTypeName should stay "BASE".
228  fTypeName = typeName;
229  } else {
230  //must protect call into the interpreter
233  }
234  fStreamer = 0;
235  fClassObject = (TClass*)(-1);
236  fNewClass = 0;
237  fTObjectOffset = 0;
238  fFactor = 0;
239  fXmin = 0;
240  fXmax = 0;
241  for (Int_t i=0;i<5;i++) fMaxIndex[i] = 0;
242  if (fTypeName == "Float16_t" || fTypeName == "Float16_t*") {
243  GetRange(title,fXmin,fXmax,fFactor);
244  if (fFactor > 0 || fXmin > 0) SetBit(kHasRange);
245  }
246  if (fTypeName == "Double32_t" || fTypeName == "Double32_t*") {
247  GetRange(title,fXmin,fXmax,fFactor);
248  if (fFactor > 0 || fXmin > 0) SetBit(kHasRange);
249  }
250 }
251 
252 ////////////////////////////////////////////////////////////////////////////////
253 /// TStreamerElement dtor.
254 
256 {
257 }
258 
259 
260 ////////////////////////////////////////////////////////////////////////////////
261 /// Returns true if the element cannot be split, false otherwise.
262 /// An element cannot be split if the corresponding class member has
263 /// the special characters "||" as the first characters in the
264 /// comment field.
265 
267 {
268  if (GetTitle()[0] != 0 && strspn(GetTitle(),"||") == 2) return kTRUE;
269  TClass *cl = GetClassPointer();
270  if (!cl) return kFALSE; //basic type
271 
272  static TClassRef clonesArray("TClonesArray");
273  if (IsaPointer() && cl != clonesArray && !cl->GetCollectionProxy()) return kTRUE;
274 
275  switch(fType) {
281  return kTRUE;
282  }
283 
284  if ( !cl->CanSplit() ) return kTRUE;
285 
286  return kFALSE;
287 }
288 
289 ////////////////////////////////////////////////////////////////////////////////
290 /// Returns a pointer to the TClass of this element.
291 
293 {
294  if (fClassObject!=(TClass*)(-1)) return fClassObject;
295 
296  TString className(ExtractClassName(fTypeName));
297  bool quiet = (fType == TVirtualStreamerInfo::kArtificial);
298  ((TStreamerElement*)this)->fClassObject = TClass::GetClass(className, kTRUE, quiet);
299  return fClassObject;
300 }
301 
302 ////////////////////////////////////////////////////////////////////////////////
303 /// Returns the TExec id for the EXEC instruction in the comment field
304 /// of a TRef data member.
305 
307 {
308  //check if element is a TRef or TRefArray
309  if (strncmp(fTypeName.Data(),"TRef",4) != 0) return 0;
310 
311  //if the UniqueID of this element has already been set, we assume
312  //that it contains the exec id of a TRef object.
313  if (GetUniqueID()) return GetUniqueID();
314 
315  //check if an Exec is specified in the comment field
316  char *action = (char*)strstr(GetTitle(),"EXEC:");
317  if (!action) return 0;
318  Int_t nch = strlen(action)+1;
319  char *caction = new char[nch];
320  strlcpy(caction,action+5,nch);
321  char *blank = (char*)strchr(caction,' ');
322  if (blank) *blank = 0;
323  //we have found the Exec name in the comment
324  //we register this Exec to the list of Execs.
325  Int_t index = TRef::AddExec(caction);
326  delete [] caction;
327  //we save the Exec index as the uniqueid of this STreamerElement
328  const_cast<TStreamerElement*>(this)->SetUniqueID(index+1);
329  return index+1;
330 }
331 
332 ////////////////////////////////////////////////////////////////////////////////
333 /// Return element name including dimensions, if any
334 /// Note that this function stores the name into a static array.
335 /// You should copy the result.
336 
337 const char *TStreamerElement::GetFullName() const
338 {
339  TTHREAD_TLS_DECL_ARG(TString,name,kMaxLen);
340  char cdim[20];
341  name = GetName();
342  for (Int_t i=0;i<fArrayDim;i++) {
343  snprintf(cdim,19,"[%d]",fMaxIndex[i]);
344  name += cdim;
345  }
346  return name;
347 }
348 
349 ////////////////////////////////////////////////////////////////////////////////
350 /// Fill type with the string representation of sequence
351 /// information including 'cached','repeat','write' or
352 /// 'nodelete'.
353 
355 {
356  sequenceType.Clear();
357  auto test_bit = [this, &sequenceType](unsigned bit, const char *name) {
358  if (TestBit(bit)) {
359  if (!sequenceType.IsNull()) sequenceType += ",";
360  sequenceType += name;
361  }
362  };
363 
364  test_bit(TStreamerElement::kWholeObject, "wholeObject");
365  test_bit(TStreamerElement::kCache, "cached");
366  test_bit(TStreamerElement::kRepeat, "repeat");
367  test_bit(TStreamerElement::kDoNotDelete, "nodelete");
368  test_bit(TStreamerElement::kWrite, "write");
369 }
370 
371 ////////////////////////////////////////////////////////////////////////////////
372 /// Returns size of this element in bytes.
373 
375 {
376  return fSize;
377 }
378 
379 ////////////////////////////////////////////////////////////////////////////////
380 /// Return the local streamer object.
381 
383 {
384  return fStreamer;
385 }
386 
387 ////////////////////////////////////////////////////////////////////////////////
388 /// Return type name of this element
389 /// in case the type name is not a standard basic type, return
390 /// the basic type name known to CINT.
391 
393 {
394  TDataType *dt = gROOT->GetType(fTypeName.Data());
395  if (fType < 1 || fType > 55) return fTypeName.Data();
396  if (dt && dt->GetType() > 0) return fTypeName.Data();
397  Int_t dtype = fType%20;
398  return TDataType::GetTypeName((EDataType)dtype);
399 }
400 
401 ////////////////////////////////////////////////////////////////////////////////
402 /// Initliaze the element.
403 
405 {
407  if (fClassObject && fClassObject->IsTObject()) {
409  }
410 }
411 
412 ////////////////////////////////////////////////////////////////////////////////
413 /// The early 3.00/00 and 3.01/01 versions used to store
414 /// dm->GetTypeName instead of dm->GetFullTypename
415 /// if this case is detected, the element type name is modified.
416 
417 Bool_t TStreamerElement::IsOldFormat(const char *newTypeName)
418 {
419  //if (!IsaPointer()) return kFALSE;
420  if (!strstr(newTypeName,fTypeName.Data())) return kFALSE;
421  //if (!strstr(fTypeName.Data(),newTypeName)) return kFALSE;
422  fTypeName = newTypeName;
423  return kTRUE;
424 }
425 
426 ////////////////////////////////////////////////////////////////////////////////
427 /// Return kTRUE if the element represent a base class.
428 
430 {
431  return kFALSE;
432 }
433 
434 ////////////////////////////////////////////////////////////////////////////////
435 /// Return kTRUE if the element represent an entity that is not written
436 /// to the disk (transient members, cache allocator/deallocator, etc.)
437 
439 {
441  // if (((const TStreamerArtificial*)this)->GetWriteFunc() == 0)
442  return kTRUE;
443  }
449 
450  return kFALSE;
451 }
452 
453 ////////////////////////////////////////////////////////////////////////////////
454 /// Print the content of the element.
455 
457 {
458  TString temp(GetTypeName());
459  if (IsaPointer() && !fTypeName.Contains("*")) temp += "*";
460 
461  TString sequenceType;
462  GetSequenceType(sequenceType);
463  if (sequenceType.Length()) {
464  sequenceType.Prepend(" (");
465  sequenceType += ") ";
466  }
467  printf(" %-14s %-15s offset=%3d type=%2d %s%-20s\n",
468  temp.Data(),GetFullName(),fOffset,fType,sequenceType.Data(),
469  GetTitle());
470 }
471 
472 ////////////////////////////////////////////////////////////////////////////////
473 /// Set number of array dimensions.
474 
476 {
477  fArrayDim = dim;
479  fNewType = fType;
480 }
481 
482 ////////////////////////////////////////////////////////////////////////////////
483 ///set maximum index for array with dimension dim
484 
486 {
487  if (dim < 0 || dim > 4) return;
488  fMaxIndex[dim] = max;
489  if (fArrayLength == 0) fArrayLength = max;
490  else fArrayLength *= max;
491 }
492 
493 ////////////////////////////////////////////////////////////////////////////////
494 ///set pointer to Streamer function for this element
495 
497 {
498  fStreamer = streamer;
499 }
500 
501 ////////////////////////////////////////////////////////////////////////////////
502 /// Stream an object of class TStreamerElement.
503 
504 void TStreamerElement::Streamer(TBuffer &R__b)
505 {
506  UInt_t R__s, R__c;
507  if (R__b.IsReading()) {
508  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
509  //NOTE that when reading, one cannot use Class()->ReadBuffer
510  // TBuffer::Class methods used for reading streamerinfos from SQL database
511  // Any changes of class structure should be reflected by them starting from version 4
512 
513  R__b.ClassBegin(TStreamerElement::Class(), R__v);
514  R__b.ClassMember("TNamed");
515  TNamed::Streamer(R__b);
516  R__b.ClassMember("fType","Int_t");
517  R__b >> fType;
518  R__b.ClassMember("fSize","Int_t");
519  R__b >> fSize;
520  R__b.ClassMember("fArrayLength","Int_t");
521  R__b >> fArrayLength;
522  R__b.ClassMember("fArrayDim","Int_t");
523  R__b >> fArrayDim;
524  R__b.ClassMember("fMaxIndex","Int_t", 5);
525  if (R__v == 1) R__b.ReadStaticArray(fMaxIndex);
526  else R__b.ReadFastArray(fMaxIndex,5);
527  R__b.ClassMember("fTypeName","TString");
528  fTypeName.Streamer(R__b);
529  if (fType==11&&(fTypeName=="Bool_t"||fTypeName=="bool")) fType = 18;
530  if (R__v > 1) {
531  SetUniqueID(0);
532  //check if element is a TRef or TRefArray
533  GetExecID();
534  }
535  if (R__v <= 2 && this->IsA()==TStreamerBasicType::Class()) {
536  // In TStreamerElement v2, fSize was holding the size of
537  // the underlying data type. In later version it contains
538  // the full length of the data member.
539  TDataType *type = gROOT->GetType(GetTypeName());
540  if (type && fArrayLength) fSize = fArrayLength * type->Size();
541  }
542  if (R__v == 3) {
543  R__b >> fXmin;
544  R__b >> fXmax;
545  R__b >> fFactor;
546  if (fFactor > 0) SetBit(kHasRange);
547  }
548  if (R__v > 3) {
550  }
551  //R__b.CheckByteCount(R__s, R__c, TStreamerElement::IsA());
553  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
554 
557  } else {
559  }
560 }
561 
562 ////////////////////////////////////////////////////////////////////////////////
563 ///function called by the TClass constructor when replacing an emulated class
564 ///by the real class
565 
566 void TStreamerElement::Update(const TClass *oldClass, TClass *newClass)
567 {
568  if (fClassObject == oldClass) {
569  fClassObject = newClass;
570  if (fClassObject && fClassObject->IsTObject()) {
572  }
573  } else if (fClassObject == nullptr) {
574  // Well since some emulated class is replaced by a real class, we can
575  // assume a new library has been loaded. If this is the case, we should
576  // check whether the class now exist (this would be the case for example
577  // for reading STL containers).
578 
579  TString classname(ExtractClassName(fTypeName));
580 
581  if (classname == newClass->GetName()) {
582  fClassObject = newClass;
583  if (fClassObject && fClassObject->IsTObject()) {
585  }
586  } else if (TClassTable::GetDict(classname)) {
587  fClassObject = (TClass*)-1;
588  GetClassPointer(); //force fClassObject
589  if (fClassObject && fClassObject->IsTObject()) {
591  }
592  }
593  }
594 }
595 
596 //______________________________________________________________________________
597 
598 //////////////////////////////////////////////////////////////////////////
599 // //
600 // TStreamerBase implement the streamer of the base class //
601 // //
602 //////////////////////////////////////////////////////////////////////////
603 
605 
606 ////////////////////////////////////////////////////////////////////////////////
607 
609  // Abuse TStreamerElement data member that is not used by TStreamerBase
610  fBaseCheckSum( *( (UInt_t*)&(fMaxIndex[1]) ) ),
611  fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
612 {
613  // Default ctor.
614 
615  fBaseClass = (TClass*)(-1);
616  fBaseVersion = 0;
617  fNewBaseClass = 0;
618 }
619 
620 ////////////////////////////////////////////////////////////////////////////////
621 
622 TStreamerBase::TStreamerBase(const char *name, const char *title, Int_t offset, Bool_t isTransient)
623  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kBase,"BASE"),
624  // Abuse TStreamerElement data member that is not used by TStreamerBase
625  fBaseCheckSum( *( (UInt_t*)&(fMaxIndex[1]) ) ),
626  fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
627 
628 {
629  // Create a TStreamerBase object.
630 
631  if (strcmp(name,"TObject") == 0) fType = TVirtualStreamerInfo::kTObject;
632  if (strcmp(name,"TNamed") == 0) fType = TVirtualStreamerInfo::kTNamed;
633  fNewType = fType;
635  if (fBaseClass) {
636  if (fBaseClass->IsVersioned()) {
638  } else {
639  fBaseVersion = -1;
640  }
642  } else {
643  fBaseVersion = 0;
644  }
645  fNewBaseClass = 0;
646  Init(isTransient);
647 }
648 
649 ////////////////////////////////////////////////////////////////////////////////
650 /// TStreamerBase dtor
651 
653 {
654 }
655 
656 ////////////////////////////////////////////////////////////////////////////////
657 /// Returns a pointer to the TClass of this element.
658 
660 {
661  if (fBaseClass!=(TClass*)(-1)) return fBaseClass;
662  ((TStreamerBase*)this)->fBaseClass = TClass::GetClass(GetName());
663  return fBaseClass;
664 }
665 
666 ////////////////////////////////////////////////////////////////////////////////
667 /// Returns size of baseclass in bytes.
668 
670 {
671  TClass *cl = GetClassPointer();
672  if (cl) return cl->Size();
673  return 0;
674 }
675 
676 ////////////////////////////////////////////////////////////////////////////////
677 /// Setup the element.
678 
680 {
681  Init(kFALSE);
682 }
683 
684 void TStreamerBase::Init(Bool_t isTransient)
685 {
687  if (!fBaseClass) return;
688 
689  InitStreaming(isTransient);
690 }
691 
692 ////////////////////////////////////////////////////////////////////////////////
693 /// Setup the fStreamerFunc and fStreamerinfo
694 
696 {
697  if (fNewBaseClass) {
700  if (fBaseVersion > 0 || fBaseCheckSum == 0) {
702  } else {
704  }
705  } else if (fBaseClass && fBaseClass != (TClass*)-1) {
708  if (fBaseVersion >= 0 || fBaseCheckSum == 0) {
710  } else {
712  }
713  } else {
714  fStreamerFunc = 0;
715  fConvStreamerFunc = 0;
716  fStreamerInfo = 0;
717  }
718 }
719 
720 ////////////////////////////////////////////////////////////////////////////////
721 /// Return kTRUE if the element represent a base class.
722 
724 {
725  return kTRUE;
726 }
727 
728 ////////////////////////////////////////////////////////////////////////////////
729 /// Return the proper include for this element.
730 
731 const char *TStreamerBase::GetInclude() const
732 {
735  } else {
736  std::string shortname( TClassEdit::ShortType( GetName(), 1 ) );
737  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
738  }
739  return IncludeNameBuffer();
740 }
741 
742 ////////////////////////////////////////////////////////////////////////////////
743 /// Print the content of the element.
744 
746 {
747  TString sequenceType;
748  GetSequenceType(sequenceType);
749  if (sequenceType.Length()) {
750  sequenceType.Prepend(" (");
751  sequenceType += ") ";
752  }
753  printf(" %-14s %-15s offset=%3d type=%2d %s%-20s\n",GetFullName(),GetTypeName(),fOffset,fType,sequenceType.Data(),GetTitle());
754 }
755 
756 ////////////////////////////////////////////////////////////////////////////////
757 /// Read the content of the buffer.
758 
760 {
761  if (fConvStreamerFunc) {
762  // We have a custom Streamer member function, we must use it.
763  fConvStreamerFunc(b,pointer+fOffset,fNewBaseClass ? fBaseClass : nullptr);
764  } else if (fStreamerFunc) {
765  // We have a custom Streamer member function, we must use it.
766  fStreamerFunc(b,pointer+fOffset);
767  } else {
768  // We don't have a custom Streamer member function. That still doesn't mean
769  // that there is no streamer - it could be an external one:
770  // If the old base class has an adopted streamer we take that
771  // one instead of the new base class:
772  if( fNewBaseClass ) {
774  if (extstrm) {
775  // The new base class has an adopted streamer:
776  extstrm->SetOnFileClass(fBaseClass);
777  (*extstrm)(b, pointer);
778  } else {
779  b.ReadClassBuffer( fNewBaseClass, pointer+fOffset, fBaseClass );
780  }
781  } else {
782  TClassStreamer* extstrm = fBaseClass->GetStreamer();
783  if (extstrm) {
784  // The class has an adopted streamer:
785  (*extstrm)(b, pointer);
786  } else {
787  b.ReadClassBuffer( fBaseClass, pointer+fOffset );
788  }
789  }
790  }
791  return 0;
792 }
793 
794 ////////////////////////////////////////////////////////////////////////////////
795 /// Stream an object of class TStreamerBase.
796 
797 void TStreamerBase::Streamer(TBuffer &R__b)
798 {
799  UInt_t R__s, R__c;
800  if (R__b.IsReading()) {
801  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
802 
803  R__b.ClassBegin(TStreamerBase::Class(), R__v);
804 
805  R__b.ClassMember("TStreamerElement");
806  TStreamerElement::Streamer(R__b);
807  // If the class owning the TStreamerElement and the base class are not
808  // loaded, on the file their streamer info might be in the following
809  // order (derived class,base class) and hence the base class is not
810  // yet emulated.
811  fBaseClass = (TClass*)-1;
812  fNewBaseClass = 0;
813  // Eventually we need a v3 that stores directly fBaseCheckSum (and
814  // a version of TStreamerElement should not stored fMaxIndex)
815  if (R__v > 2) {
816  R__b.ClassMember("fBaseVersion","Int_t");
817  R__b >> fBaseVersion;
818  } else {
819  // could have been: fBaseVersion = GetClassPointer()->GetClassVersion();
822  }
824  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
825  } else {
827  }
828 }
829 
830 ////////////////////////////////////////////////////////////////////////////////
831 ///Function called by the TClass constructor when replacing an emulated class
832 ///by the real class.
833 
834 void TStreamerBase::Update(const TClass *oldClass, TClass *newClass)
835 {
836  TStreamerElement::Update(oldClass, newClass);
837 
838  if (fBaseClass == oldClass) {
839  fBaseClass = newClass;
841  } else if (fBaseClass == nullptr) {
842  if (fName == newClass->GetName()) {
843  fBaseClass = newClass;
845  } else if (TClassTable::GetDict(fName)) {
848  }
849  }
850 }
851 
852 ////////////////////////////////////////////////////////////////////////////////
853 /// Write the base class into the buffer.
854 
856 {
857  if (fStreamerFunc) {
858  // We have a custom Streamer member function, we must use it.
859  fStreamerFunc(b,pointer+fOffset);
860  } else {
861  // We don't have a custom Streamer member function. That still doesn't mean
862  // that there is no streamer - it could be an external one:
863  // If the old base class has an adopted streamer we take that
864  // one instead of the new base class:
865  if (fNewBaseClass) {
867  if (extstrm) {
868  // The new base class has an adopted streamer:
869  extstrm->SetOnFileClass(fBaseClass);
870  (*extstrm)(b, pointer);
871  return 0;
872  } else {
874  return 0;
875  }
876  } else {
877  TClassStreamer* extstrm = fBaseClass->GetStreamer();
878  if (extstrm) {
879  (*extstrm)(b, pointer);
880  return 0;
881  } else {
882  fBaseClass->WriteBuffer(b,pointer+fOffset);
883  return 0;
884  }
885  }
886  }
887  return 0;
888 }
889 
890 //______________________________________________________________________________
891 
892 //////////////////////////////////////////////////////////////////////////
893 // //
894 // TStreamerBasicPointer implements the streamering of pointer to //
895 // fundamental types. //
896 // //
897 //////////////////////////////////////////////////////////////////////////
898 
900 
901 ////////////////////////////////////////////////////////////////////////////////
902 /// Default ctor.
903 
904 TStreamerBasicPointer::TStreamerBasicPointer() : fCountVersion(0),fCountName(),fCountClass(),fCounter(0)
905 {
906  fCounter = 0;
907 }
908 
909 ////////////////////////////////////////////////////////////////////////////////
910 /// Create a TStreamerBasicPointer object.
911 
912 TStreamerBasicPointer::TStreamerBasicPointer(const char *name, const char *title, Int_t offset, Int_t dtype, const char *countName, const char *countClass, Int_t countVersion, const char *typeName)
913  : TStreamerElement(name,title,offset,dtype,typeName)
914 {
916  fCountName = countName;
917  fCountClass = countClass;
918  fCountVersion = countVersion; //currently unused
919  Init();
920 // printf("BasicPointer Init:%s, countName=%s, countClass=%s, countVersion=%d, fCounter=%x\n",
921 // name,countName,countClass,countVersion,fCounter);
922 }
923 
924 ////////////////////////////////////////////////////////////////////////////////
925 /// TStreamerBasicPointer dtor.
926 
928 {
929 }
930 
931 ////////////////////////////////////////////////////////////////////////////////
932 /// return offset of counter
933 
935 {
936  if (!fCounter) ((TStreamerBasicPointer*)this)->Init();
937  if (!fCounter) return 0;
938  // FIXME: does not suport multiple inheritance for counter in base class.
939  // This is wrong in case counter is not in the same class or one of
940  // the left most (non virtual) base classes. For the other we would
941  // really need to use the object coming from the list of real data.
942  // (and even that need analysis for virtual base class).
943  return (ULongptr_t)fCounter->GetOffset();
944 }
945 
946 ////////////////////////////////////////////////////////////////////////////////
947 /// Returns size of basicpointer in bytes.
948 
950 {
951  if (fArrayLength) return fArrayLength*sizeof(void *);
952  return sizeof(void *);
953 }
954 
955 ////////////////////////////////////////////////////////////////////////////////
956 /// Setup the element.
957 /// If directive is a StreamerInfo and it correspond to the
958 /// same class a 'countClass' the streamerInfo is used instead of the current StreamerInfo of the TClass
959 /// for 'countClass'.
960 
962 {
963  fCounter = InitCounter( fCountClass, fCountName, directive );
964 }
965 
966 ////////////////////////////////////////////////////////////////////////////////
967 /// Set number of array dimensions.
968 
970 {
971  fArrayDim = dim;
972  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
973  fNewType = fType;
974 }
975 
976 ////////////////////////////////////////////////////////////////////////////////
977 /// Stream an object of class TStreamerBasicPointer.
978 
979 void TStreamerBasicPointer::Streamer(TBuffer &R__b)
980 {
981  UInt_t R__s, R__c;
982  if (R__b.IsReading()) {
983  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
984  if (R__v > 1) {
985  R__b.ReadClassBuffer(TStreamerBasicPointer::Class(), this, R__v, R__s, R__c);
986  //Init();
987  //fCounter = InitCounter( fCountClass, fCountName );
988  return;
989  }
990  //====process old versions before automatic schema evolution
991  TStreamerElement::Streamer(R__b);
992  R__b >> fCountVersion;
993  fCountName.Streamer(R__b);
994  fCountClass.Streamer(R__b);
995  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
996  } else {
998  }
999 }
1000 
1001 
1002 //______________________________________________________________________________
1003 
1004 //////////////////////////////////////////////////////////////////////////
1005 // //
1006 // TStreamerLoop implement streaming of a few construct that require //
1007 // looping over the data member and are not convered by other case //
1008 // (most deprecated). //
1009 // //
1010 //////////////////////////////////////////////////////////////////////////
1011 
1013 
1014 ////////////////////////////////////////////////////////////////////////////////
1015 /// Default ctor.
1016 
1017 TStreamerLoop::TStreamerLoop() : fCountVersion(0),fCountName(),fCountClass(),fCounter(0)
1018 {
1019 }
1020 
1021 ////////////////////////////////////////////////////////////////////////////////
1022 /// Create a TStreamerLoop object.
1023 
1024 TStreamerLoop::TStreamerLoop(const char *name, const char *title, Int_t offset, const char *countName, const char *countClass, Int_t countVersion, const char *typeName)
1025  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kStreamLoop,typeName)
1026 {
1027  fCountName = countName;
1028  fCountClass = countClass;
1029  fCountVersion = countVersion; //currently unused
1030  Init();
1031 }
1032 
1033 ////////////////////////////////////////////////////////////////////////////////
1034 /// TStreamerLoop dtor.
1035 
1037 {
1038 }
1039 
1040 ////////////////////////////////////////////////////////////////////////////////
1041 /// return address of counter
1042 
1044 {
1045  //if (!fCounter) {
1046  // Init();
1047  // if (!fCounter) return 0;
1048  //}
1049  if (!fCounter) return 0;
1050  return (ULongptr_t)fCounter->GetOffset();
1051 }
1052 
1053 ////////////////////////////////////////////////////////////////////////////////
1054 /// Returns size of counter in bytes.
1055 
1057 {
1058  if (fArrayLength) return fArrayLength*sizeof(void*);
1059  return sizeof(void*);
1060 }
1061 
1062 ////////////////////////////////////////////////////////////////////////////////
1063 /// Setup the element.
1064 /// If directive is a StreamerInfo and it correspond to the
1065 /// same class a 'countClass' the streamerInfo is used instead of the current StreamerInfo of the TClass
1066 /// for 'countClass'.
1067 
1069 {
1070  fCounter = InitCounter( fCountClass, fCountName, directive );
1071 }
1072 
1073 ////////////////////////////////////////////////////////////////////////////////
1074 /// Return the proper include for this element.
1075 
1076 const char *TStreamerLoop::GetInclude() const
1077 {
1078  IncludeNameBuffer().Form("<%s>","TString.h"); //to be generalized
1079  return IncludeNameBuffer();
1080 }
1081 
1082 ////////////////////////////////////////////////////////////////////////////////
1083 /// Stream an object of class TStreamerLoop.
1084 
1085 void TStreamerLoop::Streamer(TBuffer &R__b)
1086 {
1087  UInt_t R__s, R__c;
1088  if (R__b.IsReading()) {
1089  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1090  if (R__v > 1) {
1091  R__b.ReadClassBuffer(TStreamerLoop::Class(), this, R__v, R__s, R__c);
1092  //Init();
1093  return;
1094  }
1095  //====process old versions before automatic schema evolution
1096  TStreamerElement::Streamer(R__b);
1097  R__b >> fCountVersion;
1098  fCountName.Streamer(R__b);
1099  fCountClass.Streamer(R__b);
1100  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
1101  } else {
1103  }
1104 }
1105 
1106 
1107 //______________________________________________________________________________
1108 
1109 //////////////////////////////////////////////////////////////////////////
1110 // //
1111 // TStreamerBasicType implement streaming of fundamental types (int, //
1112 // float, etc.). //
1113 // //
1114 //////////////////////////////////////////////////////////////////////////
1115 
1117 
1118 ////////////////////////////////////////////////////////////////////////////////
1119 /// Default ctor.
1120 
1122 {
1123 }
1124 
1125 ////////////////////////////////////////////////////////////////////////////////
1126 /// Create a TStreamerBasicType object.
1127 
1128 TStreamerBasicType::TStreamerBasicType(const char *name, const char *title, Int_t offset, Int_t dtype, const char *typeName)
1129  : TStreamerElement(name,title,offset,dtype,typeName),fCounter(0)
1130 {
1131 }
1132 
1133 ////////////////////////////////////////////////////////////////////////////////
1134 /// TStreamerBasicType dtor.
1135 
1137 {
1138 }
1139 
1140 ////////////////////////////////////////////////////////////////////////////////
1141 /// return address of counter
1142 
1144 {
1147  return 0;
1148 }
1149 
1150 ////////////////////////////////////////////////////////////////////////////////
1151 /// Returns size of this element in bytes.
1152 
1154 {
1155  return fSize;
1156 }
1157 
1158 ////////////////////////////////////////////////////////////////////////////////
1159 /// Stream an object of class TStreamerBasicType.
1160 
1161 void TStreamerBasicType::Streamer(TBuffer &R__b)
1162 {
1163  UInt_t R__s, R__c;
1164  if (R__b.IsReading()) {
1165  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1166  if (R__v > 1) {
1167  R__b.ReadClassBuffer(TStreamerBasicType::Class(), this, R__v, R__s, R__c);
1168  } else {
1169  //====process old versions before automatic schema evolution
1170  TStreamerElement::Streamer(R__b);
1171  R__b.CheckByteCount(R__s, R__c, TStreamerBasicType::IsA());
1172  }
1173  Int_t type = fType;
1176  }
1177  switch(type) {
1178  // basic types
1179  case TVirtualStreamerInfo::kBool: fSize = sizeof(Bool_t); break;
1180  case TVirtualStreamerInfo::kShort: fSize = sizeof(Short_t); break;
1181  case TVirtualStreamerInfo::kInt: fSize = sizeof(Int_t); break;
1182  case TVirtualStreamerInfo::kLong: fSize = sizeof(Long_t); break;
1183  case TVirtualStreamerInfo::kLong64: fSize = sizeof(Long64_t); break;
1184  case TVirtualStreamerInfo::kFloat: fSize = sizeof(Float_t); break;
1185  case TVirtualStreamerInfo::kFloat16: fSize = sizeof(Float_t); break;
1186  case TVirtualStreamerInfo::kDouble: fSize = sizeof(Double_t); break;
1187  case TVirtualStreamerInfo::kDouble32: fSize = sizeof(Double_t); break;
1188  case TVirtualStreamerInfo::kUChar: fSize = sizeof(UChar_t); break;
1189  case TVirtualStreamerInfo::kUShort: fSize = sizeof(UShort_t); break;
1190  case TVirtualStreamerInfo::kUInt: fSize = sizeof(UInt_t); break;
1191  case TVirtualStreamerInfo::kULong: fSize = sizeof(ULong_t); break;
1192  case TVirtualStreamerInfo::kULong64: fSize = sizeof(ULong64_t); break;
1193  case TVirtualStreamerInfo::kBits: fSize = sizeof(UInt_t); break;
1194  case TVirtualStreamerInfo::kCounter: fSize = sizeof(Int_t); break;
1195  case TVirtualStreamerInfo::kChar: fSize = sizeof(Char_t); break;
1196  case TVirtualStreamerInfo::kCharStar: fSize = sizeof(Char_t*); break;
1197  default: return; // If we don't change the size let's not remultiply it.
1198  }
1199  if (fArrayLength) fSize *= GetArrayLength();
1200  } else {
1202  }
1203 }
1204 
1205 
1206 
1207 //______________________________________________________________________________
1208 
1209 //////////////////////////////////////////////////////////////////////////
1210 // //
1211 // TStreamerObject implements streaming of embedded objects whose type //
1212 // inherits from TObject. //
1213 // //
1214 //////////////////////////////////////////////////////////////////////////
1215 
1217 
1218 ////////////////////////////////////////////////////////////////////////////////
1219 /// Default ctor.
1220 
1222 {
1223 }
1224 
1225 ////////////////////////////////////////////////////////////////////////////////
1226 /// Create a TStreamerObject object.
1227 
1228 TStreamerObject::TStreamerObject(const char *name, const char *title, Int_t offset, const char *typeName)
1229  : TStreamerElement(name,title,offset,0,typeName)
1230 {
1232  if (strcmp(typeName,"TObject") == 0) fType = TVirtualStreamerInfo::kTObject;
1233  if (strcmp(typeName,"TNamed") == 0) fType = TVirtualStreamerInfo::kTNamed;
1234  fNewType = fType;
1235  Init();
1236 }
1237 
1238 ////////////////////////////////////////////////////////////////////////////////
1239 /// TStreamerObject dtor.
1240 
1242 {
1243 }
1244 
1245 ////////////////////////////////////////////////////////////////////////////////
1246 /// Setup the element.
1247 
1249 {
1251  if (fClassObject && fClassObject->IsTObject()) {
1253  }
1254 }
1255 
1256 ////////////////////////////////////////////////////////////////////////////////
1257 /// Return the proper include for this element.
1258 
1259 const char *TStreamerObject::GetInclude() const
1260 {
1261  TClass *cl = GetClassPointer();
1262  if (cl && cl->HasInterpreterInfo()) {
1263  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1264  } else {
1265  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1266  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1267  }
1268  return IncludeNameBuffer();
1269 }
1270 
1271 ////////////////////////////////////////////////////////////////////////////////
1272 /// Returns size of object class in bytes.
1273 
1275 {
1276  TClass *cl = GetClassPointer();
1277  Int_t classSize = 8;
1278  if (cl) classSize = cl->Size();
1279  if (fArrayLength) return fArrayLength*classSize;
1280  return classSize;
1281 }
1282 
1283 ////////////////////////////////////////////////////////////////////////////////
1284 /// Stream an object of class TStreamerObject.
1285 
1286 void TStreamerObject::Streamer(TBuffer &R__b)
1287 {
1288  UInt_t R__s, R__c;
1289  if (R__b.IsReading()) {
1290  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1291  if (R__v > 1) {
1292  R__b.ReadClassBuffer(TStreamerObject::Class(), this, R__v, R__s, R__c);
1293  return;
1294  }
1295  //====process old versions before automatic schema evolution
1296  TStreamerElement::Streamer(R__b);
1297  R__b.CheckByteCount(R__s, R__c, TStreamerObject::IsA());
1298  } else {
1300  }
1301 }
1302 
1303 
1304 //______________________________________________________________________________
1305 
1306 //////////////////////////////////////////////////////////////////////////
1307 // //
1308 // TStreamerObjectAny implement streaming of embedded object not //
1309 // inheriting from TObject. //
1310 // //
1311 //////////////////////////////////////////////////////////////////////////
1312 
1314 
1315 ////////////////////////////////////////////////////////////////////////////////
1316 /// Default ctor.
1317 
1319 {
1320 }
1321 
1322 ////////////////////////////////////////////////////////////////////////////////
1323 /// Create a TStreamerObjectAny object.
1324 
1325 TStreamerObjectAny::TStreamerObjectAny(const char *name, const char *title, Int_t offset, const char *typeName)
1326  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kAny,typeName)
1327 {
1328  Init();
1329 }
1330 
1331 ////////////////////////////////////////////////////////////////////////////////
1332 /// TStreamerObjectAny dtor.
1333 
1335 {
1336 }
1337 
1338 ////////////////////////////////////////////////////////////////////////////////
1339 /// Setup the element.
1340 
1342 {
1344  if (fClassObject && fClassObject->IsTObject()) {
1346  }
1347 }
1348 
1349 ////////////////////////////////////////////////////////////////////////////////
1350 /// Return the proper include for this element.
1351 
1353 {
1354  TClass *cl = GetClassPointer();
1355  if (cl && cl->HasInterpreterInfo()) {
1356  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1357  } else {
1358  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1359  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1360  }
1361  return IncludeNameBuffer();
1362 }
1363 
1364 ////////////////////////////////////////////////////////////////////////////////
1365 /// Returns size of anyclass in bytes.
1366 
1368 {
1369  TClass *cl = GetClassPointer();
1370  Int_t classSize = 8;
1371  if (cl) classSize = cl->Size();
1372  if (fArrayLength) return fArrayLength*classSize;
1373  return classSize;
1374 }
1375 
1376 ////////////////////////////////////////////////////////////////////////////////
1377 /// Stream an object of class TStreamerObjectAny.
1378 
1379 void TStreamerObjectAny::Streamer(TBuffer &R__b)
1380 {
1381  UInt_t R__s, R__c;
1382  if (R__b.IsReading()) {
1383  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1384  if (R__v > 1) {
1385  R__b.ReadClassBuffer(TStreamerObjectAny::Class(), this, R__v, R__s, R__c);
1386  return;
1387  }
1388  //====process old versions before automatic schema evolution
1389  TStreamerElement::Streamer(R__b);
1390  R__b.CheckByteCount(R__s, R__c, TStreamerObjectAny::IsA());
1391  } else {
1393  }
1394 }
1395 
1396 
1397 
1398 //______________________________________________________________________________
1399 
1400 //////////////////////////////////////////////////////////////////////////
1401 // //
1402 // TStreamerObjectPointer implements streaming of pointer to object //
1403 // inheriting from TObject. //
1404 // //
1405 //////////////////////////////////////////////////////////////////////////
1406 
1408 
1409 ////////////////////////////////////////////////////////////////////////////////
1410 /// Default ctor.
1411 
1413 {
1414 }
1415 
1416 ////////////////////////////////////////////////////////////////////////////////
1417 /// Create a TStreamerObjectPointer object.
1418 
1420  Int_t offset, const char *typeName)
1421  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kObjectP,typeName)
1422 {
1423  if (strncmp(title,"->",2) == 0) fType = TVirtualStreamerInfo::kObjectp;
1424  fNewType = fType;
1425  Init();
1426 }
1427 
1428 ////////////////////////////////////////////////////////////////////////////////
1429 /// TStreamerObjectPointer dtor.
1430 
1432 {
1433 }
1434 
1435 ////////////////////////////////////////////////////////////////////////////////
1436 /// Setup the element.
1437 
1439 {
1441  if (fClassObject && fClassObject->IsTObject()) {
1443  }
1444 }
1445 
1446 ////////////////////////////////////////////////////////////////////////////////
1447 /// Return the proper include for this element.
1448 
1450 {
1451  TClass *cl = GetClassPointer();
1452  if (cl && cl->HasInterpreterInfo()) {
1453  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1454  } else {
1455  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1456  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1457  }
1458 
1459  return IncludeNameBuffer();
1460 }
1461 
1462 ////////////////////////////////////////////////////////////////////////////////
1463 /// Returns size of objectpointer in bytes.
1464 
1466 {
1467  if (fArrayLength) return fArrayLength*sizeof(void *);
1468  return sizeof(void *);
1469 }
1470 
1471 ////////////////////////////////////////////////////////////////////////////////
1472 /// Set number of array dimensions.
1473 
1475 {
1476  fArrayDim = dim;
1477  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
1478  fNewType = fType;
1479 }
1480 
1481 ////////////////////////////////////////////////////////////////////////////////
1482 /// Stream an object of class TStreamerObjectPointer.
1483 
1484 void TStreamerObjectPointer::Streamer(TBuffer &R__b)
1485 {
1486  UInt_t R__s, R__c;
1487  if (R__b.IsReading()) {
1488  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1489  if (R__v > 1) {
1490  R__b.ReadClassBuffer(TStreamerObjectPointer::Class(), this, R__v, R__s, R__c);
1491  return;
1492  }
1493  //====process old versions before automatic schema evolution
1494  TStreamerElement::Streamer(R__b);
1495  R__b.CheckByteCount(R__s, R__c, TStreamerObjectPointer::IsA());
1496  } else {
1498  }
1499 }
1500 
1501 
1502 //______________________________________________________________________________
1503 
1504 //////////////////////////////////////////////////////////////////////////
1505 // //
1506 // TStreamerObjectPointerAny implements streaming of pointer to object //
1507 // not inheriting from TObject. //
1508 // //
1509 //////////////////////////////////////////////////////////////////////////
1510 
1512 
1513 ////////////////////////////////////////////////////////////////////////////////
1514 /// Default ctor.
1515 
1517 {
1518 }
1519 
1520 ////////////////////////////////////////////////////////////////////////////////
1521 /// Create a TStreamerObjectAnyPointer object.
1522 
1524  Int_t offset, const char *typeName)
1525  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kAnyP,typeName)
1526 {
1527  if (strncmp(title,"->",2) == 0) fType = TVirtualStreamerInfo::kAnyp;
1528  fNewType = fType;
1529  Init();
1530 }
1531 
1532 ////////////////////////////////////////////////////////////////////////////////
1533 /// TStreamerObjectAnyPointer dtor.
1534 
1536 {
1537 }
1538 
1539 ////////////////////////////////////////////////////////////////////////////////
1540 /// Setup the element.
1541 
1543 {
1545  if (fClassObject && fClassObject->IsTObject()) {
1547  }
1548 }
1549 
1550 ////////////////////////////////////////////////////////////////////////////////
1551 /// Return the proper include for this element.
1552 
1554 {
1555  TClass *cl = GetClassPointer();
1556  if (cl && cl->HasInterpreterInfo()) {
1557  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1558  } else {
1559  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1560  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1561  }
1562 
1563  return IncludeNameBuffer();
1564 }
1565 
1566 ////////////////////////////////////////////////////////////////////////////////
1567 /// Returns size of objectpointer in bytes.
1568 
1570 {
1571  if (fArrayLength) return fArrayLength*sizeof(void *);
1572  return sizeof(void *);
1573 }
1574 
1575 ////////////////////////////////////////////////////////////////////////////////
1576 /// Set number of array dimensions.
1577 
1579 {
1580  fArrayDim = dim;
1581  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
1582  fNewType = fType;
1583 }
1584 
1585 ////////////////////////////////////////////////////////////////////////////////
1586 /// Stream an object of class TStreamerObjectAnyPointer.
1587 
1588 void TStreamerObjectAnyPointer::Streamer(TBuffer &R__b)
1589 {
1590  if (R__b.IsReading()) {
1592  } else {
1594  }
1595 }
1596 
1597 
1598 //______________________________________________________________________________
1599 
1600 //////////////////////////////////////////////////////////////////////////
1601 // //
1602 // TSreamerString implements streaming of TString. //
1603 // //
1604 //////////////////////////////////////////////////////////////////////////
1605 
1607 
1608 ////////////////////////////////////////////////////////////////////////////////
1609 /// Default ctor.
1610 
1612 {
1613 }
1614 
1615 ////////////////////////////////////////////////////////////////////////////////
1616 /// Create a TStreamerString object.
1617 
1618 TStreamerString::TStreamerString(const char *name, const char *title, Int_t offset)
1619  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kTString,"TString")
1620 {
1621 }
1622 
1623 ////////////////////////////////////////////////////////////////////////////////
1624 /// TStreamerString dtor.
1625 
1627 {
1628 }
1629 
1630 ////////////////////////////////////////////////////////////////////////////////
1631 /// Return the proper include for this element.
1632 
1633 const char *TStreamerString::GetInclude() const
1634 {
1635  IncludeNameBuffer().Form("<%s>","TString.h");
1636  return IncludeNameBuffer();
1637 }
1638 
1639 ////////////////////////////////////////////////////////////////////////////////
1640 /// Returns size of anyclass in bytes.
1641 
1643 {
1644  if (fArrayLength) return fArrayLength*sizeof(TString);
1645  return sizeof(TString);
1646 }
1647 
1648 ////////////////////////////////////////////////////////////////////////////////
1649 /// Stream an object of class TStreamerString.
1650 
1651 void TStreamerString::Streamer(TBuffer &R__b)
1652 {
1653  UInt_t R__s, R__c;
1654  if (R__b.IsReading()) {
1655  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1656  if (R__v > 1) {
1657  R__b.ReadClassBuffer(TStreamerString::Class(), this, R__v, R__s, R__c);
1658  return;
1659  }
1660  //====process old versions before automatic schema evolution
1661  TStreamerElement::Streamer(R__b);
1662  R__b.CheckByteCount(R__s, R__c, TStreamerString::IsA());
1663  } else {
1665  }
1666 }
1667 
1668 //______________________________________________________________________________
1669 
1670 //////////////////////////////////////////////////////////////////////////
1671 // //
1672 // TStreamerSTL implements streamer of STL container. //
1673 // //
1674 //////////////////////////////////////////////////////////////////////////
1675 
1677 
1678 ////////////////////////////////////////////////////////////////////////////////
1679 /// Default ctor.
1680 
1681 TStreamerSTL::TStreamerSTL() : fSTLtype(0),fCtype(0)
1682 {
1683 }
1684 
1685 ////////////////////////////////////////////////////////////////////////////////
1686 /// Create a TStreamerSTL object.
1687 
1688 TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
1689  const char *typeName, const TVirtualCollectionProxy &proxy, Bool_t dmPointer)
1690  : TStreamerElement(name,title,offset,ROOT::kSTLany,typeName)
1691 {
1693 
1694  if (name==typeName /* intentional pointer comparison */
1695  || strcmp(name,typeName)==0) {
1696  // We have a base class.
1697  fName = fTypeName;
1698  }
1699  fSTLtype = proxy.GetCollectionType();
1700  fCtype = 0;
1701 
1702  if (dmPointer) fSTLtype += TVirtualStreamerInfo::kOffsetP;
1703 
1704  if (fSTLtype == ROOT::kSTLbitset) {
1705  // Nothing to check
1706  } else if (proxy.GetValueClass()) {
1709  } else {
1710  fCtype = proxy.GetType();
1712  }
1714 }
1715 
1716 ////////////////////////////////////////////////////////////////////////////////
1717 /// Create a TStreamerSTL object.
1718 
1719 TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
1720  const char *typeName, const char *trueType, Bool_t dmPointer)
1721  : TStreamerElement(name,title,offset,ROOT::kSTLany,typeName)
1722 {
1723  const char *t = trueType;
1724  if (!t || !*t) t = typeName;
1725 
1727 
1728  if (name==typeName /* intentional pointer comparison */
1729  || strcmp(name,typeName)==0) {
1730  // We have a base class.
1731  fName = fTypeName;
1732  }
1733 
1734  Int_t nch = strlen(t);
1735  char *s = new char[nch+1];
1736  strlcpy(s,t,nch+1);
1737  char *sopen = strchr(s,'<');
1738  if (sopen == 0) {
1739  Fatal("TStreamerSTL","For %s, the type name (%s) is seemingly not a template (template argument not found)", name, s);
1740  return;
1741  }
1742  *sopen = 0; sopen++;
1743  // We are looking for the first arguments of the STL container, because
1744  // this arguments can be a templates we need to count the < and >
1745  char* current=sopen;
1746  for(int count = 0; *current!='\0'; current++) {
1747  if (*current=='<') count++;
1748  if (*current=='>') {
1749  if (count==0) break;
1750  count--;
1751  }
1752  if (*current==',' && count==0) break;
1753  }
1754  char *sclose = current; *sclose = 0; sclose--;
1755  char *sconst = strstr(sopen,"const ");
1756  char *sbracket = strstr(sopen,"<");
1757  if (sconst && (sbracket==0 || sconst < sbracket)) {
1758  // the string "const" may be part of the classname!
1759  char *pconst = sconst-1;
1760  if (*pconst == ' ' || *pconst == '<' || *pconst == '*' || *pconst == '\0') sopen = sconst + 5;
1761  }
1763  fCtype = 0;
1764  if (fSTLtype == ROOT::kNotSTL) { delete [] s; return;}
1765  if (dmPointer) fSTLtype += TVirtualStreamerInfo::kOffsetP;
1766 
1767  // find STL contained type
1768  while (*sopen==' ') sopen++;
1769  Bool_t isPointer = kFALSE;
1770  // Find stars outside of any template definitions in the
1771  // first template argument.
1772  char *star = strrchr(sopen,'>');
1773  if (star) star = strchr(star,'*');
1774  else star = strchr(sopen,'*');
1775  if (star) {
1776  isPointer = kTRUE;
1777  *star = 0;
1778  sclose = star - 1;
1779  }
1780  while (*sclose == ' ') {*sclose = 0; sclose--;}
1781 
1782 
1783  TDataType *dt = (TDataType*)gROOT->GetListOfTypes()->FindObject(sopen);
1784  if (fSTLtype == ROOT::kSTLbitset) {
1785  // Nothing to check
1786  } else if (dt) {
1787  fCtype = dt->GetType();
1788  if (isPointer) fCtype += TVirtualStreamerInfo::kOffsetP;
1789  } else {
1790  // this could also be a nested enums ... which should work ... be let's see.
1791  TClass *cl = TClass::GetClass(sopen);
1792  if (cl) {
1793  if (isPointer) fCtype = TVirtualStreamerInfo::kObjectp;
1795  } else {
1796  if (gCling->ClassInfo_IsEnum(sopen)) {
1797  if (isPointer) fCtype += TVirtualStreamerInfo::kOffsetP;
1798  } else {
1799  if(strcmp(sopen,"string")) {
1800  // This case can happens when 'this' is a TStreamerElement for
1801  // a STL container containing something for which we do not have
1802  // a TVirtualStreamerInfo (This happens in particular is the collection
1803  // objects themselves are always empty) and we do not have the
1804  // dictionary/shared library for the container.
1805  if (GetClassPointer() && GetClassPointer()->IsLoaded()) {
1806  Warning("TStreamerSTL","For %s we could not find any information about the type %s %d %s",fTypeName.Data(),sopen,fSTLtype,s);
1807  }
1808  }
1809  }
1810  }
1811  }
1812  delete [] s;
1813 
1815 }
1816 
1817 ////////////////////////////////////////////////////////////////////////////////
1818 /// TStreamerSTL dtor.
1819 
1821 {
1822 }
1823 
1824 ////////////////////////////////////////////////////////////////////////////////
1825 /// We can not split STL's which are inside a variable size array.
1826 /// At least for now.
1827 
1829 {
1830  if (IsaPointer()) {
1831  if (GetTitle()[0]=='[') return kTRUE; // can not split variable size array
1832  return kTRUE;
1833  }
1834 
1835  if (GetArrayDim()>=1 && GetArrayLength()>1) return kTRUE;
1836 
1837  if (TStreamerElement::CannotSplit()) return kTRUE;
1838 
1839  return kFALSE;
1840 }
1841 
1842 ////////////////////////////////////////////////////////////////////////////////
1843 /// Return true if the data member is a pointer.
1844 
1846 {
1847  const char *type_name = GetTypeName();
1848  if ( type_name[strlen(type_name)-1]=='*' ) return kTRUE;
1849  else return kFALSE;
1850 }
1851 
1852 
1853 ////////////////////////////////////////////////////////////////////////////////
1854 /// Return kTRUE if the element represent a base class.
1855 
1857 {
1858  TString ts(GetName());
1859 
1860  if (strcmp(ts.Data(),GetTypeName())==0) return kTRUE;
1861  if (strcmp(ts.Data(),GetTypeNameBasic())==0) return kTRUE;
1862  return kFALSE;
1863 }
1864 ////////////////////////////////////////////////////////////////////////////////
1865 /// Returns size of STL container in bytes.
1866 
1868 {
1869  // Since the STL collection might or might not be emulated and that the
1870  // sizeof the object depends on this, let's just always retrieve the
1871  // current size!
1872  TClass *cl = GetClassPointer();
1873  UInt_t size = 0;
1874  if (cl==0) {
1875  if (!TestBit(kWarned)) {
1876  Error("GetSize","Could not find the TClass for %s.\n"
1877  "This is likely to have been a typedef, if possible please declare it in CINT to work around the issue\n",fTypeName.Data());
1878  const_cast<TStreamerSTL*>(this)->SetBit(kWarned);
1879  }
1880  } else {
1881  size = cl->Size();
1882  }
1883 
1884  if (fArrayLength) return fArrayLength*size;
1885  return size;
1886 }
1887 
1888 ////////////////////////////////////////////////////////////////////////////////
1889 /// Print the content of the element.
1890 
1892 {
1893  TString name(kMaxLen);
1894  TString cdim;
1895  name = GetName();
1896  for (Int_t i=0;i<fArrayDim;i++) {
1897  cdim.Form("[%d]",fMaxIndex[i]);
1898  name += cdim;
1899  }
1900  TString sequenceType;
1901  GetSequenceType(sequenceType);
1902  if (sequenceType.Length()) {
1903  sequenceType.Prepend(" (");
1904  sequenceType += ") ";
1905  }
1906  printf(" %-14s %-15s offset=%3d type=%2d %s,stl=%d, ctype=%d, %-20s\n",
1907  GetTypeName(),name.Data(),fOffset,fType,sequenceType.Data(),
1909 }
1910 
1911 ////////////////////////////////////////////////////////////////////////////////
1912 /// Return the proper include for this element.
1913 
1914 const char *TStreamerSTL::GetInclude() const
1915 {
1916  if (fSTLtype == ROOT::kSTLvector) IncludeNameBuffer().Form("<%s>","vector");
1917  else if (fSTLtype == ROOT::kSTLlist) IncludeNameBuffer().Form("<%s>","list");
1918  else if (fSTLtype == ROOT::kSTLforwardlist) IncludeNameBuffer().Form("<%s>","forward_list");
1919  else if (fSTLtype == ROOT::kSTLdeque) IncludeNameBuffer().Form("<%s>","deque");
1920  else if (fSTLtype == ROOT::kSTLmap) IncludeNameBuffer().Form("<%s>","map");
1921  else if (fSTLtype == ROOT::kSTLmultimap) IncludeNameBuffer().Form("<%s>","map");
1922  else if (fSTLtype == ROOT::kSTLset) IncludeNameBuffer().Form("<%s>","set");
1923  else if (fSTLtype == ROOT::kSTLmultiset) IncludeNameBuffer().Form("<%s>","set");
1924  else if (fSTLtype == ROOT::kSTLunorderedset) IncludeNameBuffer().Form("<%s>","unordered_set");
1925  else if (fSTLtype == ROOT::kSTLunorderedmultiset) IncludeNameBuffer().Form("<%s>","unordered_set");
1926  else if (fSTLtype == ROOT::kSTLunorderedmap) IncludeNameBuffer().Form("<%s>","unordered_map");
1927  else if (fSTLtype == ROOT::kSTLunorderedmultimap) IncludeNameBuffer().Form("<%s>","unordered_map");
1928  else if (fSTLtype == ROOT::kSTLbitset) IncludeNameBuffer().Form("<%s>","bitset");
1929  return IncludeNameBuffer();
1930 }
1931 
1932 ////////////////////////////////////////////////////////////////////////////////
1933 /// Set pointer to Streamer function for this element
1934 /// NOTE: we do not take ownership
1935 
1937 {
1938  fStreamer = streamer;
1939 }
1940 
1941 ////////////////////////////////////////////////////////////////////////////////
1942 /// Stream an object of class TStreamerSTL.
1943 
1944 void TStreamerSTL::Streamer(TBuffer &R__b)
1945 {
1946  UInt_t R__s, R__c;
1947  if (R__b.IsReading()) {
1948  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1949  if (R__v > 2) {
1950  R__b.ReadClassBuffer(TStreamerSTL::Class(), this, R__v, R__s, R__c);
1951  } else {
1952  //====process old versions before automatic schema evolution
1953  TStreamerElement::Streamer(R__b);
1954  R__b >> fSTLtype;
1955  R__b >> fCtype;
1956  R__b.CheckByteCount(R__s, R__c, TStreamerSTL::IsA());
1957  }
1958  // In old versions (prior to v6.24/02) the value of fArrayDim was not stored properly.
1959  if (fArrayDim == 0 && fArrayLength > 0) {
1960  while(fArrayDim < 5 && fMaxIndex[fArrayDim] != 0) {
1961  ++fArrayDim;
1962  }
1963  }
1965  // For a long time those where inverted in TStreamerElement
1966  // compared to the other definitions. When we moved to version '4',
1967  // this got standardized, but we now need to fix it.
1968 
1969  if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) {
1971  } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) {
1973  }
1974  }
1975 
1978  if (GetArrayLength() > 0) {
1980  }
1981  if (R__b.GetParent()) { // Avoid resetting during a cloning.
1983  SetBit(kDoNotDelete); // For backward compatibility
1984  } else if ( fSTLtype == ROOT::kSTLmap || fSTLtype == ROOT::kSTLmultimap) {
1985  // Here we would like to set the bit only if one of the element of the pair is a pointer,
1986  // however we have no easy to determine this short of parsing the class name.
1987  SetBit(kDoNotDelete); // For backward compatibility
1988  }
1989  }
1990  return;
1991  } else {
1992  // To enable forward compatibility we actually save with the old value
1993  TStreamerSTL tmp;
1994  // Hand coded copy constructor since the 'normal' one are intentionally
1995  // deleted.
1996  tmp.fName = fName;
1997  tmp.fTitle = fTitle;
1999  tmp.fSize = fSize;
2000  tmp.fArrayDim = fArrayDim;
2001  tmp.fArrayLength = fArrayLength;
2002  for(int i = 0; i < 5; ++i)
2003  tmp.fMaxIndex[i] = fMaxIndex[i];
2004  tmp.fTypeName = fTypeName;
2005  tmp.fSTLtype = fSTLtype;
2006  tmp.fCtype = fCtype;
2007  R__b.WriteClassBuffer(TStreamerSTL::Class(), &tmp);
2008  }
2009 }
2010 
2011 //______________________________________________________________________________
2012 
2013 //////////////////////////////////////////////////////////////////////////
2014 // //
2015 // TStreamerSTLstring implements streaming std::string. //
2016 // //
2017 //////////////////////////////////////////////////////////////////////////
2018 
2020 
2021 ////////////////////////////////////////////////////////////////////////////////
2022 /// Default ctor.
2023 
2025 {
2026 }
2027 
2028 ////////////////////////////////////////////////////////////////////////////////
2029 /// Create a TStreamerSTLstring object.
2030 
2031 TStreamerSTLstring::TStreamerSTLstring(const char *name, const char *title, Int_t offset,
2032  const char *typeName, Bool_t dmPointer)
2033  : TStreamerSTL()
2034 {
2035  SetName(name);
2036  SetTitle(title);
2037 
2038  if (dmPointer) {
2040  } else {
2042  }
2043 
2044  fNewType = fType;
2045  fOffset = offset;
2048  fTypeName= typeName;
2049 
2050 }
2051 
2052 ////////////////////////////////////////////////////////////////////////////////
2053 /// TStreamerSTLstring dtor.
2054 
2056 {
2057 }
2058 
2059 ////////////////////////////////////////////////////////////////////////////////
2060 /// Return the proper include for this element.
2061 
2063 {
2064  IncludeNameBuffer() = "<string>";
2065  return IncludeNameBuffer();
2066 }
2067 
2068 ////////////////////////////////////////////////////////////////////////////////
2069 /// Returns size of anyclass in bytes.
2070 
2072 {
2073  if (fArrayLength) return fArrayLength*sizeof(string);
2074  return sizeof(string);
2075 }
2076 
2077 ////////////////////////////////////////////////////////////////////////////////
2078 /// Stream an object of class TStreamerSTLstring.
2079 
2080 void TStreamerSTLstring::Streamer(TBuffer &R__b)
2081 {
2082  UInt_t R__s, R__c;
2083  if (R__b.IsReading()) {
2084  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
2085  if (R__v > 1) {
2086  R__b.ReadClassBuffer(TStreamerSTLstring::Class(), this, R__v, R__s, R__c);
2087  return;
2088  }
2089  //====process old versions before automatic schema evolution
2090  TStreamerSTL::Streamer(R__b);
2091  R__b.CheckByteCount(R__s, R__c, TStreamerSTLstring::IsA());
2092  } else {
2094  }
2095 }
2096 
2097 //______________________________________________________________________________
2098 
2099 ///////////////////////////////////////////////////////////////////////////////
2100 // //
2101 // TStreamerArtificial implements StreamerElement injected by a TSchemaRule. //
2102 // //
2103 ///////////////////////////////////////////////////////////////////////////////
2104 
2106 
2107 void TStreamerArtificial::Streamer(TBuffer& /* R__b */)
2108 {
2109  // Avoid streaming the synthetic/artificial streamer elements.
2110 
2111  // Intentionally, nothing to do at all.
2112  return;
2113 }
2114 
2116 {
2117  // Return the read function if any.
2118 
2119  return fReadFunc;
2120 }
2121 
2123 {
2124  // Return the raw read function if any.
2125 
2126  return fReadRawFunc;
2127 }
TVirtualStreamerInfo::kCacheDelete
@ kCacheDelete
Definition: TVirtualStreamerInfo.h:100
TStreamerBase::IsBase
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
Definition: TStreamerElement.cxx:723
TVirtualStreamerInfo::kLong64
@ kLong64
Definition: TVirtualStreamerInfo.h:88
TBuffer::ClassMember
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=0
TStreamerBasicType::~TStreamerBasicType
virtual ~TStreamerBasicType()
TStreamerBasicType dtor.
Definition: TStreamerElement.cxx:1136
TVirtualStreamerInfo::kBits
@ kBits
Definition: TVirtualStreamerInfo.h:87
ROOT::kSTLdeque
@ kSTLdeque
Definition: ESTLType.h:32
TStreamerLoop::fCountVersion
Int_t fCountVersion
Definition: TStreamerElement.h:243
TStreamerElement::fXmax
Double_t fXmax
Minimum of data member if a range is specified [xmin,xmax,nbits].
Definition: TStreamerElement.h:53
TVirtualStreamerInfo::kUInt
@ kUInt
Definition: TVirtualStreamerInfo.h:87
TStreamerElement::SetStreamer
virtual void SetStreamer(TMemberStreamer *streamer)
set pointer to Streamer function for this element
Definition: TStreamerElement.cxx:496
TVirtualCollectionProxy.h
ROOT::kSTLvector
@ kSTLvector
Definition: ESTLType.h:30
TClass::GetCollectionProxy
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Definition: TClass.cxx:2875
ROOT::kSTLset
@ kSTLset
Definition: ESTLType.h:35
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TStreamerBase::fConvStreamerFunc
ClassConvStreamerFunc_t fConvStreamerFunc
Pointer to a wrapper around a custom streamer member function.
Definition: TStreamerElement.h:163
TStreamerBase::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:731
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:187
ROOT::kSTLunorderedmultimap
@ kSTLunorderedmultimap
Definition: ESTLType.h:45
ROOT::kSTLbitset
@ kSTLbitset
Definition: ESTLType.h:37
TStreamerElement::ls
virtual void ls(Option_t *option="") const
Print the content of the element.
Definition: TStreamerElement.cxx:456
TStreamerSTL::IsaPointer
Bool_t IsaPointer() const
Return true if the data member is a pointer.
Definition: TStreamerElement.cxx:1845
Version_t
short Version_t
Definition: RtypesCore.h:65
TStreamerArtificial::GetReadFunc
ROOT::TSchemaRule::ReadFuncPtr_t GetReadFunc()
Definition: TStreamerElement.cxx:2115
TStreamerLoop::fCountName
TString fCountName
Definition: TStreamerElement.h:244
snprintf
#define snprintf
Definition: civetweb.c:1540
TStreamerBase::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:679
TStreamerBase::WriteBuffer
Int_t WriteBuffer(TBuffer &b, char *pointer)
Write the base class into the buffer.
Definition: TStreamerElement.cxx:855
TStreamerSTL::TStreamerSTL
TStreamerSTL()
Default ctor.
Definition: TStreamerElement.cxx:1681
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
Option_t
const char Option_t
Definition: RtypesCore.h:66
TStreamerBasicPointer::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:961
TStreamerSTL::SetStreamer
virtual void SetStreamer(TMemberStreamer *streamer)
Set pointer to Streamer function for this element NOTE: we do not take ownership.
Definition: TStreamerElement.cxx:1936
TRef::AddExec
static Int_t AddExec(const char *name)
If Exec with name does not exist in the list of Execs, it is created.
Definition: TRef.cxx:339
TStreamerElement::GetTypeName
const char * GetTypeName() const
Definition: TStreamerElement.h:123
TVirtualStreamerInfo::GetClass
virtual TClass * GetClass() const =0
TStreamerSTLstring
Definition: TStreamerElement.h:426
TVirtualStreamerInfo::kUChar
@ kUChar
Definition: TVirtualStreamerInfo.h:87
TStreamerElement::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Initliaze the element.
Definition: TStreamerElement.cxx:404
TString::Strip
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
Definition: TString.cxx:1128
TClass::Size
Int_t Size() const
Return size of object of this class.
Definition: TClass.cxx:5688
TString::Prepend
TString & Prepend(const char *cs)
Definition: TString.h:661
TStreamerBasicPointer::GetSize
Int_t GetSize() const
Returns size of basicpointer in bytes.
Definition: TStreamerElement.cxx:949
UShort_t
unsigned short UShort_t
Definition: RtypesCore.h:40
TStreamerBase::TStreamerBase
TStreamerBase()
Definition: TStreamerElement.cxx:608
TStreamerElement::fSize
Int_t fSize
Definition: TStreamerElement.h:41
TVirtualStreamerInfo::kULong64
@ kULong64
Definition: TVirtualStreamerInfo.h:88
TList::FindObject
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition: TList.cxx:578
TString::Data
const char * Data() const
Definition: TString.h:369
TStreamerObjectAny
Definition: TStreamerElement.h:313
TBuffer::ReadStaticArray
virtual Int_t ReadStaticArray(Bool_t *b)=0
TStreamerBasicPointer::~TStreamerBasicPointer
virtual ~TStreamerBasicPointer()
TStreamerBasicPointer dtor.
Definition: TStreamerElement.cxx:927
TBuffer::ReadFastArray
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TStreamerSTLstring::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:2062
TStreamerElement::fArrayLength
Int_t fArrayLength
Definition: TStreamerElement.h:42
TNamed::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
TStreamerElement::kCache
@ kCache
Definition: TStreamerElement.h:78
TStreamerElement::kDoNotDelete
@ kDoNotDelete
Definition: TStreamerElement.h:82
TStreamerSTL::GetSize
Int_t GetSize() const
Returns size of STL container in bytes.
Definition: TStreamerElement.cxx:1867
ROOT::kSTLunorderedmultiset
@ kSTLunorderedmultiset
Definition: ESTLType.h:43
ROOT::kNotSTL
@ kNotSTL
Definition: ESTLType.h:29
TStreamerElement.h
TClassEdit::ShortType
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
Definition: TClassEdit.cxx:1288
TDataType::GetType
Int_t GetType() const
Definition: TDataType.h:68
ExtractClassName
static TString ExtractClassName(const TString &type_name)
Definition: TStreamerElement.cxx:52
TStreamerObjectPointer::~TStreamerObjectPointer
virtual ~TStreamerObjectPointer()
TStreamerObjectPointer dtor.
Definition: TStreamerElement.cxx:1431
TBuffer::ReadClassBuffer
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TStreamerElement::fTObjectOffset
Int_t fTObjectOffset
element offset in class
Definition: TStreamerElement.h:46
xmax
float xmax
Definition: THbookFile.cxx:95
TVirtualStreamerInfo::kDouble32
@ kDouble32
Definition: TVirtualStreamerInfo.h:86
Long64_t
long long Long64_t
Definition: RtypesCore.h:80
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:893
TStreamerObject::TStreamerObject
TStreamerObject()
Default ctor.
Definition: TStreamerElement.cxx:1221
TVirtualStreamerInfo::kFloat
@ kFloat
Definition: TVirtualStreamerInfo.h:85
TVirtualStreamerInfo::kFloat16
@ kFloat16
Definition: TVirtualStreamerInfo.h:88
TVirtualStreamerInfo::kSTL
@ kSTL
Definition: TVirtualStreamerInfo.h:94
TVirtualStreamerInfo::kObjectp
@ kObjectp
Definition: TVirtualStreamerInfo.h:89
TVirtualStreamerInfo::kOffsetL
@ kOffsetL
Definition: TVirtualStreamerInfo.h:84
ROOT::TSchemaRule::ReadFuncPtr_t
void(* ReadFuncPtr_t)(char *, TVirtualObject *)
Definition: TSchemaRule.h:40
TVirtualStreamerInfo::GetElementCounter
static TStreamerBasicType * GetElementCounter(const char *countName, TClass *cl)
Get pointer to a TStreamerBasicType in TClass *cl static function.
Definition: TVirtualStreamerInfo.cxx:117
TStreamerBasicPointer::fCounter
TStreamerBasicType * fCounter
Definition: TStreamerElement.h:209
TStreamerBasicType::GetSize
Int_t GetSize() const
Returns size of this element in bytes.
Definition: TStreamerElement.cxx:1153
TStreamerObjectPointer::GetSize
Int_t GetSize() const
Returns size of objectpointer in bytes.
Definition: TStreamerElement.cxx:1465
TDataMember.h
Float_t
float Float_t
Definition: RtypesCore.h:57
ROOT::kSTLany
@ kSTLany
Definition: ESTLType.h:48
TStreamerElement::TStreamerElement
TStreamerElement()
Default ctor.
Definition: TStreamerElement.cxx:196
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TStreamerBase::fStreamerFunc
ClassStreamerFunc_t fStreamerFunc
pointer to new base class if renamed
Definition: TStreamerElement.h:162
TObject::Fatal
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Definition: TObject.cxx:921
TVirtualStreamerInfo::kCounter
@ kCounter
Definition: TVirtualStreamerInfo.h:84
TStreamerString::~TStreamerString
virtual ~TStreamerString()
TStreamerString dtor.
Definition: TStreamerElement.cxx:1626
TVirtualStreamerInfo::kAnyp
@ kAnyp
Definition: TVirtualStreamerInfo.h:90
TStreamerSTLstring::GetSize
Int_t GetSize() const
Returns size of anyclass in bytes.
Definition: TStreamerElement.cxx:2071
TStreamerString::GetSize
Int_t GetSize() const
Returns size of anyclass in bytes.
Definition: TStreamerElement.cxx:1642
TStreamerObjectAny::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1341
Int_t
int Int_t
Definition: RtypesCore.h:45
TDataMember
All ROOT classes may have RTTI (run time type identification) support added.
Definition: TDataMember.h:31
TStreamerElement::IsaPointer
virtual Bool_t IsaPointer() const
Definition: TStreamerElement.h:129
TObject::GetUniqueID
virtual UInt_t GetUniqueID() const
Return the unique object id.
Definition: TObject.cxx:377
TStreamerString
Definition: TStreamerElement.h:374
TStreamerObjectPointer::Init
virtual void Init(TVirtualStreamerInfo *obj=nullptr)
Setup the element.
Definition: TStreamerElement.cxx:1438
TNamed::fName
TString fName
Definition: TNamed.h:32
TStreamerArtificial::fReadFunc
ROOT::TSchemaRule::ReadFuncPtr_t fReadFunc
Definition: TStreamerElement.h:456
TString::Contains
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:624
TStreamerElement::SetType
virtual void SetType(Int_t dtype)
Definition: TStreamerElement.h:143
TClass::GetClassVersion
Version_t GetClassVersion() const
Definition: TClass.h:417
TClass::FindConversionStreamerInfo
TVirtualStreamerInfo * FindConversionStreamerInfo(const char *onfile_classname, UInt_t checksum) const
Return a Conversion StreamerInfo from the class 'classname' for the layout represented by 'checksum' ...
Definition: TClass.cxx:7136
TStreamerElement::fArrayDim
Int_t fArrayDim
Definition: TStreamerElement.h:43
TStreamerBasicPointer::GetMethod
ULongptr_t GetMethod() const
return offset of counter
Definition: TStreamerElement.cxx:934
TVirtualStreamerInfo::kShort
@ kShort
Definition: TVirtualStreamerInfo.h:85
TString::Length
Ssiz_t Length() const
Definition: TString.h:410
TVirtualCollectionProxy::GetValueClass
virtual TClass * GetValueClass() const =0
TBaseClass.h
TRef.h
TStreamerObject::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1259
TClass.h
TList.h
TStreamerString::TStreamerString
TStreamerString()
Default ctor.
Definition: TStreamerElement.cxx:1611
TClass::WriteBuffer
Int_t WriteBuffer(TBuffer &b, void *pointer, const char *info="")
Function called by the Streamer functions to serialize object at p to buffer b.
Definition: TClass.cxx:6722
TClass::GetStreamerInfo
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
Definition: TClass.cxx:4583
TStreamerBase::fBaseCheckSum
UInt_t & fBaseCheckSum
Definition: TStreamerElement.h:159
TClass::IsVersioned
Bool_t IsVersioned() const
Definition: TClass.h:517
TStreamerElement::GetFullName
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
Definition: TStreamerElement.cxx:337
TStreamerObjectAnyPointer::~TStreamerObjectAnyPointer
virtual ~TStreamerObjectAnyPointer()
TStreamerObjectAnyPointer dtor.
Definition: TStreamerElement.cxx:1535
TStreamerElement::fStreamer
TMemberStreamer * fStreamer
new element class when reading
Definition: TStreamerElement.h:51
TBuffer
Buffer base class used for serializing objects.
Definition: TBuffer.h:43
TVirtualStreamerInfo::kObject
@ kObject
Definition: TVirtualStreamerInfo.h:89
TVirtualStreamerInfo::kCharStar
@ kCharStar
Definition: TVirtualStreamerInfo.h:84
TStreamerBase::GetClassPointer
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
Definition: TStreamerElement.cxx:659
TStreamerElement::fNewClass
TClass * fNewClass
pointer to class of object
Definition: TStreamerElement.h:50
TBuffer::CheckByteCount
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
TString
Basic string class.
Definition: TString.h:136
ROOT::kSTLlist
@ kSTLlist
Definition: ESTLType.h:31
TStreamerElement::kHasRange
@ kHasRange
Definition: TStreamerElement.h:77
TStreamerObjectPointer
Definition: TStreamerElement.h:332
TClass::HasInterpreterInfo
Bool_t HasInterpreterInfo() const
Definition: TClass.h:407
TStreamerElement::fTypeName
TString fTypeName
new element type when reading
Definition: TStreamerElement.h:48
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TClass::GetCheckSum
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
Definition: TClass.cxx:6448
TBuffer::SetBufferOffset
void SetBufferOffset(Int_t offset=0)
Definition: TBuffer.h:93
TString::Clear
void Clear()
Clear string without changing its capacity.
Definition: TString.cxx:1198
b
#define b(i)
Definition: RSha256.hxx:100
TVirtualStreamerInfo::kAnyP
@ kAnyP
Definition: TVirtualStreamerInfo.h:90
TStreamerBase::fNewBaseClass
TClass * fNewBaseClass
pointer to base class
Definition: TStreamerElement.h:161
TStreamerBasicType::TStreamerBasicType
TStreamerBasicType()
value of data member when referenced by an array
Definition: TStreamerElement.cxx:1121
ROOT::TSchemaRule::ReadRawFuncPtr_t
void(* ReadRawFuncPtr_t)(char *, TBuffer &)
Definition: TSchemaRule.h:41
TVirtualStreamerInfo
Abstract Interface class describing Streamer information for one class.
Definition: TVirtualStreamerInfo.h:37
bool
TString::ReplaceAll
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:692
TStreamerElement::fOffset
Int_t fOffset
Definition: TStreamerElement.h:45
ROOT::kSTLmap
@ kSTLmap
Definition: ESTLType.h:33
TStreamerElement::GetOffset
Int_t GetOffset() const
Definition: TStreamerElement.h:120
TClass::FindStreamerInfo
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
Definition: TClass.cxx:7009
TStreamerBasicType::fCounter
Int_t fCounter
Definition: TStreamerElement.h:277
TNamed::fTitle
TString fTitle
Definition: TNamed.h:33
TStreamerBasicPointer
Definition: TStreamerElement.h:199
TStreamerArtificial::GetReadRawFunc
ROOT::TSchemaRule::ReadRawFuncPtr_t GetReadRawFunc()
Definition: TStreamerElement.cxx:2122
TStreamerElement::kWarned
@ kWarned
Definition: TStreamerElement.h:84
TROOT.h
TStreamerElement::fFactor
Double_t fFactor
Maximum of data member if a range is specified [xmin,xmax,nbits].
Definition: TStreamerElement.h:54
TClass::GetStreamerFunc
ClassStreamerFunc_t GetStreamerFunc() const
Get a wrapper/accessor function around this class custom streamer (member function).
Definition: TClass.cxx:2917
TStreamerElement::IsBase
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
Definition: TStreamerElement.cxx:429
ROOT::kSTLstring
@ kSTLstring
Definition: ESTLType.h:49
TVirtualCollectionProxy::GetType
virtual EDataType GetType() const =0
TVirtualCollectionProxy::HasPointers
virtual Bool_t HasPointers() const =0
TStreamerLoop::fCounter
TStreamerBasicType * fCounter
Definition: TStreamerElement.h:246
TStreamerElement::kWrite
@ kWrite
Definition: TStreamerElement.h:81
TStreamerLoop
Definition: TStreamerElement.h:236
TString::Form
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition: TString.cxx:2311
TStreamerElement::GetSize
virtual Int_t GetSize() const
Returns size of this element in bytes.
Definition: TStreamerElement.cxx:374
TDataType.h
TStreamerObjectPointer::SetArrayDim
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
Definition: TStreamerElement.cxx:1474
TStreamerLoop::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1076
TRealData::GetDataMember
TDataMember * GetDataMember() const
Definition: TRealData.h:53
TStreamerElement::GetTypeNameBasic
const char * GetTypeNameBasic() const
Return type name of this element in case the type name is not a standard basic type,...
Definition: TStreamerElement.cxx:392
ROOT::kSTLmultiset
@ kSTLmultiset
Definition: ESTLType.h:36
ULongptr_t
unsigned long ULongptr_t
Definition: RtypesCore.h:83
TStreamerString::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1633
TStreamerBase::ls
virtual void ls(Option_t *option="") const
Print the content of the element.
Definition: TStreamerElement.cxx:745
TVirtualStreamerInfo::kChar
@ kChar
Definition: TVirtualStreamerInfo.h:85
TBuffer.h
TClassTable.h
ROOT::kSTLforwardlist
@ kSTLforwardlist
Definition: ESTLType.h:41
TStreamerElement::IsOldFormat
virtual Bool_t IsOldFormat(const char *newTypeName)
The early 3.00/00 and 3.01/01 versions used to store dm->GetTypeName instead of dm->GetFullTypename i...
Definition: TStreamerElement.cxx:417
TObject::ResetBit
void ResetBit(UInt_t f)
Definition: TObject.h:186
TVirtualStreamerInfo::kULong
@ kULong
Definition: TVirtualStreamerInfo.h:87
gInterpreterMutex
R__EXTERN TVirtualMutex * gInterpreterMutex
Definition: TInterpreter.h:44
TDataType
Basic data type descriptor (datatype information is obtained from CINT).
Definition: TDataType.h:44
xmin
float xmin
Definition: THbookFile.cxx:95
TString::kTrailing
@ kTrailing
Definition: TString.h:267
TStreamerElement::GetStreamer
TMemberStreamer * GetStreamer() const
Return the local streamer object.
Definition: TStreamerElement.cxx:382
TStreamerObject::~TStreamerObject
virtual ~TStreamerObject()
TStreamerObject dtor.
Definition: TStreamerElement.cxx:1241
TStreamerBase::fBaseClass
TClass * fBaseClass
checksum of the base class (used during memberwise streaming)
Definition: TStreamerElement.h:160
TStreamerObjectAny::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1352
TStreamerSTL::ls
virtual void ls(Option_t *option="") const
Print the content of the element.
Definition: TStreamerElement.cxx:1891
size
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
TObject::SetBit
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:696
TStreamerBasicPointer::fCountClass
TString fCountClass
Definition: TStreamerElement.h:208
TStreamerElement::IsTransient
virtual Bool_t IsTransient() const
Return kTRUE if the element represent an entity that is not written to the disk (transient members,...
Definition: TStreamerElement.cxx:438
TStreamerBasicPointer::SetArrayDim
void SetArrayDim(Int_t dim)
Set number of array dimensions.
Definition: TStreamerElement.cxx:969
TClass::GetListOfRealData
TList * GetListOfRealData() const
Definition: TClass.h:450
TString::Remove
TString & Remove(Ssiz_t pos)
Definition: TString.h:673
TClass::GetConversionStreamerInfo
TVirtualStreamerInfo * GetConversionStreamerInfo(const char *onfile_classname, Int_t version) const
Return a Conversion StreamerInfo from the class 'classname' for version number 'version' to this clas...
Definition: TClass.cxx:7029
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TVirtualStreamerInfo::kInt
@ kInt
Definition: TVirtualStreamerInfo.h:85
TBuffer::ClassBegin
virtual void ClassBegin(const TClass *, Version_t=-1)=0
TBuffer::WriteClassBuffer
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TStreamerElement::GetClassPointer
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
Definition: TStreamerElement.cxx:292
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TStreamerElement::kRepeat
@ kRepeat
Definition: TStreamerElement.h:79
TClass::GetConvStreamerFunc
ClassConvStreamerFunc_t GetConvStreamerFunc() const
Get a wrapper/accessor function around this class custom conversion streamer (member function).
Definition: TClass.cxx:2925
Long_t
long Long_t
Definition: RtypesCore.h:54
TStreamerElement::fNewType
Int_t fNewType
base offset for TObject if the element inherits from it
Definition: TStreamerElement.h:47
TStreamerElement::fXmin
Double_t fXmin
pointer to element Streamer
Definition: TStreamerElement.h:52
TClass::GetDeclFileName
const char * GetDeclFileName() const
Return name of the file containing the declaration of this class.
Definition: TClass.cxx:3407
TStreamerLoop::fCountClass
TString fCountClass
Definition: TStreamerElement.h:245
TStreamerElement::GetType
Int_t GetType() const
Definition: TStreamerElement.h:119
TStreamerBase::GetSize
Int_t GetSize() const
Returns size of baseclass in bytes.
Definition: TStreamerElement.cxx:669
ROOT::kSTLunorderedset
@ kSTLunorderedset
Definition: ESTLType.h:42
TVirtualStreamerInfo::kCache
@ kCache
Definition: TVirtualStreamerInfo.h:97
ROOT::kSTLmultimap
@ kSTLmultimap
Definition: ESTLType.h:34
R__LOCKGUARD
#define R__LOCKGUARD(mutex)
Definition: TVirtualMutex.h:104
TStreamerObject::Init
virtual void Init(TVirtualStreamerInfo *obj=nullptr)
Setup the element.
Definition: TStreamerElement.cxx:1248
TClassStreamer::SetOnFileClass
virtual void SetOnFileClass(const TClass *cl)
Definition: TClassStreamer.h:35
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TClass::CanSplit
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
Definition: TClass.cxx:2298
TClass::GetClass
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition: TClass.cxx:2946
TRealData.h
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
Short_t
short Short_t
Definition: RtypesCore.h:39
TStreamerObjectAnyPointer::SetArrayDim
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
Definition: TStreamerElement.cxx:1578
TBuffer::GetParent
TObject * GetParent() const
Return pointer to parent of this buffer.
Definition: TBuffer.cxx:262
TVirtualStreamerInfo::kLong
@ kLong
Definition: TVirtualStreamerInfo.h:85
TStreamerObjectAny::GetSize
Int_t GetSize() const
Returns size of anyclass in bytes.
Definition: TStreamerElement.cxx:1367
TStreamerElement::GetArrayLength
Int_t GetArrayLength() const
Definition: TStreamerElement.h:107
TNamed::SetTitle
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition: TNamed.cxx:164
TVirtualStreamerInfo::kCacheNew
@ kCacheNew
Definition: TVirtualStreamerInfo.h:99
TStreamerSTLstring::~TStreamerSTLstring
virtual ~TStreamerSTLstring()
TStreamerSTLstring dtor.
Definition: TStreamerElement.cxx:2055
TVirtualMutex.h
TStreamerBasicPointer::fCountName
TString fCountName
Definition: TStreamerElement.h:207
TStreamerBasicPointer::fCountVersion
Int_t fCountVersion
Definition: TStreamerElement.h:206
TStreamerLoop::~TStreamerLoop
virtual ~TStreamerLoop()
TStreamerLoop dtor.
Definition: TStreamerElement.cxx:1036
TObject::Warning
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:879
TBuffer::ReadVersion
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
kMaxLen
const Int_t kMaxLen
Definition: TStreamerElement.cxx:45
TClass::IsTObject
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Definition: TClass.cxx:5922
TStreamerSTL
Definition: TStreamerElement.h:392
TStreamerSTL::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1914
TClassTable::GetDict
static DictFuncPtr_t GetDict(const char *cname)
Given the class name returns the Dictionary() function of a class (uses hash of name).
Definition: TClassTable.cxx:574
unsigned int
TStreamerElement::SetMaxIndex
virtual void SetMaxIndex(Int_t dim, Int_t max)
set maximum index for array with dimension dim
Definition: TStreamerElement.cxx:485
TVirtualStreamerInfo::kSTLp
@ kSTLp
Definition: TVirtualStreamerInfo.h:91
TString::Index
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition: TString.h:639
TStreamerBasicType::GetMethod
ULongptr_t GetMethod() const
return address of counter
Definition: TStreamerElement.cxx:1143
TVirtualStreamerInfo.h
TVirtualStreamerInfo::kTString
@ kTString
Definition: TVirtualStreamerInfo.h:89
TClass::GetStreamer
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
Definition: TClass.cxx:2892
TStreamerSTL::CannotSplit
Bool_t CannotSplit() const
We can not split STL's which are inside a variable size array.
Definition: TStreamerElement.cxx:1828
TBuffer::ClassEnd
virtual void ClassEnd(const TClass *)=0
TVirtualStreamerInfo::kArtificial
@ kArtificial
Definition: TVirtualStreamerInfo.h:98
TBuffer::IsReading
Bool_t IsReading() const
Definition: TBuffer.h:86
ULong64_t
unsigned long long ULong64_t
Definition: RtypesCore.h:81
TStreamerElement::GetSequenceType
void GetSequenceType(TString &type) const
Fill type with the string representation of sequence information including 'cached',...
Definition: TStreamerElement.cxx:354
TStreamerBase::ReadBuffer
Int_t ReadBuffer(TBuffer &b, char *pointer)
Read the content of the buffer.
Definition: TStreamerElement.cxx:759
TStreamerLoop::Init
virtual void Init(TVirtualStreamerInfo *obj=nullptr)
Setup the element.
Definition: TStreamerElement.cxx:1068
TStreamerElement::fClassObject
TClass * fClassObject
Definition: TStreamerElement.h:49
TVirtualStreamerInfo::kBool
@ kBool
Definition: TVirtualStreamerInfo.h:88
TString::IsNull
Bool_t IsNull() const
Definition: TString.h:407
Double_t
double Double_t
Definition: RtypesCore.h:59
InitCounter
static TStreamerBasicType * InitCounter(const char *countClass, const char *countName, TVirtualStreamerInfo *directive)
Helper function to initialize the 'index/counter' value of the Pointer streamerElements.
Definition: TStreamerElement.cxx:64
TStreamerObjectAnyPointer::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1553
TStreamerObjectPointer::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1449
TStreamerObjectAnyPointer::Init
virtual void Init(TVirtualStreamerInfo *obj=nullptr)
Setup the element.
Definition: TStreamerElement.cxx:1542
TObjArray.h
TClassEdit.h
TStreamerBasicPointer::TStreamerBasicPointer
TStreamerBasicPointer()
pointer to basic type counter
Definition: TStreamerElement.cxx:904
TObjArray::FindObject
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Definition: TObjArray.cxx:415
TStreamerBase::fBaseVersion
Int_t fBaseVersion
Definition: TStreamerElement.h:158
TStreamerBase::~TStreamerBase
virtual ~TStreamerBase()
TStreamerBase dtor.
Definition: TStreamerElement.cxx:652
TStreamerObject
Definition: TStreamerElement.h:294
TRealData
The TRealData class manages the effective list of all data members for a given class.
Definition: TRealData.h:30
TInterpreter.h
TStreamerObjectAnyPointer::GetSize
Int_t GetSize() const
Returns size of objectpointer in bytes.
Definition: TStreamerElement.cxx:1569
TVirtualStreamerInfo::kTNamed
@ kTNamed
Definition: TVirtualStreamerInfo.h:90
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
TStreamerElement::~TStreamerElement
virtual ~TStreamerElement()
TStreamerElement dtor.
Definition: TStreamerElement.cxx:255
EDataType
EDataType
Definition: TDataType.h:28
TVirtualStreamerInfo::kMissing
@ kMissing
Definition: TVirtualStreamerInfo.h:102
UChar_t
unsigned char UChar_t
Definition: RtypesCore.h:38
TStreamerBase::InitStreaming
void InitStreaming(Bool_t isTransient)
Error message in case of checksum/version mismatch.
Definition: TStreamerElement.cxx:695
TStreamerElement::CannotSplit
virtual Bool_t CannotSplit() const
Returns true if the element cannot be split, false otherwise.
Definition: TStreamerElement.cxx:266
gCling
R__EXTERN TInterpreter * gCling
Definition: TInterpreter.h:561
TDataType::GetTypeName
TString GetTypeName()
Get basic type of typedef, e,g.
Definition: TDataType.cxx:149
TStreamerSTL::~TStreamerSTL
virtual ~TStreamerSTL()
TStreamerSTL dtor.
Definition: TStreamerElement.cxx:1820
TClass::GetBaseClassOffset
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
Definition: TClass.cxx:2769
name
char name[80]
Definition: TGX11.cxx:110
TStreamerSTL::fSTLtype
Int_t fSTLtype
Definition: TStreamerElement.h:399
TInterpreter::ClassInfo_IsEnum
virtual Bool_t ClassInfo_IsEnum(const char *) const
Definition: TInterpreter.h:417
TStreamerArtificial::fReadRawFunc
ROOT::TSchemaRule::ReadRawFuncPtr_t fReadRawFunc
Definition: TStreamerElement.h:457
ROOT::kSTLunorderedmap
@ kSTLunorderedmap
Definition: ESTLType.h:44
TVirtualStreamerInfo::kStreamer
@ kStreamer
Definition: TVirtualStreamerInfo.h:96
TStreamerLoop::GetSize
Int_t GetSize() const
Returns size of counter in bytes.
Definition: TStreamerElement.cxx:1056
TStreamerBasicType
Definition: TStreamerElement.h:270
TVirtualStreamerInfo::kDouble
@ kDouble
Definition: TVirtualStreamerInfo.h:86
TStreamerElement::Update
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class
Definition: TStreamerElement.cxx:566
fSize
size_t fSize
Definition: DeclareConverters.h:343
TClassStreamer
Definition: TClassStreamer.h:26
IncludeNameBuffer
static TString & IncludeNameBuffer()
Definition: TStreamerElement.cxx:47
TClassRef
TClassRef is used to implement a permanent reference to a TClass object.
Definition: TClassRef.h:28
TVirtualStreamerInfo::kAny
@ kAny
Definition: TVirtualStreamerInfo.h:89
TClassEdit::ResolveTypedef
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
Definition: TClassEdit.cxx:1731
TStreamerObjectAny::~TStreamerObjectAny
virtual ~TStreamerObjectAny()
TStreamerObjectAny dtor.
Definition: TStreamerElement.cxx:1334
TStreamerBase::Update
virtual void Update(const TClass *oldClass, TClass *newClass)
Function called by the TClass constructor when replacing an emulated class by the real class.
Definition: TStreamerElement.cxx:834
TVirtualCollectionProxy::GetCollectionType
virtual Int_t GetCollectionType() const =0
TStreamerObjectAny::TStreamerObjectAny
TStreamerObjectAny()
Default ctor.
Definition: TStreamerElement.cxx:1318
TClassStreamer.h
TClassEdit::STLKind
ROOT::ESTLType STLKind(std::string_view type)
Converts STL container name to number.
Definition: TClassEdit.cxx:511
TDataMember::GetClass
TClass * GetClass() const
Definition: TDataMember.h:75
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TMemberStreamer
Definition: TMemberStreamer.h:26
TStreamerBase::fStreamerInfo
TVirtualStreamerInfo * fStreamerInfo
Pointer to a wrapper around a custom convertion streamer member function.
Definition: TStreamerElement.h:164
type
int type
Definition: TGX11.cxx:121
TStreamerElement::SetArrayDim
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
Definition: TStreamerElement.cxx:475
fTypeName
struct void * fTypeName
Definition: cppyy.h:9
Class
void Class()
Definition: Class.C:29
TString::ToLower
void ToLower()
Change string to lower-case.
Definition: TString.cxx:1147
TVirtualStreamerInfo::kUShort
@ kUShort
Definition: TVirtualStreamerInfo.h:87
TVirtualStreamerInfo::kOffsetP
@ kOffsetP
Definition: TVirtualStreamerInfo.h:84
TStreamerElement::kWholeObject
@ kWholeObject
Definition: TStreamerElement.h:83
ROOT::Math::kPi
double kPi
Definition: KelvinFunctions.cxx:33
TStreamerLoop::GetMethod
ULongptr_t GetMethod() const
return address of counter
Definition: TStreamerElement.cxx:1043
Char_t
char Char_t
Definition: RtypesCore.h:33
TStreamerObjectAnyPointer
Definition: TStreamerElement.h:353
TStreamerObject::GetSize
Int_t GetSize() const
Returns size of object class in bytes.
Definition: TStreamerElement.cxx:1274
TStreamerElement::fType
Int_t fType
Definition: TStreamerElement.h:40
TVirtualStreamerInfo::kTObject
@ kTObject
Definition: TVirtualStreamerInfo.h:90
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4
TStreamerElement::GetArrayDim
Int_t GetArrayDim() const
Definition: TStreamerElement.h:106
TClassEdit::kDropStlDefault
@ kDropStlDefault
Definition: TClassEdit.h:81
TStreamerElement
Definition: TStreamerElement.h:33
TStreamerSTLstring::TStreamerSTLstring
TStreamerSTLstring()
Default ctor.
Definition: TStreamerElement.cxx:2024
ThreadLocalStorage.h
TStreamerBase
Definition: TStreamerElement.h:151
TStreamerElement::fMaxIndex
Int_t fMaxIndex[5]
Definition: TStreamerElement.h:44
TVirtualStreamerInfo::kObjectP
@ kObjectP
Definition: TVirtualStreamerInfo.h:89
TVirtualCollectionProxy
Definition: TVirtualCollectionProxy.h:38
TStreamerLoop::TStreamerLoop
TStreamerLoop()
pointer to basic type counter
Definition: TStreamerElement.cxx:1017
TVirtualStreamerInfo::GetElements
virtual TObjArray * GetElements() const =0
TVirtualStreamerInfo::kConv
@ kConv
Definition: TVirtualStreamerInfo.h:93
TObject::SetUniqueID
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
Definition: TObject.cxx:707
TStreamerSTL::IsBase
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
Definition: TStreamerElement.cxx:1856
gROOT
#define gROOT
Definition: TROOT.h:406
TStreamerElement::GetExecID
virtual Int_t GetExecID() const
Returns the TExec id for the EXEC instruction in the comment field of a TRef data member.
Definition: TStreamerElement.cxx:306
int
TStreamerObjectPointer::TStreamerObjectPointer
TStreamerObjectPointer()
Default ctor.
Definition: TStreamerElement.cxx:1412
TVirtualStreamerInfo::kSkip
@ kSkip
Definition: TVirtualStreamerInfo.h:92
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition: TError.cxx:187
GetRange
static void GetRange(const char *comments, Double_t &xmin, Double_t &xmax, Double_t &factor)
Parse comments to search for a range specifier of the style: [xmin,xmax] or [xmin,...
Definition: TStreamerElement.cxx:122
TError.h
TStreamerObjectAnyPointer::TStreamerObjectAnyPointer
TStreamerObjectAnyPointer()
Default ctor.
Definition: TStreamerElement.cxx:1516
TStreamerSTL::fCtype
Int_t fCtype
Definition: TStreamerElement.h:400