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  Bool_t first = kTRUE;
359  if (!first) sequenceType += ",";
360  first = kFALSE;
361  sequenceType += "wholeObject";
362  }
364  first = kFALSE;
365  sequenceType += "cached";
366  }
368  if (!first) sequenceType += ",";
369  first = kFALSE;
370  sequenceType += "repeat";
371  }
373  if (!first) sequenceType += ",";
374  first = kFALSE;
375  sequenceType += "nodelete";
376  }
378  if (!first) sequenceType += ",";
379  first = kFALSE;
380  sequenceType += "write";
381  }
382 }
383 
384 ////////////////////////////////////////////////////////////////////////////////
385 /// Returns size of this element in bytes.
386 
388 {
389  return fSize;
390 }
391 
392 ////////////////////////////////////////////////////////////////////////////////
393 /// Return the local streamer object.
394 
396 {
397  return fStreamer;
398 }
399 
400 ////////////////////////////////////////////////////////////////////////////////
401 /// Return type name of this element
402 /// in case the type name is not a standard basic type, return
403 /// the basic type name known to CINT.
404 
406 {
407  TDataType *dt = gROOT->GetType(fTypeName.Data());
408  if (fType < 1 || fType > 55) return fTypeName.Data();
409  if (dt && dt->GetType() > 0) return fTypeName.Data();
410  Int_t dtype = fType%20;
411  return TDataType::GetTypeName((EDataType)dtype);
412 }
413 
414 ////////////////////////////////////////////////////////////////////////////////
415 /// Initliaze the element.
416 
418 {
420  if (fClassObject && fClassObject->IsTObject()) {
422  }
423 }
424 
425 ////////////////////////////////////////////////////////////////////////////////
426 /// The early 3.00/00 and 3.01/01 versions used to store
427 /// dm->GetTypeName instead of dm->GetFullTypename
428 /// if this case is detected, the element type name is modified.
429 
430 Bool_t TStreamerElement::IsOldFormat(const char *newTypeName)
431 {
432  //if (!IsaPointer()) return kFALSE;
433  if (!strstr(newTypeName,fTypeName.Data())) return kFALSE;
434  //if (!strstr(fTypeName.Data(),newTypeName)) return kFALSE;
435  fTypeName = newTypeName;
436  return kTRUE;
437 }
438 
439 ////////////////////////////////////////////////////////////////////////////////
440 /// Return kTRUE if the element represent a base class.
441 
443 {
444  return kFALSE;
445 }
446 
447 ////////////////////////////////////////////////////////////////////////////////
448 /// Return kTRUE if the element represent an entity that is not written
449 /// to the disk (transient members, cache allocator/deallocator, etc.)
450 
452 {
454  // if (((const TStreamerArtificial*)this)->GetWriteFunc() == 0)
455  return kTRUE;
456  }
462 
463  return kFALSE;
464 }
465 
466 ////////////////////////////////////////////////////////////////////////////////
467 /// Print the content of the element.
468 
470 {
471  TString temp(GetTypeName());
472  if (IsaPointer() && !fTypeName.Contains("*")) temp += "*";
473 
474  TString sequenceType;
475  GetSequenceType(sequenceType);
476  if (sequenceType.Length()) {
477  sequenceType.Prepend(" (");
478  sequenceType += ") ";
479  }
480  printf(" %-14s %-15s offset=%3d type=%2d %s%-20s\n",
481  temp.Data(),GetFullName(),fOffset,fType,sequenceType.Data(),
482  GetTitle());
483 }
484 
485 ////////////////////////////////////////////////////////////////////////////////
486 /// Set number of array dimensions.
487 
489 {
490  fArrayDim = dim;
492  fNewType = fType;
493 }
494 
495 ////////////////////////////////////////////////////////////////////////////////
496 ///set maximum index for array with dimension dim
497 
499 {
500  if (dim < 0 || dim > 4) return;
501  fMaxIndex[dim] = max;
502  if (fArrayLength == 0) fArrayLength = max;
503  else fArrayLength *= max;
504 }
505 
506 ////////////////////////////////////////////////////////////////////////////////
507 ///set pointer to Streamer function for this element
508 
510 {
511  fStreamer = streamer;
512 }
513 
514 ////////////////////////////////////////////////////////////////////////////////
515 /// Stream an object of class TStreamerElement.
516 
517 void TStreamerElement::Streamer(TBuffer &R__b)
518 {
519  UInt_t R__s, R__c;
520  if (R__b.IsReading()) {
521  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
522  //NOTE that when reading, one cannot use Class()->ReadBuffer
523  // TBuffer::Class methods used for reading streamerinfos from SQL database
524  // Any changes of class structure should be reflected by them starting from version 4
525 
526  R__b.ClassBegin(TStreamerElement::Class(), R__v);
527  R__b.ClassMember("TNamed");
528  TNamed::Streamer(R__b);
529  R__b.ClassMember("fType","Int_t");
530  R__b >> fType;
531  R__b.ClassMember("fSize","Int_t");
532  R__b >> fSize;
533  R__b.ClassMember("fArrayLength","Int_t");
534  R__b >> fArrayLength;
535  R__b.ClassMember("fArrayDim","Int_t");
536  R__b >> fArrayDim;
537  R__b.ClassMember("fMaxIndex","Int_t", 5);
538  if (R__v == 1) R__b.ReadStaticArray(fMaxIndex);
539  else R__b.ReadFastArray(fMaxIndex,5);
540  R__b.ClassMember("fTypeName","TString");
541  fTypeName.Streamer(R__b);
542  if (fType==11&&(fTypeName=="Bool_t"||fTypeName=="bool")) fType = 18;
543  if (R__v > 1) {
544  SetUniqueID(0);
545  //check if element is a TRef or TRefArray
546  GetExecID();
547  }
548  if (R__v <= 2 && this->IsA()==TStreamerBasicType::Class()) {
549  // In TStreamerElement v2, fSize was holding the size of
550  // the underlying data type. In later version it contains
551  // the full length of the data member.
552  TDataType *type = gROOT->GetType(GetTypeName());
553  if (type && fArrayLength) fSize = fArrayLength * type->Size();
554  }
555  if (R__v == 3) {
556  R__b >> fXmin;
557  R__b >> fXmax;
558  R__b >> fFactor;
559  if (fFactor > 0) SetBit(kHasRange);
560  }
561  if (R__v > 3) {
563  }
564  //R__b.CheckByteCount(R__s, R__c, TStreamerElement::IsA());
566  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
567 
570  } else {
572  }
573 }
574 
575 ////////////////////////////////////////////////////////////////////////////////
576 ///function called by the TClass constructor when replacing an emulated class
577 ///by the real class
578 
579 void TStreamerElement::Update(const TClass *oldClass, TClass *newClass)
580 {
581  if (fClassObject == oldClass) {
582  fClassObject = newClass;
583  if (fClassObject && fClassObject->IsTObject()) {
585  }
586  } else if (fClassObject == nullptr) {
587  // Well since some emulated class is replaced by a real class, we can
588  // assume a new library has been loaded. If this is the case, we should
589  // check whether the class now exist (this would be the case for example
590  // for reading STL containers).
591 
592  TString classname(ExtractClassName(fTypeName));
593 
594  if (classname == newClass->GetName()) {
595  fClassObject = newClass;
596  if (fClassObject && fClassObject->IsTObject()) {
598  }
599  } else if (TClassTable::GetDict(classname)) {
600  fClassObject = (TClass*)-1;
601  GetClassPointer(); //force fClassObject
602  if (fClassObject && fClassObject->IsTObject()) {
604  }
605  }
606  }
607 }
608 
609 //______________________________________________________________________________
610 
611 //////////////////////////////////////////////////////////////////////////
612 // //
613 // TStreamerBase implement the streamer of the base class //
614 // //
615 //////////////////////////////////////////////////////////////////////////
616 
618 
619 ////////////////////////////////////////////////////////////////////////////////
620 
622  // Abuse TStreamerElement data member that is not used by TStreamerBase
623  fBaseCheckSum( *( (UInt_t*)&(fMaxIndex[1]) ) ),
624  fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
625 {
626  // Default ctor.
627 
628  fBaseClass = (TClass*)(-1);
629  fBaseVersion = 0;
630  fNewBaseClass = 0;
631 }
632 
633 ////////////////////////////////////////////////////////////////////////////////
634 
635 TStreamerBase::TStreamerBase(const char *name, const char *title, Int_t offset, Bool_t isTransient)
636  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kBase,"BASE"),
637  // Abuse TStreamerElement data member that is not used by TStreamerBase
638  fBaseCheckSum( *( (UInt_t*)&(fMaxIndex[1]) ) ),
639  fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
640 
641 {
642  // Create a TStreamerBase object.
643 
644  if (strcmp(name,"TObject") == 0) fType = TVirtualStreamerInfo::kTObject;
645  if (strcmp(name,"TNamed") == 0) fType = TVirtualStreamerInfo::kTNamed;
646  fNewType = fType;
648  if (fBaseClass) {
649  if (fBaseClass->IsVersioned()) {
651  } else {
652  fBaseVersion = -1;
653  }
655  } else {
656  fBaseVersion = 0;
657  }
658  fNewBaseClass = 0;
659  Init(isTransient);
660 }
661 
662 ////////////////////////////////////////////////////////////////////////////////
663 /// TStreamerBase dtor
664 
666 {
667 }
668 
669 ////////////////////////////////////////////////////////////////////////////////
670 /// Returns a pointer to the TClass of this element.
671 
673 {
674  if (fBaseClass!=(TClass*)(-1)) return fBaseClass;
675  ((TStreamerBase*)this)->fBaseClass = TClass::GetClass(GetName());
676  return fBaseClass;
677 }
678 
679 ////////////////////////////////////////////////////////////////////////////////
680 /// Returns size of baseclass in bytes.
681 
683 {
684  TClass *cl = GetClassPointer();
685  if (cl) return cl->Size();
686  return 0;
687 }
688 
689 ////////////////////////////////////////////////////////////////////////////////
690 /// Setup the element.
691 
693 {
694  Init(kFALSE);
695 }
696 
697 void TStreamerBase::Init(Bool_t isTransient)
698 {
700  if (!fBaseClass) return;
701 
702  InitStreaming(isTransient);
703 }
704 
705 ////////////////////////////////////////////////////////////////////////////////
706 /// Setup the fStreamerFunc and fStreamerinfo
707 
709 {
710  if (fNewBaseClass) {
713  if (fBaseVersion > 0 || fBaseCheckSum == 0) {
715  } else {
717  }
718  } else if (fBaseClass && fBaseClass != (TClass*)-1) {
721  if (fBaseVersion >= 0 || fBaseCheckSum == 0) {
723  } else {
725  }
726  } else {
727  fStreamerFunc = 0;
728  fConvStreamerFunc = 0;
729  fStreamerInfo = 0;
730  }
731 }
732 
733 ////////////////////////////////////////////////////////////////////////////////
734 /// Return kTRUE if the element represent a base class.
735 
737 {
738  return kTRUE;
739 }
740 
741 ////////////////////////////////////////////////////////////////////////////////
742 /// Return the proper include for this element.
743 
744 const char *TStreamerBase::GetInclude() const
745 {
748  } else {
749  std::string shortname( TClassEdit::ShortType( GetName(), 1 ) );
750  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
751  }
752  return IncludeNameBuffer();
753 }
754 
755 ////////////////////////////////////////////////////////////////////////////////
756 /// Print the content of the element.
757 
759 {
760  TString sequenceType;
761  GetSequenceType(sequenceType);
762  if (sequenceType.Length()) {
763  sequenceType.Prepend(" (");
764  sequenceType += ") ";
765  }
766  printf(" %-14s %-15s offset=%3d type=%2d %s%-20s\n",GetFullName(),GetTypeName(),fOffset,fType,sequenceType.Data(),GetTitle());
767 }
768 
769 ////////////////////////////////////////////////////////////////////////////////
770 /// Read the content of the buffer.
771 
773 {
774  if (fConvStreamerFunc) {
775  // We have a custom Streamer member function, we must use it.
776  fConvStreamerFunc(b,pointer+fOffset,fNewBaseClass ? fBaseClass : nullptr);
777  } else if (fStreamerFunc) {
778  // We have a custom Streamer member function, we must use it.
779  fStreamerFunc(b,pointer+fOffset);
780  } else {
781  // We don't have a custom Streamer member function. That still doesn't mean
782  // that there is no streamer - it could be an external one:
783  // If the old base class has an adopted streamer we take that
784  // one instead of the new base class:
785  if( fNewBaseClass ) {
787  if (extstrm) {
788  // The new base class has an adopted streamer:
789  extstrm->SetOnFileClass(fBaseClass);
790  (*extstrm)(b, pointer);
791  } else {
792  b.ReadClassBuffer( fNewBaseClass, pointer+fOffset, fBaseClass );
793  }
794  } else {
795  TClassStreamer* extstrm = fBaseClass->GetStreamer();
796  if (extstrm) {
797  // The class has an adopted streamer:
798  (*extstrm)(b, pointer);
799  } else {
800  b.ReadClassBuffer( fBaseClass, pointer+fOffset );
801  }
802  }
803  }
804  return 0;
805 }
806 
807 ////////////////////////////////////////////////////////////////////////////////
808 /// Stream an object of class TStreamerBase.
809 
810 void TStreamerBase::Streamer(TBuffer &R__b)
811 {
812  UInt_t R__s, R__c;
813  if (R__b.IsReading()) {
814  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
815 
816  R__b.ClassBegin(TStreamerBase::Class(), R__v);
817 
818  R__b.ClassMember("TStreamerElement");
819  TStreamerElement::Streamer(R__b);
820  // If the class owning the TStreamerElement and the base class are not
821  // loaded, on the file their streamer info might be in the following
822  // order (derived class,base class) and hence the base class is not
823  // yet emulated.
824  fBaseClass = (TClass*)-1;
825  fNewBaseClass = 0;
826  // Eventually we need a v3 that stores directly fBaseCheckSum (and
827  // a version of TStreamerElement should not stored fMaxIndex)
828  if (R__v > 2) {
829  R__b.ClassMember("fBaseVersion","Int_t");
830  R__b >> fBaseVersion;
831  } else {
832  // could have been: fBaseVersion = GetClassPointer()->GetClassVersion();
835  }
837  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
838  } else {
840  }
841 }
842 
843 ////////////////////////////////////////////////////////////////////////////////
844 ///Function called by the TClass constructor when replacing an emulated class
845 ///by the real class.
846 
847 void TStreamerBase::Update(const TClass *oldClass, TClass *newClass)
848 {
849  TStreamerElement::Update(oldClass, newClass);
850 
851  if (fBaseClass == oldClass) {
852  fBaseClass = newClass;
854  } else if (fBaseClass == nullptr) {
855  if (fName == newClass->GetName()) {
856  fBaseClass = newClass;
858  } else if (TClassTable::GetDict(fName)) {
861  }
862  }
863 }
864 
865 ////////////////////////////////////////////////////////////////////////////////
866 /// Write the base class into the buffer.
867 
869 {
870  if (fStreamerFunc) {
871  // We have a custom Streamer member function, we must use it.
872  fStreamerFunc(b,pointer+fOffset);
873  } else {
874  // We don't have a custom Streamer member function. That still doesn't mean
875  // that there is no streamer - it could be an external one:
876  // If the old base class has an adopted streamer we take that
877  // one instead of the new base class:
878  if (fNewBaseClass) {
880  if (extstrm) {
881  // The new base class has an adopted streamer:
882  extstrm->SetOnFileClass(fBaseClass);
883  (*extstrm)(b, pointer);
884  return 0;
885  } else {
887  return 0;
888  }
889  } else {
890  TClassStreamer* extstrm = fBaseClass->GetStreamer();
891  if (extstrm) {
892  (*extstrm)(b, pointer);
893  return 0;
894  } else {
895  fBaseClass->WriteBuffer(b,pointer+fOffset);
896  return 0;
897  }
898  }
899  }
900  return 0;
901 }
902 
903 //______________________________________________________________________________
904 
905 //////////////////////////////////////////////////////////////////////////
906 // //
907 // TStreamerBasicPointer implements the streamering of pointer to //
908 // fundamental types. //
909 // //
910 //////////////////////////////////////////////////////////////////////////
911 
913 
914 ////////////////////////////////////////////////////////////////////////////////
915 /// Default ctor.
916 
917 TStreamerBasicPointer::TStreamerBasicPointer() : fCountVersion(0),fCountName(),fCountClass(),fCounter(0)
918 {
919  fCounter = 0;
920 }
921 
922 ////////////////////////////////////////////////////////////////////////////////
923 /// Create a TStreamerBasicPointer object.
924 
925 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)
926  : TStreamerElement(name,title,offset,dtype,typeName)
927 {
929  fCountName = countName;
930  fCountClass = countClass;
931  fCountVersion = countVersion; //currently unused
932  Init();
933 // printf("BasicPointer Init:%s, countName=%s, countClass=%s, countVersion=%d, fCounter=%x\n",
934 // name,countName,countClass,countVersion,fCounter);
935 }
936 
937 ////////////////////////////////////////////////////////////////////////////////
938 /// TStreamerBasicPointer dtor.
939 
941 {
942 }
943 
944 ////////////////////////////////////////////////////////////////////////////////
945 /// return offset of counter
946 
948 {
949  if (!fCounter) ((TStreamerBasicPointer*)this)->Init();
950  if (!fCounter) return 0;
951  // FIXME: does not suport multiple inheritance for counter in base class.
952  // This is wrong in case counter is not in the same class or one of
953  // the left most (non virtual) base classes. For the other we would
954  // really need to use the object coming from the list of real data.
955  // (and even that need analysis for virtual base class).
956  return (ULong_t)fCounter->GetOffset();
957 }
958 
959 ////////////////////////////////////////////////////////////////////////////////
960 /// Returns size of basicpointer in bytes.
961 
963 {
964  if (fArrayLength) return fArrayLength*sizeof(void *);
965  return sizeof(void *);
966 }
967 
968 ////////////////////////////////////////////////////////////////////////////////
969 /// Setup the element.
970 /// If directive is a StreamerInfo and it correspond to the
971 /// same class a 'countClass' the streamerInfo is used instead of the current StreamerInfo of the TClass
972 /// for 'countClass'.
973 
975 {
976  fCounter = InitCounter( fCountClass, fCountName, directive );
977 }
978 
979 ////////////////////////////////////////////////////////////////////////////////
980 /// Set number of array dimensions.
981 
983 {
984  fArrayDim = dim;
985  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
986  fNewType = fType;
987 }
988 
989 ////////////////////////////////////////////////////////////////////////////////
990 /// Stream an object of class TStreamerBasicPointer.
991 
992 void TStreamerBasicPointer::Streamer(TBuffer &R__b)
993 {
994  UInt_t R__s, R__c;
995  if (R__b.IsReading()) {
996  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
997  if (R__v > 1) {
998  R__b.ReadClassBuffer(TStreamerBasicPointer::Class(), this, R__v, R__s, R__c);
999  //Init();
1000  //fCounter = InitCounter( fCountClass, fCountName );
1001  return;
1002  }
1003  //====process old versions before automatic schema evolution
1004  TStreamerElement::Streamer(R__b);
1005  R__b >> fCountVersion;
1006  fCountName.Streamer(R__b);
1007  fCountClass.Streamer(R__b);
1008  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
1009  } else {
1011  }
1012 }
1013 
1014 
1015 //______________________________________________________________________________
1016 
1017 //////////////////////////////////////////////////////////////////////////
1018 // //
1019 // TStreamerLoop implement streaming of a few construct that require //
1020 // looping over the data member and are not convered by other case //
1021 // (most deprecated). //
1022 // //
1023 //////////////////////////////////////////////////////////////////////////
1024 
1026 
1027 ////////////////////////////////////////////////////////////////////////////////
1028 /// Default ctor.
1029 
1030 TStreamerLoop::TStreamerLoop() : fCountVersion(0),fCountName(),fCountClass(),fCounter(0)
1031 {
1032 }
1033 
1034 ////////////////////////////////////////////////////////////////////////////////
1035 /// Create a TStreamerLoop object.
1036 
1037 TStreamerLoop::TStreamerLoop(const char *name, const char *title, Int_t offset, const char *countName, const char *countClass, Int_t countVersion, const char *typeName)
1038  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kStreamLoop,typeName)
1039 {
1040  fCountName = countName;
1041  fCountClass = countClass;
1042  fCountVersion = countVersion; //currently unused
1043  Init();
1044 }
1045 
1046 ////////////////////////////////////////////////////////////////////////////////
1047 /// TStreamerLoop dtor.
1048 
1050 {
1051 }
1052 
1053 ////////////////////////////////////////////////////////////////////////////////
1054 /// return address of counter
1055 
1057 {
1058  //if (!fCounter) {
1059  // Init();
1060  // if (!fCounter) return 0;
1061  //}
1062  if (!fCounter) return 0;
1063  return (ULong_t)fCounter->GetOffset();
1064 }
1065 
1066 ////////////////////////////////////////////////////////////////////////////////
1067 /// Returns size of counter in bytes.
1068 
1070 {
1071  if (fArrayLength) return fArrayLength*sizeof(void*);
1072  return sizeof(void*);
1073 }
1074 
1075 ////////////////////////////////////////////////////////////////////////////////
1076 /// Setup the element.
1077 /// If directive is a StreamerInfo and it correspond to the
1078 /// same class a 'countClass' the streamerInfo is used instead of the current StreamerInfo of the TClass
1079 /// for 'countClass'.
1080 
1082 {
1083  fCounter = InitCounter( fCountClass, fCountName, directive );
1084 }
1085 
1086 ////////////////////////////////////////////////////////////////////////////////
1087 /// Return the proper include for this element.
1088 
1089 const char *TStreamerLoop::GetInclude() const
1090 {
1091  IncludeNameBuffer().Form("<%s>","TString.h"); //to be generalized
1092  return IncludeNameBuffer();
1093 }
1094 
1095 ////////////////////////////////////////////////////////////////////////////////
1096 /// Stream an object of class TStreamerLoop.
1097 
1098 void TStreamerLoop::Streamer(TBuffer &R__b)
1099 {
1100  UInt_t R__s, R__c;
1101  if (R__b.IsReading()) {
1102  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1103  if (R__v > 1) {
1104  R__b.ReadClassBuffer(TStreamerLoop::Class(), this, R__v, R__s, R__c);
1105  //Init();
1106  return;
1107  }
1108  //====process old versions before automatic schema evolution
1109  TStreamerElement::Streamer(R__b);
1110  R__b >> fCountVersion;
1111  fCountName.Streamer(R__b);
1112  fCountClass.Streamer(R__b);
1113  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
1114  } else {
1116  }
1117 }
1118 
1119 
1120 //______________________________________________________________________________
1121 
1122 //////////////////////////////////////////////////////////////////////////
1123 // //
1124 // TStreamerBasicType implement streaming of fundamental types (int, //
1125 // float, etc.). //
1126 // //
1127 //////////////////////////////////////////////////////////////////////////
1128 
1130 
1131 ////////////////////////////////////////////////////////////////////////////////
1132 /// Default ctor.
1133 
1135 {
1136 }
1137 
1138 ////////////////////////////////////////////////////////////////////////////////
1139 /// Create a TStreamerBasicType object.
1140 
1141 TStreamerBasicType::TStreamerBasicType(const char *name, const char *title, Int_t offset, Int_t dtype, const char *typeName)
1142  : TStreamerElement(name,title,offset,dtype,typeName),fCounter(0)
1143 {
1144 }
1145 
1146 ////////////////////////////////////////////////////////////////////////////////
1147 /// TStreamerBasicType dtor.
1148 
1150 {
1151 }
1152 
1153 ////////////////////////////////////////////////////////////////////////////////
1154 /// return address of counter
1155 
1157 {
1160  return 0;
1161 }
1162 
1163 ////////////////////////////////////////////////////////////////////////////////
1164 /// Returns size of this element in bytes.
1165 
1167 {
1168  return fSize;
1169 }
1170 
1171 ////////////////////////////////////////////////////////////////////////////////
1172 /// Stream an object of class TStreamerBasicType.
1173 
1174 void TStreamerBasicType::Streamer(TBuffer &R__b)
1175 {
1176  UInt_t R__s, R__c;
1177  if (R__b.IsReading()) {
1178  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1179  if (R__v > 1) {
1180  R__b.ReadClassBuffer(TStreamerBasicType::Class(), this, R__v, R__s, R__c);
1181  } else {
1182  //====process old versions before automatic schema evolution
1183  TStreamerElement::Streamer(R__b);
1184  R__b.CheckByteCount(R__s, R__c, TStreamerBasicType::IsA());
1185  }
1186  Int_t type = fType;
1189  }
1190  switch(type) {
1191  // basic types
1192  case TVirtualStreamerInfo::kBool: fSize = sizeof(Bool_t); break;
1193  case TVirtualStreamerInfo::kShort: fSize = sizeof(Short_t); break;
1194  case TVirtualStreamerInfo::kInt: fSize = sizeof(Int_t); break;
1195  case TVirtualStreamerInfo::kLong: fSize = sizeof(Long_t); break;
1196  case TVirtualStreamerInfo::kLong64: fSize = sizeof(Long64_t); break;
1197  case TVirtualStreamerInfo::kFloat: fSize = sizeof(Float_t); break;
1198  case TVirtualStreamerInfo::kFloat16: fSize = sizeof(Float_t); break;
1199  case TVirtualStreamerInfo::kDouble: fSize = sizeof(Double_t); break;
1200  case TVirtualStreamerInfo::kDouble32: fSize = sizeof(Double_t); break;
1201  case TVirtualStreamerInfo::kUChar: fSize = sizeof(UChar_t); break;
1202  case TVirtualStreamerInfo::kUShort: fSize = sizeof(UShort_t); break;
1203  case TVirtualStreamerInfo::kUInt: fSize = sizeof(UInt_t); break;
1204  case TVirtualStreamerInfo::kULong: fSize = sizeof(ULong_t); break;
1205  case TVirtualStreamerInfo::kULong64: fSize = sizeof(ULong64_t); break;
1206  case TVirtualStreamerInfo::kBits: fSize = sizeof(UInt_t); break;
1207  case TVirtualStreamerInfo::kCounter: fSize = sizeof(Int_t); break;
1208  case TVirtualStreamerInfo::kChar: fSize = sizeof(Char_t); break;
1209  case TVirtualStreamerInfo::kCharStar: fSize = sizeof(Char_t*); break;
1210  default: return; // If we don't change the size let's not remultiply it.
1211  }
1212  if (fArrayLength) fSize *= GetArrayLength();
1213  } else {
1215  }
1216 }
1217 
1218 
1219 
1220 //______________________________________________________________________________
1221 
1222 //////////////////////////////////////////////////////////////////////////
1223 // //
1224 // TStreamerObject implements streaming of embedded objects whose type //
1225 // inherits from TObject. //
1226 // //
1227 //////////////////////////////////////////////////////////////////////////
1228 
1230 
1231 ////////////////////////////////////////////////////////////////////////////////
1232 /// Default ctor.
1233 
1235 {
1236 }
1237 
1238 ////////////////////////////////////////////////////////////////////////////////
1239 /// Create a TStreamerObject object.
1240 
1241 TStreamerObject::TStreamerObject(const char *name, const char *title, Int_t offset, const char *typeName)
1242  : TStreamerElement(name,title,offset,0,typeName)
1243 {
1245  if (strcmp(typeName,"TObject") == 0) fType = TVirtualStreamerInfo::kTObject;
1246  if (strcmp(typeName,"TNamed") == 0) fType = TVirtualStreamerInfo::kTNamed;
1247  fNewType = fType;
1248  Init();
1249 }
1250 
1251 ////////////////////////////////////////////////////////////////////////////////
1252 /// TStreamerObject dtor.
1253 
1255 {
1256 }
1257 
1258 ////////////////////////////////////////////////////////////////////////////////
1259 /// Setup the element.
1260 
1262 {
1264  if (fClassObject && fClassObject->IsTObject()) {
1266  }
1267 }
1268 
1269 ////////////////////////////////////////////////////////////////////////////////
1270 /// Return the proper include for this element.
1271 
1272 const char *TStreamerObject::GetInclude() const
1273 {
1274  TClass *cl = GetClassPointer();
1275  if (cl && cl->HasInterpreterInfo()) {
1276  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1277  } else {
1278  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1279  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1280  }
1281  return IncludeNameBuffer();
1282 }
1283 
1284 ////////////////////////////////////////////////////////////////////////////////
1285 /// Returns size of object class in bytes.
1286 
1288 {
1289  TClass *cl = GetClassPointer();
1290  Int_t classSize = 8;
1291  if (cl) classSize = cl->Size();
1292  if (fArrayLength) return fArrayLength*classSize;
1293  return classSize;
1294 }
1295 
1296 ////////////////////////////////////////////////////////////////////////////////
1297 /// Stream an object of class TStreamerObject.
1298 
1299 void TStreamerObject::Streamer(TBuffer &R__b)
1300 {
1301  UInt_t R__s, R__c;
1302  if (R__b.IsReading()) {
1303  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1304  if (R__v > 1) {
1305  R__b.ReadClassBuffer(TStreamerObject::Class(), this, R__v, R__s, R__c);
1306  return;
1307  }
1308  //====process old versions before automatic schema evolution
1309  TStreamerElement::Streamer(R__b);
1310  R__b.CheckByteCount(R__s, R__c, TStreamerObject::IsA());
1311  } else {
1313  }
1314 }
1315 
1316 
1317 //______________________________________________________________________________
1318 
1319 //////////////////////////////////////////////////////////////////////////
1320 // //
1321 // TStreamerObjectAny implement streaming of embedded object not //
1322 // inheriting from TObject. //
1323 // //
1324 //////////////////////////////////////////////////////////////////////////
1325 
1327 
1328 ////////////////////////////////////////////////////////////////////////////////
1329 /// Default ctor.
1330 
1332 {
1333 }
1334 
1335 ////////////////////////////////////////////////////////////////////////////////
1336 /// Create a TStreamerObjectAny object.
1337 
1338 TStreamerObjectAny::TStreamerObjectAny(const char *name, const char *title, Int_t offset, const char *typeName)
1339  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kAny,typeName)
1340 {
1341  Init();
1342 }
1343 
1344 ////////////////////////////////////////////////////////////////////////////////
1345 /// TStreamerObjectAny dtor.
1346 
1348 {
1349 }
1350 
1351 ////////////////////////////////////////////////////////////////////////////////
1352 /// Setup the element.
1353 
1355 {
1357  if (fClassObject && fClassObject->IsTObject()) {
1359  }
1360 }
1361 
1362 ////////////////////////////////////////////////////////////////////////////////
1363 /// Return the proper include for this element.
1364 
1366 {
1367  TClass *cl = GetClassPointer();
1368  if (cl && cl->HasInterpreterInfo()) {
1369  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1370  } else {
1371  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1372  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1373  }
1374  return IncludeNameBuffer();
1375 }
1376 
1377 ////////////////////////////////////////////////////////////////////////////////
1378 /// Returns size of anyclass in bytes.
1379 
1381 {
1382  TClass *cl = GetClassPointer();
1383  Int_t classSize = 8;
1384  if (cl) classSize = cl->Size();
1385  if (fArrayLength) return fArrayLength*classSize;
1386  return classSize;
1387 }
1388 
1389 ////////////////////////////////////////////////////////////////////////////////
1390 /// Stream an object of class TStreamerObjectAny.
1391 
1392 void TStreamerObjectAny::Streamer(TBuffer &R__b)
1393 {
1394  UInt_t R__s, R__c;
1395  if (R__b.IsReading()) {
1396  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1397  if (R__v > 1) {
1398  R__b.ReadClassBuffer(TStreamerObjectAny::Class(), this, R__v, R__s, R__c);
1399  return;
1400  }
1401  //====process old versions before automatic schema evolution
1402  TStreamerElement::Streamer(R__b);
1403  R__b.CheckByteCount(R__s, R__c, TStreamerObjectAny::IsA());
1404  } else {
1406  }
1407 }
1408 
1409 
1410 
1411 //______________________________________________________________________________
1412 
1413 //////////////////////////////////////////////////////////////////////////
1414 // //
1415 // TStreamerObjectPointer implements streaming of pointer to object //
1416 // inheriting from TObject. //
1417 // //
1418 //////////////////////////////////////////////////////////////////////////
1419 
1421 
1422 ////////////////////////////////////////////////////////////////////////////////
1423 /// Default ctor.
1424 
1426 {
1427 }
1428 
1429 ////////////////////////////////////////////////////////////////////////////////
1430 /// Create a TStreamerObjectPointer object.
1431 
1433  Int_t offset, const char *typeName)
1434  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kObjectP,typeName)
1435 {
1436  if (strncmp(title,"->",2) == 0) fType = TVirtualStreamerInfo::kObjectp;
1437  fNewType = fType;
1438  Init();
1439 }
1440 
1441 ////////////////////////////////////////////////////////////////////////////////
1442 /// TStreamerObjectPointer dtor.
1443 
1445 {
1446 }
1447 
1448 ////////////////////////////////////////////////////////////////////////////////
1449 /// Setup the element.
1450 
1452 {
1454  if (fClassObject && fClassObject->IsTObject()) {
1456  }
1457 }
1458 
1459 ////////////////////////////////////////////////////////////////////////////////
1460 /// Return the proper include for this element.
1461 
1463 {
1464  TClass *cl = GetClassPointer();
1465  if (cl && cl->HasInterpreterInfo()) {
1466  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1467  } else {
1468  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1469  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1470  }
1471 
1472  return IncludeNameBuffer();
1473 }
1474 
1475 ////////////////////////////////////////////////////////////////////////////////
1476 /// Returns size of objectpointer in bytes.
1477 
1479 {
1480  if (fArrayLength) return fArrayLength*sizeof(void *);
1481  return sizeof(void *);
1482 }
1483 
1484 ////////////////////////////////////////////////////////////////////////////////
1485 /// Set number of array dimensions.
1486 
1488 {
1489  fArrayDim = dim;
1490  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
1491  fNewType = fType;
1492 }
1493 
1494 ////////////////////////////////////////////////////////////////////////////////
1495 /// Stream an object of class TStreamerObjectPointer.
1496 
1497 void TStreamerObjectPointer::Streamer(TBuffer &R__b)
1498 {
1499  UInt_t R__s, R__c;
1500  if (R__b.IsReading()) {
1501  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1502  if (R__v > 1) {
1503  R__b.ReadClassBuffer(TStreamerObjectPointer::Class(), this, R__v, R__s, R__c);
1504  return;
1505  }
1506  //====process old versions before automatic schema evolution
1507  TStreamerElement::Streamer(R__b);
1508  R__b.CheckByteCount(R__s, R__c, TStreamerObjectPointer::IsA());
1509  } else {
1511  }
1512 }
1513 
1514 
1515 //______________________________________________________________________________
1516 
1517 //////////////////////////////////////////////////////////////////////////
1518 // //
1519 // TStreamerObjectPointerAny implements streaming of pointer to object //
1520 // not inheriting from TObject. //
1521 // //
1522 //////////////////////////////////////////////////////////////////////////
1523 
1525 
1526 ////////////////////////////////////////////////////////////////////////////////
1527 /// Default ctor.
1528 
1530 {
1531 }
1532 
1533 ////////////////////////////////////////////////////////////////////////////////
1534 /// Create a TStreamerObjectAnyPointer object.
1535 
1537  Int_t offset, const char *typeName)
1538  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kAnyP,typeName)
1539 {
1540  if (strncmp(title,"->",2) == 0) fType = TVirtualStreamerInfo::kAnyp;
1541  fNewType = fType;
1542  Init();
1543 }
1544 
1545 ////////////////////////////////////////////////////////////////////////////////
1546 /// TStreamerObjectAnyPointer dtor.
1547 
1549 {
1550 }
1551 
1552 ////////////////////////////////////////////////////////////////////////////////
1553 /// Setup the element.
1554 
1556 {
1558  if (fClassObject && fClassObject->IsTObject()) {
1560  }
1561 }
1562 
1563 ////////////////////////////////////////////////////////////////////////////////
1564 /// Return the proper include for this element.
1565 
1567 {
1568  TClass *cl = GetClassPointer();
1569  if (cl && cl->HasInterpreterInfo()) {
1570  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1571  } else {
1572  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1573  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1574  }
1575 
1576  return IncludeNameBuffer();
1577 }
1578 
1579 ////////////////////////////////////////////////////////////////////////////////
1580 /// Returns size of objectpointer in bytes.
1581 
1583 {
1584  if (fArrayLength) return fArrayLength*sizeof(void *);
1585  return sizeof(void *);
1586 }
1587 
1588 ////////////////////////////////////////////////////////////////////////////////
1589 /// Set number of array dimensions.
1590 
1592 {
1593  fArrayDim = dim;
1594  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
1595  fNewType = fType;
1596 }
1597 
1598 ////////////////////////////////////////////////////////////////////////////////
1599 /// Stream an object of class TStreamerObjectAnyPointer.
1600 
1601 void TStreamerObjectAnyPointer::Streamer(TBuffer &R__b)
1602 {
1603  if (R__b.IsReading()) {
1605  } else {
1607  }
1608 }
1609 
1610 
1611 //______________________________________________________________________________
1612 
1613 //////////////////////////////////////////////////////////////////////////
1614 // //
1615 // TSreamerString implements streaming of TString. //
1616 // //
1617 //////////////////////////////////////////////////////////////////////////
1618 
1620 
1621 ////////////////////////////////////////////////////////////////////////////////
1622 /// Default ctor.
1623 
1625 {
1626 }
1627 
1628 ////////////////////////////////////////////////////////////////////////////////
1629 /// Create a TStreamerString object.
1630 
1631 TStreamerString::TStreamerString(const char *name, const char *title, Int_t offset)
1632  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kTString,"TString")
1633 {
1634 }
1635 
1636 ////////////////////////////////////////////////////////////////////////////////
1637 /// TStreamerString dtor.
1638 
1640 {
1641 }
1642 
1643 ////////////////////////////////////////////////////////////////////////////////
1644 /// Return the proper include for this element.
1645 
1646 const char *TStreamerString::GetInclude() const
1647 {
1648  IncludeNameBuffer().Form("<%s>","TString.h");
1649  return IncludeNameBuffer();
1650 }
1651 
1652 ////////////////////////////////////////////////////////////////////////////////
1653 /// Returns size of anyclass in bytes.
1654 
1656 {
1657  if (fArrayLength) return fArrayLength*sizeof(TString);
1658  return sizeof(TString);
1659 }
1660 
1661 ////////////////////////////////////////////////////////////////////////////////
1662 /// Stream an object of class TStreamerString.
1663 
1664 void TStreamerString::Streamer(TBuffer &R__b)
1665 {
1666  UInt_t R__s, R__c;
1667  if (R__b.IsReading()) {
1668  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1669  if (R__v > 1) {
1670  R__b.ReadClassBuffer(TStreamerString::Class(), this, R__v, R__s, R__c);
1671  return;
1672  }
1673  //====process old versions before automatic schema evolution
1674  TStreamerElement::Streamer(R__b);
1675  R__b.CheckByteCount(R__s, R__c, TStreamerString::IsA());
1676  } else {
1678  }
1679 }
1680 
1681 //______________________________________________________________________________
1682 
1683 //////////////////////////////////////////////////////////////////////////
1684 // //
1685 // TStreamerSTL implements streamer of STL container. //
1686 // //
1687 //////////////////////////////////////////////////////////////////////////
1688 
1690 
1691 ////////////////////////////////////////////////////////////////////////////////
1692 /// Default ctor.
1693 
1694 TStreamerSTL::TStreamerSTL() : fSTLtype(0),fCtype(0)
1695 {
1696 }
1697 
1698 ////////////////////////////////////////////////////////////////////////////////
1699 /// Create a TStreamerSTL object.
1700 
1701 TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
1702  const char *typeName, const TVirtualCollectionProxy &proxy, Bool_t dmPointer)
1703  : TStreamerElement(name,title,offset,ROOT::kSTLany,typeName)
1704 {
1706 
1707  if (name==typeName /* intentional pointer comparison */
1708  || strcmp(name,typeName)==0) {
1709  // We have a base class.
1710  fName = fTypeName;
1711  }
1712  fSTLtype = proxy.GetCollectionType();
1713  fCtype = 0;
1714 
1715  if (dmPointer) fSTLtype += TVirtualStreamerInfo::kOffsetP;
1716 
1717  if (fSTLtype == ROOT::kSTLbitset) {
1718  // Nothing to check
1719  } else if (proxy.GetValueClass()) {
1722  } else {
1723  fCtype = proxy.GetType();
1725  }
1727 }
1728 
1729 ////////////////////////////////////////////////////////////////////////////////
1730 /// Create a TStreamerSTL object.
1731 
1732 TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
1733  const char *typeName, const char *trueType, Bool_t dmPointer)
1734  : TStreamerElement(name,title,offset,ROOT::kSTLany,typeName)
1735 {
1736  const char *t = trueType;
1737  if (!t || !*t) t = typeName;
1738 
1740 
1741  if (name==typeName /* intentional pointer comparison */
1742  || strcmp(name,typeName)==0) {
1743  // We have a base class.
1744  fName = fTypeName;
1745  }
1746 
1747  Int_t nch = strlen(t);
1748  char *s = new char[nch+1];
1749  strlcpy(s,t,nch+1);
1750  char *sopen = strchr(s,'<');
1751  if (sopen == 0) {
1752  Fatal("TStreamerSTL","For %s, the type name (%s) is seemingly not a template (template argument not found)", name, s);
1753  return;
1754  }
1755  *sopen = 0; sopen++;
1756  // We are looking for the first arguments of the STL container, because
1757  // this arguments can be a templates we need to count the < and >
1758  char* current=sopen;
1759  for(int count = 0; *current!='\0'; current++) {
1760  if (*current=='<') count++;
1761  if (*current=='>') {
1762  if (count==0) break;
1763  count--;
1764  }
1765  if (*current==',' && count==0) break;
1766  }
1767  char *sclose = current; *sclose = 0; sclose--;
1768  char *sconst = strstr(sopen,"const ");
1769  char *sbracket = strstr(sopen,"<");
1770  if (sconst && (sbracket==0 || sconst < sbracket)) {
1771  // the string "const" may be part of the classname!
1772  char *pconst = sconst-1;
1773  if (*pconst == ' ' || *pconst == '<' || *pconst == '*' || *pconst == '\0') sopen = sconst + 5;
1774  }
1776  fCtype = 0;
1777  if (fSTLtype == ROOT::kNotSTL) { delete [] s; return;}
1778  if (dmPointer) fSTLtype += TVirtualStreamerInfo::kOffsetP;
1779 
1780  // find STL contained type
1781  while (*sopen==' ') sopen++;
1782  Bool_t isPointer = kFALSE;
1783  // Find stars outside of any template definitions in the
1784  // first template argument.
1785  char *star = strrchr(sopen,'>');
1786  if (star) star = strchr(star,'*');
1787  else star = strchr(sopen,'*');
1788  if (star) {
1789  isPointer = kTRUE;
1790  *star = 0;
1791  sclose = star - 1;
1792  }
1793  while (*sclose == ' ') {*sclose = 0; sclose--;}
1794 
1795 
1796  TDataType *dt = (TDataType*)gROOT->GetListOfTypes()->FindObject(sopen);
1797  if (fSTLtype == ROOT::kSTLbitset) {
1798  // Nothing to check
1799  } else if (dt) {
1800  fCtype = dt->GetType();
1801  if (isPointer) fCtype += TVirtualStreamerInfo::kOffsetP;
1802  } else {
1803  // this could also be a nested enums ... which should work ... be let's see.
1804  TClass *cl = TClass::GetClass(sopen);
1805  if (cl) {
1806  if (isPointer) fCtype = TVirtualStreamerInfo::kObjectp;
1808  } else {
1809  if (gCling->ClassInfo_IsEnum(sopen)) {
1810  if (isPointer) fCtype += TVirtualStreamerInfo::kOffsetP;
1811  } else {
1812  if(strcmp(sopen,"string")) {
1813  // This case can happens when 'this' is a TStreamerElement for
1814  // a STL container containing something for which we do not have
1815  // a TVirtualStreamerInfo (This happens in particular is the collection
1816  // objects themselves are always empty) and we do not have the
1817  // dictionary/shared library for the container.
1818  if (GetClassPointer() && GetClassPointer()->IsLoaded()) {
1819  Warning("TStreamerSTL","For %s we could not find any information about the type %s %d %s",fTypeName.Data(),sopen,fSTLtype,s);
1820  }
1821  }
1822  }
1823  }
1824  }
1825  delete [] s;
1826 
1828 }
1829 
1830 ////////////////////////////////////////////////////////////////////////////////
1831 /// TStreamerSTL dtor.
1832 
1834 {
1835 }
1836 
1837 ////////////////////////////////////////////////////////////////////////////////
1838 /// We can not split STL's which are inside a variable size array.
1839 /// At least for now.
1840 
1842 {
1843  if (IsaPointer()) {
1844  if (GetTitle()[0]=='[') return kTRUE; // can not split variable size array
1845  return kTRUE;
1846  }
1847 
1848  if (GetArrayDim()>=1 && GetArrayLength()>1) return kTRUE;
1849 
1850  if (TStreamerElement::CannotSplit()) return kTRUE;
1851 
1852  return kFALSE;
1853 }
1854 
1855 ////////////////////////////////////////////////////////////////////////////////
1856 /// Return true if the data member is a pointer.
1857 
1859 {
1860  const char *type_name = GetTypeName();
1861  if ( type_name[strlen(type_name)-1]=='*' ) return kTRUE;
1862  else return kFALSE;
1863 }
1864 
1865 
1866 ////////////////////////////////////////////////////////////////////////////////
1867 /// Return kTRUE if the element represent a base class.
1868 
1870 {
1871  TString ts(GetName());
1872 
1873  if (strcmp(ts.Data(),GetTypeName())==0) return kTRUE;
1874  if (strcmp(ts.Data(),GetTypeNameBasic())==0) return kTRUE;
1875  return kFALSE;
1876 }
1877 ////////////////////////////////////////////////////////////////////////////////
1878 /// Returns size of STL container in bytes.
1879 
1881 {
1882  // Since the STL collection might or might not be emulated and that the
1883  // sizeof the object depends on this, let's just always retrieve the
1884  // current size!
1885  TClass *cl = GetClassPointer();
1886  UInt_t size = 0;
1887  if (cl==0) {
1888  if (!TestBit(kWarned)) {
1889  Error("GetSize","Could not find the TClass for %s.\n"
1890  "This is likely to have been a typedef, if possible please declare it in CINT to work around the issue\n",fTypeName.Data());
1891  const_cast<TStreamerSTL*>(this)->SetBit(kWarned);
1892  }
1893  } else {
1894  size = cl->Size();
1895  }
1896 
1897  if (fArrayLength) return fArrayLength*size;
1898  return size;
1899 }
1900 
1901 ////////////////////////////////////////////////////////////////////////////////
1902 /// Print the content of the element.
1903 
1905 {
1906  TString name(kMaxLen);
1907  TString cdim;
1908  name = GetName();
1909  for (Int_t i=0;i<fArrayDim;i++) {
1910  cdim.Form("[%d]",fMaxIndex[i]);
1911  name += cdim;
1912  }
1913  TString sequenceType;
1914  GetSequenceType(sequenceType);
1915  if (sequenceType.Length()) {
1916  sequenceType.Prepend(" (");
1917  sequenceType += ") ";
1918  }
1919  printf(" %-14s %-15s offset=%3d type=%2d %s,stl=%d, ctype=%d, %-20s\n",
1920  GetTypeName(),name.Data(),fOffset,fType,sequenceType.Data(),
1922 }
1923 
1924 ////////////////////////////////////////////////////////////////////////////////
1925 /// Return the proper include for this element.
1926 
1927 const char *TStreamerSTL::GetInclude() const
1928 {
1929  if (fSTLtype == ROOT::kSTLvector) IncludeNameBuffer().Form("<%s>","vector");
1930  else if (fSTLtype == ROOT::kSTLlist) IncludeNameBuffer().Form("<%s>","list");
1931  else if (fSTLtype == ROOT::kSTLforwardlist) IncludeNameBuffer().Form("<%s>","forward_list");
1932  else if (fSTLtype == ROOT::kSTLdeque) IncludeNameBuffer().Form("<%s>","deque");
1933  else if (fSTLtype == ROOT::kSTLmap) IncludeNameBuffer().Form("<%s>","map");
1934  else if (fSTLtype == ROOT::kSTLmultimap) IncludeNameBuffer().Form("<%s>","map");
1935  else if (fSTLtype == ROOT::kSTLset) IncludeNameBuffer().Form("<%s>","set");
1936  else if (fSTLtype == ROOT::kSTLmultiset) IncludeNameBuffer().Form("<%s>","set");
1937  else if (fSTLtype == ROOT::kSTLunorderedset) IncludeNameBuffer().Form("<%s>","unordered_set");
1938  else if (fSTLtype == ROOT::kSTLunorderedmultiset) IncludeNameBuffer().Form("<%s>","unordered_set");
1939  else if (fSTLtype == ROOT::kSTLunorderedmap) IncludeNameBuffer().Form("<%s>","unordered_map");
1940  else if (fSTLtype == ROOT::kSTLunorderedmultimap) IncludeNameBuffer().Form("<%s>","unordered_map");
1941  else if (fSTLtype == ROOT::kSTLbitset) IncludeNameBuffer().Form("<%s>","bitset");
1942  return IncludeNameBuffer();
1943 }
1944 
1945 ////////////////////////////////////////////////////////////////////////////////
1946 /// Set pointer to Streamer function for this element
1947 /// NOTE: we do not take ownership
1948 
1950 {
1951  fStreamer = streamer;
1952 }
1953 
1954 ////////////////////////////////////////////////////////////////////////////////
1955 /// Stream an object of class TStreamerSTL.
1956 
1957 void TStreamerSTL::Streamer(TBuffer &R__b)
1958 {
1959  UInt_t R__s, R__c;
1960  if (R__b.IsReading()) {
1961  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1962  if (R__v > 2) {
1963  R__b.ReadClassBuffer(TStreamerSTL::Class(), this, R__v, R__s, R__c);
1964  } else {
1965  //====process old versions before automatic schema evolution
1966  TStreamerElement::Streamer(R__b);
1967  R__b >> fSTLtype;
1968  R__b >> fCtype;
1969  R__b.CheckByteCount(R__s, R__c, TStreamerSTL::IsA());
1970  }
1972  // For a long time those where inverted in TStreamerElement
1973  // compared to the other definitions. When we moved to version '4',
1974  // this got standardized, but we now need to fix it.
1975 
1976  if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) {
1978  } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) {
1980  }
1981  }
1982 
1985  if (GetArrayLength() > 0) {
1987  }
1988  if (R__b.GetParent()) { // Avoid resetting during a cloning.
1990  SetBit(kDoNotDelete); // For backward compatibility
1991  } else if ( fSTLtype == ROOT::kSTLmap || fSTLtype == ROOT::kSTLmultimap) {
1992  // Here we would like to set the bit only if one of the element of the pair is a pointer,
1993  // however we have no easy to determine this short of parsing the class name.
1994  SetBit(kDoNotDelete); // For backward compatibility
1995  }
1996  }
1997  return;
1998  } else {
1999  // To enable forward compatibility we actually save with the old value
2000  TStreamerSTL tmp;
2001  // Hand coded copy constructor since the 'normal' one are intentionally
2002  // deleted.
2003  tmp.fName = fName;
2004  tmp.fTitle = fTitle;
2006  tmp.fSize = fSize;
2007  tmp.fArrayLength = fArrayLength;
2008  for(int i = 0; i < 5; ++i)
2009  tmp.fMaxIndex[i] = fMaxIndex[i];
2010  tmp.fTypeName = fTypeName;
2011  tmp.fSTLtype = fSTLtype;
2012  tmp.fCtype = fCtype;
2013  R__b.WriteClassBuffer(TStreamerSTL::Class(), &tmp);
2014  }
2015 }
2016 
2017 //______________________________________________________________________________
2018 
2019 //////////////////////////////////////////////////////////////////////////
2020 // //
2021 // TStreamerSTLstring implements streaming std::string. //
2022 // //
2023 //////////////////////////////////////////////////////////////////////////
2024 
2026 
2027 ////////////////////////////////////////////////////////////////////////////////
2028 /// Default ctor.
2029 
2031 {
2032 }
2033 
2034 ////////////////////////////////////////////////////////////////////////////////
2035 /// Create a TStreamerSTLstring object.
2036 
2037 TStreamerSTLstring::TStreamerSTLstring(const char *name, const char *title, Int_t offset,
2038  const char *typeName, Bool_t dmPointer)
2039  : TStreamerSTL()
2040 {
2041  SetName(name);
2042  SetTitle(title);
2043 
2044  if (dmPointer) {
2046  } else {
2048  }
2049 
2050  fNewType = fType;
2051  fOffset = offset;
2054  fTypeName= typeName;
2055 
2056 }
2057 
2058 ////////////////////////////////////////////////////////////////////////////////
2059 /// TStreamerSTLstring dtor.
2060 
2062 {
2063 }
2064 
2065 ////////////////////////////////////////////////////////////////////////////////
2066 /// Return the proper include for this element.
2067 
2069 {
2070  IncludeNameBuffer() = "<string>";
2071  return IncludeNameBuffer();
2072 }
2073 
2074 ////////////////////////////////////////////////////////////////////////////////
2075 /// Returns size of anyclass in bytes.
2076 
2078 {
2079  if (fArrayLength) return fArrayLength*sizeof(string);
2080  return sizeof(string);
2081 }
2082 
2083 ////////////////////////////////////////////////////////////////////////////////
2084 /// Stream an object of class TStreamerSTLstring.
2085 
2086 void TStreamerSTLstring::Streamer(TBuffer &R__b)
2087 {
2088  UInt_t R__s, R__c;
2089  if (R__b.IsReading()) {
2090  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
2091  if (R__v > 1) {
2092  R__b.ReadClassBuffer(TStreamerSTLstring::Class(), this, R__v, R__s, R__c);
2093  return;
2094  }
2095  //====process old versions before automatic schema evolution
2096  TStreamerSTL::Streamer(R__b);
2097  R__b.CheckByteCount(R__s, R__c, TStreamerSTLstring::IsA());
2098  } else {
2100  }
2101 }
2102 
2103 //______________________________________________________________________________
2104 
2105 ///////////////////////////////////////////////////////////////////////////////
2106 // //
2107 // TStreamerArtificial implements StreamerElement injected by a TSchemaRule. //
2108 // //
2109 ///////////////////////////////////////////////////////////////////////////////
2110 
2112 
2113 void TStreamerArtificial::Streamer(TBuffer& /* R__b */)
2114 {
2115  // Avoid streaming the synthetic/artificial streamer elements.
2116 
2117  // Intentionally, nothing to do at all.
2118  return;
2119 }
2120 
2122 {
2123  // Return the read function if any.
2124 
2125  return fReadFunc;
2126 }
2127 
2129 {
2130  // Return the raw read function if any.
2131 
2132  return fReadRawFunc;
2133 }
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:736
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:1149
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
first
Definition: first.py:1
TStreamerElement::SetStreamer
virtual void SetStreamer(TMemberStreamer *streamer)
set pointer to Streamer function for this element
Definition: TStreamerElement.cxx:509
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:2860
ROOT::kSTLset
@ kSTLset
Definition: ESTLType.h:35
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
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:744
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
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:469
TStreamerSTL::IsaPointer
Bool_t IsaPointer() const
Return true if the data member is a pointer.
Definition: TStreamerElement.cxx:1858
Version_t
short Version_t
Definition: RtypesCore.h:65
TStreamerArtificial::GetReadFunc
ROOT::TSchemaRule::ReadFuncPtr_t GetReadFunc()
Definition: TStreamerElement.cxx:2121
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:692
TStreamerBase::WriteBuffer
Int_t WriteBuffer(TBuffer &b, char *pointer)
Write the base class into the buffer.
Definition: TStreamerElement.cxx:868
TStreamerSTL::TStreamerSTL
TStreamerSTL()
Default ctor.
Definition: TStreamerElement.cxx:1694
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
TStreamerBasicPointer::GetMethod
ULong_t GetMethod() const
return offset of counter
Definition: TStreamerElement.cxx:947
Option_t
const char Option_t
Definition: RtypesCore.h:66
TStreamerBasicPointer::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:974
TStreamerSTL::SetStreamer
virtual void SetStreamer(TMemberStreamer *streamer)
Set pointer to Streamer function for this element NOTE: we do not take ownership.
Definition: TStreamerElement.cxx:1949
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:417
TStreamerBasicType::GetMethod
ULong_t GetMethod() const
return address of counter
Definition: TStreamerElement.cxx:1156
TString::Strip
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
Definition: TString.cxx:1106
TClass::Size
Int_t Size() const
Return size of object of this class.
Definition: TClass.cxx:5575
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:962
UShort_t
unsigned short UShort_t
Definition: RtypesCore.h:40
TStreamerBase::TStreamerBase
TStreamerBase()
Definition: TStreamerElement.cxx:621
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:940
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:2068
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:1880
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:1284
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:1444
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:73
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
TStreamerObject::TStreamerObject
TStreamerObject()
Default ctor.
Definition: TStreamerElement.cxx:1234
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:1166
TStreamerObjectPointer::GetSize
Int_t GetSize() const
Returns size of objectpointer in bytes.
Definition: TStreamerElement.cxx:1478
TDataMember.h
Float_t
float Float_t
Definition: RtypesCore.h:57
ROOT::kSTLany
@ kSTLany
Definition: ESTLType.h:47
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:918
TVirtualStreamerInfo::kCounter
@ kCounter
Definition: TVirtualStreamerInfo.h:84
TStreamerString::~TStreamerString
virtual ~TStreamerString()
TStreamerString dtor.
Definition: TStreamerElement.cxx:1639
TVirtualStreamerInfo::kAnyp
@ kAnyp
Definition: TVirtualStreamerInfo.h:90
TStreamerSTLstring::GetSize
Int_t GetSize() const
Returns size of anyclass in bytes.
Definition: TStreamerElement.cxx:2077
TStreamerString::GetSize
Int_t GetSize() const
Returns size of anyclass in bytes.
Definition: TStreamerElement.cxx:1655
TStreamerObjectAny::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1354
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
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:383
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:7010
TStreamerElement::fArrayDim
Int_t fArrayDim
Definition: TStreamerElement.h:43
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:1272
TClass.h
TList.h
TStreamerString::TStreamerString
TStreamerString()
Default ctor.
Definition: TStreamerElement.cxx:1624
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:6606
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:4553
TStreamerBase::fBaseCheckSum
UInt_t & fBaseCheckSum
Definition: TStreamerElement.h:159
TClass::IsVersioned
Bool_t IsVersioned() const
Definition: TClass.h:482
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:1548
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
TStreamerObjectAnyPointer::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1555
TStreamerBase::GetClassPointer
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
Definition: TStreamerElement.cxx:672
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:373
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:6335
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:1176
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:1134
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:6893
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:2128
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:2902
TStreamerElement::IsBase
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
Definition: TStreamerElement.cxx:442
ROOT::kSTLstring
@ kSTLstring
Definition: ESTLType.h:48
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:2289
TStreamerElement::GetSize
virtual Int_t GetSize() const
Returns size of this element in bytes.
Definition: TStreamerElement.cxx:387
TDataType.h
TStreamerObjectPointer::SetArrayDim
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
Definition: TStreamerElement.cxx:1487
TStreamerLoop::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1089
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:405
ROOT::kSTLmultiset
@ kSTLmultiset
Definition: ESTLType.h:36
TStreamerString::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1646
TStreamerBase::ls
virtual void ls(Option_t *option="") const
Print the content of the element.
Definition: TStreamerElement.cxx:758
TStreamerLoop::GetMethod
ULong_t GetMethod() const
return address of counter
Definition: TStreamerElement.cxx:1056
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:430
TObject::ResetBit
void ResetBit(UInt_t f)
Definition: TObject.h:171
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:395
TStreamerObject::~TStreamerObject
virtual ~TStreamerObject()
TStreamerObject dtor.
Definition: TStreamerElement.cxx:1254
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:1365
TStreamerSTL::ls
virtual void ls(Option_t *option="") const
Print the content of the element.
Definition: TStreamerElement.cxx:1904
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:451
TStreamerBasicPointer::SetArrayDim
void SetArrayDim(Int_t dim)
Set number of array dimensions.
Definition: TStreamerElement.cxx:982
TClass::GetListOfRealData
TList * GetListOfRealData() const
Definition: TClass.h:416
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:6913
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:92
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:2910
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:3377
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:682
ROOT::kSTLunorderedset
@ kSTLunorderedset
Definition: ESTLType.h:42
TStreamerObjectPointer::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1451
TVirtualStreamerInfo::kCache
@ kCache
Definition: TVirtualStreamerInfo.h:97
ROOT::kSTLmultimap
@ kSTLmultimap
Definition: ESTLType.h:34
R__LOCKGUARD
#define R__LOCKGUARD(mutex)
Definition: TVirtualMutex.h:104
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:2283
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:2931
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:1591
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:1380
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:2061
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:1049
TObject::Warning
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:876
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:5809
TStreamerSTL
Definition: TStreamerElement.h:392
TStreamerSTL::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1927
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:498
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
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:2877
TStreamerSTL::CannotSplit
Bool_t CannotSplit() const
We can not split STL's which are inside a variable size array.
Definition: TStreamerElement.cxx:1841
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:74
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:772
TStreamerElement::fClassObject
TClass * fClassObject
Definition: TStreamerElement.h:49
TVirtualStreamerInfo::kBool
@ kBool
Definition: TVirtualStreamerInfo.h:88
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:1566
TStreamerObjectPointer::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1462
TObjArray.h
TClassEdit.h
TStreamerBasicPointer::TStreamerBasicPointer
TStreamerBasicPointer()
pointer to basic type counter
Definition: TStreamerElement.cxx:917
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:665
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:1582
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:708
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:1833
TClass::GetBaseClassOffset
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
Definition: TClass.cxx:2754
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:1069
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:579
fSize
size_t fSize
Definition: DeclareConverters.h:342
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:1727
TStreamerObjectAny::~TStreamerObjectAny
virtual ~TStreamerObjectAny()
TStreamerObjectAny dtor.
Definition: TStreamerElement.cxx:1347
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:847
TVirtualCollectionProxy::GetCollectionType
virtual Int_t GetCollectionType() const =0
TStreamerObjectAny::TStreamerObjectAny
TStreamerObjectAny()
Default ctor.
Definition: TStreamerElement.cxx:1331
TClassStreamer.h
TClassEdit::STLKind
ROOT::ESTLType STLKind(std::string_view type)
Converts STL container name to number.
Definition: TClassEdit.cxx:511
TStreamerLoop::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1081
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:488
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:1125
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
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:1287
TStreamerElement::fType
Int_t fType
Definition: TStreamerElement.h:40
TStreamerObject::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1261
TVirtualStreamerInfo::kTObject
@ kTObject
Definition: TVirtualStreamerInfo.h:90
ROOT
VSD Structures.
Definition: StringConv.hxx:21
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:2030
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:1030
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:1869
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:1425
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:1529
TStreamerSTL::fCtype
Int_t fCtype
Definition: TStreamerElement.h:400