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)
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();
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 {
695  if (!fBaseClass) return;
696 
697  InitStreaming();
698 }
699 
700 ////////////////////////////////////////////////////////////////////////////////
701 /// Setup the fStreamerFunc and fStreamerinfo
702 
704 {
705  if (fNewBaseClass) {
708  if (fBaseVersion > 0 || fBaseCheckSum == 0) {
710  } else {
712  }
713  } else if (fBaseClass && fBaseClass != (TClass*)-1) {
716  if (fBaseVersion >= 0 || fBaseCheckSum == 0) {
718  } else {
720  }
721  } else {
722  fStreamerFunc = 0;
723  fConvStreamerFunc = 0;
724  fStreamerInfo = 0;
725  }
726 }
727 
728 ////////////////////////////////////////////////////////////////////////////////
729 /// Return kTRUE if the element represent a base class.
730 
732 {
733  return kTRUE;
734 }
735 
736 ////////////////////////////////////////////////////////////////////////////////
737 /// Return the proper include for this element.
738 
739 const char *TStreamerBase::GetInclude() const
740 {
743  } else {
744  std::string shortname( TClassEdit::ShortType( GetName(), 1 ) );
745  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
746  }
747  return IncludeNameBuffer();
748 }
749 
750 ////////////////////////////////////////////////////////////////////////////////
751 /// Print the content of the element.
752 
754 {
755  TString sequenceType;
756  GetSequenceType(sequenceType);
757  if (sequenceType.Length()) {
758  sequenceType.Prepend(" (");
759  sequenceType += ") ";
760  }
761  printf(" %-14s %-15s offset=%3d type=%2d %s%-20s\n",GetFullName(),GetTypeName(),fOffset,fType,sequenceType.Data(),GetTitle());
762 }
763 
764 ////////////////////////////////////////////////////////////////////////////////
765 /// Read the content of the buffer.
766 
768 {
769  if (fConvStreamerFunc) {
770  // We have a custom Streamer member function, we must use it.
771  fConvStreamerFunc(b,pointer+fOffset,fNewBaseClass ? fBaseClass : nullptr);
772  } else if (fStreamerFunc) {
773  // We have a custom Streamer member function, we must use it.
774  fStreamerFunc(b,pointer+fOffset);
775  } else {
776  // We don't have a custom Streamer member function. That still doesn't mean
777  // that there is no streamer - it could be an external one:
778  // If the old base class has an adopted streamer we take that
779  // one instead of the new base class:
780  if( fNewBaseClass ) {
782  if (extstrm) {
783  // The new base class has an adopted streamer:
784  extstrm->SetOnFileClass(fBaseClass);
785  (*extstrm)(b, pointer);
786  } else {
787  b.ReadClassBuffer( fNewBaseClass, pointer+fOffset, fBaseClass );
788  }
789  } else {
790  TClassStreamer* extstrm = fBaseClass->GetStreamer();
791  if (extstrm) {
792  // The class has an adopted streamer:
793  (*extstrm)(b, pointer);
794  } else {
795  b.ReadClassBuffer( fBaseClass, pointer+fOffset );
796  }
797  }
798  }
799  return 0;
800 }
801 
802 ////////////////////////////////////////////////////////////////////////////////
803 /// Stream an object of class TStreamerBase.
804 
805 void TStreamerBase::Streamer(TBuffer &R__b)
806 {
807  UInt_t R__s, R__c;
808  if (R__b.IsReading()) {
809  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
810 
811  R__b.ClassBegin(TStreamerBase::Class(), R__v);
812 
813  R__b.ClassMember("TStreamerElement");
814  TStreamerElement::Streamer(R__b);
815  // If the class owning the TStreamerElement and the base class are not
816  // loaded, on the file their streamer info might be in the following
817  // order (derived class,base class) and hence the base class is not
818  // yet emulated.
819  fBaseClass = (TClass*)-1;
820  fNewBaseClass = 0;
821  // Eventually we need a v3 that stores directly fBaseCheckSum (and
822  // a version of TStreamerElement should not stored fMaxIndex)
823  if (R__v > 2) {
824  R__b.ClassMember("fBaseVersion","Int_t");
825  R__b >> fBaseVersion;
826  } else {
827  // could have been: fBaseVersion = GetClassPointer()->GetClassVersion();
830  }
832  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
833  } else {
835  }
836 }
837 
838 ////////////////////////////////////////////////////////////////////////////////
839 ///Function called by the TClass constructor when replacing an emulated class
840 ///by the real class.
841 
842 void TStreamerBase::Update(const TClass *oldClass, TClass *newClass)
843 {
844  TStreamerElement::Update(oldClass, newClass);
845 
846  if (fBaseClass == oldClass) {
847  fBaseClass = newClass;
848  InitStreaming();
849  } else if (fBaseClass == nullptr) {
850  if (fName == newClass->GetName()) {
851  fBaseClass = newClass;
852  InitStreaming();
853  } else if (TClassTable::GetDict(fName)) {
855  InitStreaming();
856  }
857  }
858 }
859 
860 ////////////////////////////////////////////////////////////////////////////////
861 /// Write the base class into the buffer.
862 
864 {
865  if (fStreamerFunc) {
866  // We have a custom Streamer member function, we must use it.
867  fStreamerFunc(b,pointer+fOffset);
868  } else {
869  // We don't have a custom Streamer member function. That still doesn't mean
870  // that there is no streamer - it could be an external one:
871  // If the old base class has an adopted streamer we take that
872  // one instead of the new base class:
873  if (fNewBaseClass) {
875  if (extstrm) {
876  // The new base class has an adopted streamer:
877  extstrm->SetOnFileClass(fBaseClass);
878  (*extstrm)(b, pointer);
879  return 0;
880  } else {
882  return 0;
883  }
884  } else {
885  TClassStreamer* extstrm = fBaseClass->GetStreamer();
886  if (extstrm) {
887  (*extstrm)(b, pointer);
888  return 0;
889  } else {
890  fBaseClass->WriteBuffer(b,pointer+fOffset);
891  return 0;
892  }
893  }
894  }
895  return 0;
896 }
897 
898 //______________________________________________________________________________
899 
900 //////////////////////////////////////////////////////////////////////////
901 // //
902 // TStreamerBasicPointer implements the streamering of pointer to //
903 // fundamental types. //
904 // //
905 //////////////////////////////////////////////////////////////////////////
906 
908 
909 ////////////////////////////////////////////////////////////////////////////////
910 /// Default ctor.
911 
912 TStreamerBasicPointer::TStreamerBasicPointer() : fCountVersion(0),fCountName(),fCountClass(),fCounter(0)
913 {
914  fCounter = 0;
915 }
916 
917 ////////////////////////////////////////////////////////////////////////////////
918 /// Create a TStreamerBasicPointer object.
919 
920 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)
921  : TStreamerElement(name,title,offset,dtype,typeName)
922 {
924  fCountName = countName;
925  fCountClass = countClass;
926  fCountVersion = countVersion; //currently unused
927  Init();
928 // printf("BasicPointer Init:%s, countName=%s, countClass=%s, countVersion=%d, fCounter=%x\n",
929 // name,countName,countClass,countVersion,fCounter);
930 }
931 
932 ////////////////////////////////////////////////////////////////////////////////
933 /// TStreamerBasicPointer dtor.
934 
936 {
937 }
938 
939 ////////////////////////////////////////////////////////////////////////////////
940 /// return offset of counter
941 
943 {
944  if (!fCounter) ((TStreamerBasicPointer*)this)->Init();
945  if (!fCounter) return 0;
946  // FIXME: does not suport multiple inheritance for counter in base class.
947  // This is wrong in case counter is not in the same class or one of
948  // the left most (non virtual) base classes. For the other we would
949  // really need to use the object coming from the list of real data.
950  // (and even that need analysis for virtual base class).
951  return (ULong_t)fCounter->GetOffset();
952 }
953 
954 ////////////////////////////////////////////////////////////////////////////////
955 /// Returns size of basicpointer in bytes.
956 
958 {
959  if (fArrayLength) return fArrayLength*sizeof(void *);
960  return sizeof(void *);
961 }
962 
963 ////////////////////////////////////////////////////////////////////////////////
964 /// Setup the element.
965 /// If directive is a StreamerInfo and it correspond to the
966 /// same class a 'countClass' the streamerInfo is used instead of the current StreamerInfo of the TClass
967 /// for 'countClass'.
968 
970 {
971  fCounter = InitCounter( fCountClass, fCountName, directive );
972 }
973 
974 ////////////////////////////////////////////////////////////////////////////////
975 /// Set number of array dimensions.
976 
978 {
979  fArrayDim = dim;
980  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
981  fNewType = fType;
982 }
983 
984 ////////////////////////////////////////////////////////////////////////////////
985 /// Stream an object of class TStreamerBasicPointer.
986 
987 void TStreamerBasicPointer::Streamer(TBuffer &R__b)
988 {
989  UInt_t R__s, R__c;
990  if (R__b.IsReading()) {
991  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
992  if (R__v > 1) {
993  R__b.ReadClassBuffer(TStreamerBasicPointer::Class(), this, R__v, R__s, R__c);
994  //Init();
995  //fCounter = InitCounter( fCountClass, fCountName );
996  return;
997  }
998  //====process old versions before automatic schema evolution
999  TStreamerElement::Streamer(R__b);
1000  R__b >> fCountVersion;
1001  fCountName.Streamer(R__b);
1002  fCountClass.Streamer(R__b);
1003  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
1004  } else {
1006  }
1007 }
1008 
1009 
1010 //______________________________________________________________________________
1011 
1012 //////////////////////////////////////////////////////////////////////////
1013 // //
1014 // TStreamerLoop implement streaming of a few construct that require //
1015 // looping over the data member and are not convered by other case //
1016 // (most deprecated). //
1017 // //
1018 //////////////////////////////////////////////////////////////////////////
1019 
1021 
1022 ////////////////////////////////////////////////////////////////////////////////
1023 /// Default ctor.
1024 
1025 TStreamerLoop::TStreamerLoop() : fCountVersion(0),fCountName(),fCountClass(),fCounter(0)
1026 {
1027 }
1028 
1029 ////////////////////////////////////////////////////////////////////////////////
1030 /// Create a TStreamerLoop object.
1031 
1032 TStreamerLoop::TStreamerLoop(const char *name, const char *title, Int_t offset, const char *countName, const char *countClass, Int_t countVersion, const char *typeName)
1033  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kStreamLoop,typeName)
1034 {
1035  fCountName = countName;
1036  fCountClass = countClass;
1037  fCountVersion = countVersion; //currently unused
1038  Init();
1039 }
1040 
1041 ////////////////////////////////////////////////////////////////////////////////
1042 /// TStreamerLoop dtor.
1043 
1045 {
1046 }
1047 
1048 ////////////////////////////////////////////////////////////////////////////////
1049 /// return address of counter
1050 
1052 {
1053  //if (!fCounter) {
1054  // Init();
1055  // if (!fCounter) return 0;
1056  //}
1057  if (!fCounter) return 0;
1058  return (ULong_t)fCounter->GetOffset();
1059 }
1060 
1061 ////////////////////////////////////////////////////////////////////////////////
1062 /// Returns size of counter in bytes.
1063 
1065 {
1066  if (fArrayLength) return fArrayLength*sizeof(void*);
1067  return sizeof(void*);
1068 }
1069 
1070 ////////////////////////////////////////////////////////////////////////////////
1071 /// Setup the element.
1072 /// If directive is a StreamerInfo and it correspond to the
1073 /// same class a 'countClass' the streamerInfo is used instead of the current StreamerInfo of the TClass
1074 /// for 'countClass'.
1075 
1077 {
1078  fCounter = InitCounter( fCountClass, fCountName, directive );
1079 }
1080 
1081 ////////////////////////////////////////////////////////////////////////////////
1082 /// Return the proper include for this element.
1083 
1084 const char *TStreamerLoop::GetInclude() const
1085 {
1086  IncludeNameBuffer().Form("<%s>","TString.h"); //to be generalized
1087  return IncludeNameBuffer();
1088 }
1089 
1090 ////////////////////////////////////////////////////////////////////////////////
1091 /// Stream an object of class TStreamerLoop.
1092 
1093 void TStreamerLoop::Streamer(TBuffer &R__b)
1094 {
1095  UInt_t R__s, R__c;
1096  if (R__b.IsReading()) {
1097  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1098  if (R__v > 1) {
1099  R__b.ReadClassBuffer(TStreamerLoop::Class(), this, R__v, R__s, R__c);
1100  //Init();
1101  return;
1102  }
1103  //====process old versions before automatic schema evolution
1104  TStreamerElement::Streamer(R__b);
1105  R__b >> fCountVersion;
1106  fCountName.Streamer(R__b);
1107  fCountClass.Streamer(R__b);
1108  R__b.SetBufferOffset(R__s+R__c+sizeof(UInt_t));
1109  } else {
1111  }
1112 }
1113 
1114 
1115 //______________________________________________________________________________
1116 
1117 //////////////////////////////////////////////////////////////////////////
1118 // //
1119 // TStreamerBasicType implement streaming of fundamental types (int, //
1120 // float, etc.). //
1121 // //
1122 //////////////////////////////////////////////////////////////////////////
1123 
1125 
1126 ////////////////////////////////////////////////////////////////////////////////
1127 /// Default ctor.
1128 
1130 {
1131 }
1132 
1133 ////////////////////////////////////////////////////////////////////////////////
1134 /// Create a TStreamerBasicType object.
1135 
1136 TStreamerBasicType::TStreamerBasicType(const char *name, const char *title, Int_t offset, Int_t dtype, const char *typeName)
1137  : TStreamerElement(name,title,offset,dtype,typeName),fCounter(0)
1138 {
1139 }
1140 
1141 ////////////////////////////////////////////////////////////////////////////////
1142 /// TStreamerBasicType dtor.
1143 
1145 {
1146 }
1147 
1148 ////////////////////////////////////////////////////////////////////////////////
1149 /// return address of counter
1150 
1152 {
1155  return 0;
1156 }
1157 
1158 ////////////////////////////////////////////////////////////////////////////////
1159 /// Returns size of this element in bytes.
1160 
1162 {
1163  return fSize;
1164 }
1165 
1166 ////////////////////////////////////////////////////////////////////////////////
1167 /// Stream an object of class TStreamerBasicType.
1168 
1169 void TStreamerBasicType::Streamer(TBuffer &R__b)
1170 {
1171  UInt_t R__s, R__c;
1172  if (R__b.IsReading()) {
1173  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1174  if (R__v > 1) {
1175  R__b.ReadClassBuffer(TStreamerBasicType::Class(), this, R__v, R__s, R__c);
1176  } else {
1177  //====process old versions before automatic schema evolution
1178  TStreamerElement::Streamer(R__b);
1179  R__b.CheckByteCount(R__s, R__c, TStreamerBasicType::IsA());
1180  }
1181  Int_t type = fType;
1184  }
1185  switch(type) {
1186  // basic types
1187  case TVirtualStreamerInfo::kBool: fSize = sizeof(Bool_t); break;
1188  case TVirtualStreamerInfo::kShort: fSize = sizeof(Short_t); break;
1189  case TVirtualStreamerInfo::kInt: fSize = sizeof(Int_t); break;
1190  case TVirtualStreamerInfo::kLong: fSize = sizeof(Long_t); break;
1191  case TVirtualStreamerInfo::kLong64: fSize = sizeof(Long64_t); break;
1192  case TVirtualStreamerInfo::kFloat: fSize = sizeof(Float_t); break;
1193  case TVirtualStreamerInfo::kFloat16: fSize = sizeof(Float_t); break;
1194  case TVirtualStreamerInfo::kDouble: fSize = sizeof(Double_t); break;
1195  case TVirtualStreamerInfo::kDouble32: fSize = sizeof(Double_t); break;
1196  case TVirtualStreamerInfo::kUChar: fSize = sizeof(UChar_t); break;
1197  case TVirtualStreamerInfo::kUShort: fSize = sizeof(UShort_t); break;
1198  case TVirtualStreamerInfo::kUInt: fSize = sizeof(UInt_t); break;
1199  case TVirtualStreamerInfo::kULong: fSize = sizeof(ULong_t); break;
1200  case TVirtualStreamerInfo::kULong64: fSize = sizeof(ULong64_t); break;
1201  case TVirtualStreamerInfo::kBits: fSize = sizeof(UInt_t); break;
1202  case TVirtualStreamerInfo::kCounter: fSize = sizeof(Int_t); break;
1203  case TVirtualStreamerInfo::kChar: fSize = sizeof(Char_t); break;
1204  case TVirtualStreamerInfo::kCharStar: fSize = sizeof(Char_t*); break;
1205  default: return; // If we don't change the size let's not remultiply it.
1206  }
1207  if (fArrayLength) fSize *= GetArrayLength();
1208  } else {
1210  }
1211 }
1212 
1213 
1214 
1215 //______________________________________________________________________________
1216 
1217 //////////////////////////////////////////////////////////////////////////
1218 // //
1219 // TStreamerObject implements streaming of embedded objects whose type //
1220 // inherits from TObject. //
1221 // //
1222 //////////////////////////////////////////////////////////////////////////
1223 
1225 
1226 ////////////////////////////////////////////////////////////////////////////////
1227 /// Default ctor.
1228 
1230 {
1231 }
1232 
1233 ////////////////////////////////////////////////////////////////////////////////
1234 /// Create a TStreamerObject object.
1235 
1236 TStreamerObject::TStreamerObject(const char *name, const char *title, Int_t offset, const char *typeName)
1237  : TStreamerElement(name,title,offset,0,typeName)
1238 {
1240  if (strcmp(typeName,"TObject") == 0) fType = TVirtualStreamerInfo::kTObject;
1241  if (strcmp(typeName,"TNamed") == 0) fType = TVirtualStreamerInfo::kTNamed;
1242  fNewType = fType;
1243  Init();
1244 }
1245 
1246 ////////////////////////////////////////////////////////////////////////////////
1247 /// TStreamerObject dtor.
1248 
1250 {
1251 }
1252 
1253 ////////////////////////////////////////////////////////////////////////////////
1254 /// Setup the element.
1255 
1257 {
1259  if (fClassObject && fClassObject->IsTObject()) {
1261  }
1262 }
1263 
1264 ////////////////////////////////////////////////////////////////////////////////
1265 /// Return the proper include for this element.
1266 
1267 const char *TStreamerObject::GetInclude() const
1268 {
1269  TClass *cl = GetClassPointer();
1270  if (cl && cl->HasInterpreterInfo()) {
1271  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1272  } else {
1273  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1274  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1275  }
1276  return IncludeNameBuffer();
1277 }
1278 
1279 ////////////////////////////////////////////////////////////////////////////////
1280 /// Returns size of object class in bytes.
1281 
1283 {
1284  TClass *cl = GetClassPointer();
1285  Int_t classSize = 8;
1286  if (cl) classSize = cl->Size();
1287  if (fArrayLength) return fArrayLength*classSize;
1288  return classSize;
1289 }
1290 
1291 ////////////////////////////////////////////////////////////////////////////////
1292 /// Stream an object of class TStreamerObject.
1293 
1294 void TStreamerObject::Streamer(TBuffer &R__b)
1295 {
1296  UInt_t R__s, R__c;
1297  if (R__b.IsReading()) {
1298  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1299  if (R__v > 1) {
1300  R__b.ReadClassBuffer(TStreamerObject::Class(), this, R__v, R__s, R__c);
1301  return;
1302  }
1303  //====process old versions before automatic schema evolution
1304  TStreamerElement::Streamer(R__b);
1305  R__b.CheckByteCount(R__s, R__c, TStreamerObject::IsA());
1306  } else {
1308  }
1309 }
1310 
1311 
1312 //______________________________________________________________________________
1313 
1314 //////////////////////////////////////////////////////////////////////////
1315 // //
1316 // TStreamerObjectAny implement streaming of embedded object not //
1317 // inheriting from TObject. //
1318 // //
1319 //////////////////////////////////////////////////////////////////////////
1320 
1322 
1323 ////////////////////////////////////////////////////////////////////////////////
1324 /// Default ctor.
1325 
1327 {
1328 }
1329 
1330 ////////////////////////////////////////////////////////////////////////////////
1331 /// Create a TStreamerObjectAny object.
1332 
1333 TStreamerObjectAny::TStreamerObjectAny(const char *name, const char *title, Int_t offset, const char *typeName)
1334  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kAny,typeName)
1335 {
1336  Init();
1337 }
1338 
1339 ////////////////////////////////////////////////////////////////////////////////
1340 /// TStreamerObjectAny dtor.
1341 
1343 {
1344 }
1345 
1346 ////////////////////////////////////////////////////////////////////////////////
1347 /// Setup the element.
1348 
1350 {
1352  if (fClassObject && fClassObject->IsTObject()) {
1354  }
1355 }
1356 
1357 ////////////////////////////////////////////////////////////////////////////////
1358 /// Return the proper include for this element.
1359 
1361 {
1362  TClass *cl = GetClassPointer();
1363  if (cl && cl->HasInterpreterInfo()) {
1364  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1365  } else {
1366  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1367  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1368  }
1369  return IncludeNameBuffer();
1370 }
1371 
1372 ////////////////////////////////////////////////////////////////////////////////
1373 /// Returns size of anyclass in bytes.
1374 
1376 {
1377  TClass *cl = GetClassPointer();
1378  Int_t classSize = 8;
1379  if (cl) classSize = cl->Size();
1380  if (fArrayLength) return fArrayLength*classSize;
1381  return classSize;
1382 }
1383 
1384 ////////////////////////////////////////////////////////////////////////////////
1385 /// Stream an object of class TStreamerObjectAny.
1386 
1387 void TStreamerObjectAny::Streamer(TBuffer &R__b)
1388 {
1389  UInt_t R__s, R__c;
1390  if (R__b.IsReading()) {
1391  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1392  if (R__v > 1) {
1393  R__b.ReadClassBuffer(TStreamerObjectAny::Class(), this, R__v, R__s, R__c);
1394  return;
1395  }
1396  //====process old versions before automatic schema evolution
1397  TStreamerElement::Streamer(R__b);
1398  R__b.CheckByteCount(R__s, R__c, TStreamerObjectAny::IsA());
1399  } else {
1401  }
1402 }
1403 
1404 
1405 
1406 //______________________________________________________________________________
1407 
1408 //////////////////////////////////////////////////////////////////////////
1409 // //
1410 // TStreamerObjectPointer implements streaming of pointer to object //
1411 // inheriting from TObject. //
1412 // //
1413 //////////////////////////////////////////////////////////////////////////
1414 
1416 
1417 ////////////////////////////////////////////////////////////////////////////////
1418 /// Default ctor.
1419 
1421 {
1422 }
1423 
1424 ////////////////////////////////////////////////////////////////////////////////
1425 /// Create a TStreamerObjectPointer object.
1426 
1428  Int_t offset, const char *typeName)
1429  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kObjectP,typeName)
1430 {
1431  if (strncmp(title,"->",2) == 0) fType = TVirtualStreamerInfo::kObjectp;
1432  fNewType = fType;
1433  Init();
1434 }
1435 
1436 ////////////////////////////////////////////////////////////////////////////////
1437 /// TStreamerObjectPointer dtor.
1438 
1440 {
1441 }
1442 
1443 ////////////////////////////////////////////////////////////////////////////////
1444 /// Setup the element.
1445 
1447 {
1449  if (fClassObject && fClassObject->IsTObject()) {
1451  }
1452 }
1453 
1454 ////////////////////////////////////////////////////////////////////////////////
1455 /// Return the proper include for this element.
1456 
1458 {
1459  TClass *cl = GetClassPointer();
1460  if (cl && cl->HasInterpreterInfo()) {
1461  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1462  } else {
1463  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1464  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1465  }
1466 
1467  return IncludeNameBuffer();
1468 }
1469 
1470 ////////////////////////////////////////////////////////////////////////////////
1471 /// Returns size of objectpointer in bytes.
1472 
1474 {
1475  if (fArrayLength) return fArrayLength*sizeof(void *);
1476  return sizeof(void *);
1477 }
1478 
1479 ////////////////////////////////////////////////////////////////////////////////
1480 /// Set number of array dimensions.
1481 
1483 {
1484  fArrayDim = dim;
1485  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
1486  fNewType = fType;
1487 }
1488 
1489 ////////////////////////////////////////////////////////////////////////////////
1490 /// Stream an object of class TStreamerObjectPointer.
1491 
1492 void TStreamerObjectPointer::Streamer(TBuffer &R__b)
1493 {
1494  UInt_t R__s, R__c;
1495  if (R__b.IsReading()) {
1496  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1497  if (R__v > 1) {
1498  R__b.ReadClassBuffer(TStreamerObjectPointer::Class(), this, R__v, R__s, R__c);
1499  return;
1500  }
1501  //====process old versions before automatic schema evolution
1502  TStreamerElement::Streamer(R__b);
1503  R__b.CheckByteCount(R__s, R__c, TStreamerObjectPointer::IsA());
1504  } else {
1506  }
1507 }
1508 
1509 
1510 //______________________________________________________________________________
1511 
1512 //////////////////////////////////////////////////////////////////////////
1513 // //
1514 // TStreamerObjectPointerAny implements streaming of pointer to object //
1515 // not inheriting from TObject. //
1516 // //
1517 //////////////////////////////////////////////////////////////////////////
1518 
1520 
1521 ////////////////////////////////////////////////////////////////////////////////
1522 /// Default ctor.
1523 
1525 {
1526 }
1527 
1528 ////////////////////////////////////////////////////////////////////////////////
1529 /// Create a TStreamerObjectAnyPointer object.
1530 
1532  Int_t offset, const char *typeName)
1533  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kAnyP,typeName)
1534 {
1535  if (strncmp(title,"->",2) == 0) fType = TVirtualStreamerInfo::kAnyp;
1536  fNewType = fType;
1537  Init();
1538 }
1539 
1540 ////////////////////////////////////////////////////////////////////////////////
1541 /// TStreamerObjectAnyPointer dtor.
1542 
1544 {
1545 }
1546 
1547 ////////////////////////////////////////////////////////////////////////////////
1548 /// Setup the element.
1549 
1551 {
1553  if (fClassObject && fClassObject->IsTObject()) {
1555  }
1556 }
1557 
1558 ////////////////////////////////////////////////////////////////////////////////
1559 /// Return the proper include for this element.
1560 
1562 {
1563  TClass *cl = GetClassPointer();
1564  if (cl && cl->HasInterpreterInfo()) {
1565  IncludeNameBuffer().Form("\"%s\"",cl->GetDeclFileName());
1566  } else {
1567  std::string shortname( TClassEdit::ShortType( GetTypeName(), 1 ) );
1568  IncludeNameBuffer().Form("\"%s.h\"",shortname.c_str());
1569  }
1570 
1571  return IncludeNameBuffer();
1572 }
1573 
1574 ////////////////////////////////////////////////////////////////////////////////
1575 /// Returns size of objectpointer in bytes.
1576 
1578 {
1579  if (fArrayLength) return fArrayLength*sizeof(void *);
1580  return sizeof(void *);
1581 }
1582 
1583 ////////////////////////////////////////////////////////////////////////////////
1584 /// Set number of array dimensions.
1585 
1587 {
1588  fArrayDim = dim;
1589  //if (dim) fType += TVirtualStreamerInfo::kOffsetL;
1590  fNewType = fType;
1591 }
1592 
1593 ////////////////////////////////////////////////////////////////////////////////
1594 /// Stream an object of class TStreamerObjectAnyPointer.
1595 
1596 void TStreamerObjectAnyPointer::Streamer(TBuffer &R__b)
1597 {
1598  if (R__b.IsReading()) {
1600  } else {
1602  }
1603 }
1604 
1605 
1606 //______________________________________________________________________________
1607 
1608 //////////////////////////////////////////////////////////////////////////
1609 // //
1610 // TSreamerString implements streaming of TString. //
1611 // //
1612 //////////////////////////////////////////////////////////////////////////
1613 
1615 
1616 ////////////////////////////////////////////////////////////////////////////////
1617 /// Default ctor.
1618 
1620 {
1621 }
1622 
1623 ////////////////////////////////////////////////////////////////////////////////
1624 /// Create a TStreamerString object.
1625 
1626 TStreamerString::TStreamerString(const char *name, const char *title, Int_t offset)
1627  : TStreamerElement(name,title,offset,TVirtualStreamerInfo::kTString,"TString")
1628 {
1629 }
1630 
1631 ////////////////////////////////////////////////////////////////////////////////
1632 /// TStreamerString dtor.
1633 
1635 {
1636 }
1637 
1638 ////////////////////////////////////////////////////////////////////////////////
1639 /// Return the proper include for this element.
1640 
1641 const char *TStreamerString::GetInclude() const
1642 {
1643  IncludeNameBuffer().Form("<%s>","TString.h");
1644  return IncludeNameBuffer();
1645 }
1646 
1647 ////////////////////////////////////////////////////////////////////////////////
1648 /// Returns size of anyclass in bytes.
1649 
1651 {
1652  if (fArrayLength) return fArrayLength*sizeof(TString);
1653  return sizeof(TString);
1654 }
1655 
1656 ////////////////////////////////////////////////////////////////////////////////
1657 /// Stream an object of class TStreamerString.
1658 
1659 void TStreamerString::Streamer(TBuffer &R__b)
1660 {
1661  UInt_t R__s, R__c;
1662  if (R__b.IsReading()) {
1663  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1664  if (R__v > 1) {
1665  R__b.ReadClassBuffer(TStreamerString::Class(), this, R__v, R__s, R__c);
1666  return;
1667  }
1668  //====process old versions before automatic schema evolution
1669  TStreamerElement::Streamer(R__b);
1670  R__b.CheckByteCount(R__s, R__c, TStreamerString::IsA());
1671  } else {
1673  }
1674 }
1675 
1676 //______________________________________________________________________________
1677 
1678 //////////////////////////////////////////////////////////////////////////
1679 // //
1680 // TStreamerSTL implements streamer of STL container. //
1681 // //
1682 //////////////////////////////////////////////////////////////////////////
1683 
1685 
1686 ////////////////////////////////////////////////////////////////////////////////
1687 /// Default ctor.
1688 
1689 TStreamerSTL::TStreamerSTL() : fSTLtype(0),fCtype(0)
1690 {
1691 }
1692 
1693 ////////////////////////////////////////////////////////////////////////////////
1694 /// Create a TStreamerSTL object.
1695 
1696 TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
1697  const char *typeName, const TVirtualCollectionProxy &proxy, Bool_t dmPointer)
1698  : TStreamerElement(name,title,offset,ROOT::kSTLany,typeName)
1699 {
1701 
1702  if (name==typeName /* intentional pointer comparison */
1703  || strcmp(name,typeName)==0) {
1704  // We have a base class.
1705  fName = fTypeName;
1706  }
1707  fSTLtype = proxy.GetCollectionType();
1708  fCtype = 0;
1709 
1710  if (dmPointer) fSTLtype += TVirtualStreamerInfo::kOffsetP;
1711 
1712  if (fSTLtype == ROOT::kSTLbitset) {
1713  // Nothing to check
1714  } else if (proxy.GetValueClass()) {
1717  } else {
1718  fCtype = proxy.GetType();
1720  }
1722 }
1723 
1724 ////////////////////////////////////////////////////////////////////////////////
1725 /// Create a TStreamerSTL object.
1726 
1727 TStreamerSTL::TStreamerSTL(const char *name, const char *title, Int_t offset,
1728  const char *typeName, const char *trueType, Bool_t dmPointer)
1729  : TStreamerElement(name,title,offset,ROOT::kSTLany,typeName)
1730 {
1731  const char *t = trueType;
1732  if (!t || !*t) t = typeName;
1733 
1735 
1736  if (name==typeName /* intentional pointer comparison */
1737  || strcmp(name,typeName)==0) {
1738  // We have a base class.
1739  fName = fTypeName;
1740  }
1741 
1742  Int_t nch = strlen(t);
1743  char *s = new char[nch+1];
1744  strlcpy(s,t,nch+1);
1745  char *sopen = strchr(s,'<');
1746  if (sopen == 0) {
1747  Fatal("TStreamerSTL","For %s, the type name (%s) is seemingly not a template (template argument not found)", name, s);
1748  return;
1749  }
1750  *sopen = 0; sopen++;
1751  // We are looking for the first arguments of the STL container, because
1752  // this arguments can be a templates we need to count the < and >
1753  char* current=sopen;
1754  for(int count = 0; *current!='\0'; current++) {
1755  if (*current=='<') count++;
1756  if (*current=='>') {
1757  if (count==0) break;
1758  count--;
1759  }
1760  if (*current==',' && count==0) break;
1761  }
1762  char *sclose = current; *sclose = 0; sclose--;
1763  char *sconst = strstr(sopen,"const ");
1764  char *sbracket = strstr(sopen,"<");
1765  if (sconst && (sbracket==0 || sconst < sbracket)) {
1766  // the string "const" may be part of the classname!
1767  char *pconst = sconst-1;
1768  if (*pconst == ' ' || *pconst == '<' || *pconst == '*' || *pconst == '\0') sopen = sconst + 5;
1769  }
1771  fCtype = 0;
1772  if (fSTLtype == ROOT::kNotSTL) { delete [] s; return;}
1773  if (dmPointer) fSTLtype += TVirtualStreamerInfo::kOffsetP;
1774 
1775  // find STL contained type
1776  while (*sopen==' ') sopen++;
1777  Bool_t isPointer = kFALSE;
1778  // Find stars outside of any template definitions in the
1779  // first template argument.
1780  char *star = strrchr(sopen,'>');
1781  if (star) star = strchr(star,'*');
1782  else star = strchr(sopen,'*');
1783  if (star) {
1784  isPointer = kTRUE;
1785  *star = 0;
1786  sclose = star - 1;
1787  }
1788  while (*sclose == ' ') {*sclose = 0; sclose--;}
1789 
1790 
1791  TDataType *dt = (TDataType*)gROOT->GetListOfTypes()->FindObject(sopen);
1792  if (fSTLtype == ROOT::kSTLbitset) {
1793  // Nothing to check
1794  } else if (dt) {
1795  fCtype = dt->GetType();
1796  if (isPointer) fCtype += TVirtualStreamerInfo::kOffsetP;
1797  } else {
1798  // this could also be a nested enums ... which should work ... be let's see.
1799  TClass *cl = TClass::GetClass(sopen);
1800  if (cl) {
1801  if (isPointer) fCtype = TVirtualStreamerInfo::kObjectp;
1803  } else {
1804  if (gCling->ClassInfo_IsEnum(sopen)) {
1805  if (isPointer) fCtype += TVirtualStreamerInfo::kOffsetP;
1806  } else {
1807  if(strcmp(sopen,"string")) {
1808  // This case can happens when 'this' is a TStreamerElement for
1809  // a STL container containing something for which we do not have
1810  // a TVirtualStreamerInfo (This happens in particular is the collection
1811  // objects themselves are always empty) and we do not have the
1812  // dictionary/shared library for the container.
1813  if (GetClassPointer() && GetClassPointer()->IsLoaded()) {
1814  Warning("TStreamerSTL","For %s we could not find any information about the type %s %d %s",fTypeName.Data(),sopen,fSTLtype,s);
1815  }
1816  }
1817  }
1818  }
1819  }
1820  delete [] s;
1821 
1823 }
1824 
1825 ////////////////////////////////////////////////////////////////////////////////
1826 /// TStreamerSTL dtor.
1827 
1829 {
1830 }
1831 
1832 ////////////////////////////////////////////////////////////////////////////////
1833 /// We can not split STL's which are inside a variable size array.
1834 /// At least for now.
1835 
1837 {
1838  if (IsaPointer()) {
1839  if (GetTitle()[0]=='[') return kTRUE; // can not split variable size array
1840  return kTRUE;
1841  }
1842 
1843  if (GetArrayDim()>=1 && GetArrayLength()>1) return kTRUE;
1844 
1845  if (TStreamerElement::CannotSplit()) return kTRUE;
1846 
1847  return kFALSE;
1848 }
1849 
1850 ////////////////////////////////////////////////////////////////////////////////
1851 /// Return true if the data member is a pointer.
1852 
1854 {
1855  const char *type_name = GetTypeName();
1856  if ( type_name[strlen(type_name)-1]=='*' ) return kTRUE;
1857  else return kFALSE;
1858 }
1859 
1860 
1861 ////////////////////////////////////////////////////////////////////////////////
1862 /// Return kTRUE if the element represent a base class.
1863 
1865 {
1866  TString ts(GetName());
1867 
1868  if (strcmp(ts.Data(),GetTypeName())==0) return kTRUE;
1869  if (strcmp(ts.Data(),GetTypeNameBasic())==0) return kTRUE;
1870  return kFALSE;
1871 }
1872 ////////////////////////////////////////////////////////////////////////////////
1873 /// Returns size of STL container in bytes.
1874 
1876 {
1877  // Since the STL collection might or might not be emulated and that the
1878  // sizeof the object depends on this, let's just always retrieve the
1879  // current size!
1880  TClass *cl = GetClassPointer();
1881  UInt_t size = 0;
1882  if (cl==0) {
1883  if (!TestBit(kWarned)) {
1884  Error("GetSize","Could not find the TClass for %s.\n"
1885  "This is likely to have been a typedef, if possible please declare it in CINT to work around the issue\n",fTypeName.Data());
1886  const_cast<TStreamerSTL*>(this)->SetBit(kWarned);
1887  }
1888  } else {
1889  size = cl->Size();
1890  }
1891 
1892  if (fArrayLength) return fArrayLength*size;
1893  return size;
1894 }
1895 
1896 ////////////////////////////////////////////////////////////////////////////////
1897 /// Print the content of the element.
1898 
1900 {
1901  TString name(kMaxLen);
1902  TString cdim;
1903  name = GetName();
1904  for (Int_t i=0;i<fArrayDim;i++) {
1905  cdim.Form("[%d]",fMaxIndex[i]);
1906  name += cdim;
1907  }
1908  TString sequenceType;
1909  GetSequenceType(sequenceType);
1910  if (sequenceType.Length()) {
1911  sequenceType.Prepend(" (");
1912  sequenceType += ") ";
1913  }
1914  printf(" %-14s %-15s offset=%3d type=%2d %s,stl=%d, ctype=%d, %-20s\n",
1915  GetTypeName(),name.Data(),fOffset,fType,sequenceType.Data(),
1917 }
1918 
1919 ////////////////////////////////////////////////////////////////////////////////
1920 /// Return the proper include for this element.
1921 
1922 const char *TStreamerSTL::GetInclude() const
1923 {
1924  if (fSTLtype == ROOT::kSTLvector) IncludeNameBuffer().Form("<%s>","vector");
1925  else if (fSTLtype == ROOT::kSTLlist) IncludeNameBuffer().Form("<%s>","list");
1926  else if (fSTLtype == ROOT::kSTLforwardlist) IncludeNameBuffer().Form("<%s>","forward_list");
1927  else if (fSTLtype == ROOT::kSTLdeque) IncludeNameBuffer().Form("<%s>","deque");
1928  else if (fSTLtype == ROOT::kSTLmap) IncludeNameBuffer().Form("<%s>","map");
1929  else if (fSTLtype == ROOT::kSTLmultimap) IncludeNameBuffer().Form("<%s>","map");
1930  else if (fSTLtype == ROOT::kSTLset) IncludeNameBuffer().Form("<%s>","set");
1931  else if (fSTLtype == ROOT::kSTLmultiset) IncludeNameBuffer().Form("<%s>","set");
1932  else if (fSTLtype == ROOT::kSTLunorderedset) IncludeNameBuffer().Form("<%s>","unordered_set");
1933  else if (fSTLtype == ROOT::kSTLunorderedmultiset) IncludeNameBuffer().Form("<%s>","unordered_set");
1934  else if (fSTLtype == ROOT::kSTLunorderedmap) IncludeNameBuffer().Form("<%s>","unordered_map");
1935  else if (fSTLtype == ROOT::kSTLunorderedmultimap) IncludeNameBuffer().Form("<%s>","unordered_map");
1936  else if (fSTLtype == ROOT::kSTLbitset) IncludeNameBuffer().Form("<%s>","bitset");
1937  return IncludeNameBuffer();
1938 }
1939 
1940 ////////////////////////////////////////////////////////////////////////////////
1941 /// Set pointer to Streamer function for this element
1942 /// NOTE: we do not take ownership
1943 
1945 {
1946  fStreamer = streamer;
1947 }
1948 
1949 ////////////////////////////////////////////////////////////////////////////////
1950 /// Stream an object of class TStreamerSTL.
1951 
1952 void TStreamerSTL::Streamer(TBuffer &R__b)
1953 {
1954  UInt_t R__s, R__c;
1955  if (R__b.IsReading()) {
1956  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
1957  if (R__v > 2) {
1958  R__b.ReadClassBuffer(TStreamerSTL::Class(), this, R__v, R__s, R__c);
1959  } else {
1960  //====process old versions before automatic schema evolution
1961  TStreamerElement::Streamer(R__b);
1962  R__b >> fSTLtype;
1963  R__b >> fCtype;
1964  R__b.CheckByteCount(R__s, R__c, TStreamerSTL::IsA());
1965  }
1967  // For a long time those where inverted in TStreamerElement
1968  // compared to the other definitions. When we moved to version '4',
1969  // this got standardized, but we now need to fix it.
1970 
1971  if (fTypeName.BeginsWith("std::set") || fTypeName.BeginsWith("set")) {
1973  } else if (fTypeName.BeginsWith("std::multimap") || fTypeName.BeginsWith("multimap")) {
1975  }
1976  }
1977 
1980  if (GetArrayLength() > 0) {
1982  }
1983  if (R__b.GetParent()) { // Avoid resetting during a cloning.
1985  SetBit(kDoNotDelete); // For backward compatibility
1986  } else if ( fSTLtype == ROOT::kSTLmap || fSTLtype == ROOT::kSTLmultimap) {
1987  // Here we would like to set the bit only if one of the element of the pair is a pointer,
1988  // however we have no easy to determine this short of parsing the class name.
1989  SetBit(kDoNotDelete); // For backward compatibility
1990  }
1991  }
1992  return;
1993  } else {
1994  // To enable forward compatibility we actually save with the old value
1995  TStreamerSTL tmp;
1996  // Hand coded copy constructor since the 'normal' one are intentionally
1997  // deleted.
1998  tmp.fName = fName;
1999  tmp.fTitle = fTitle;
2001  tmp.fSize = fSize;
2002  tmp.fArrayLength = fArrayLength;
2003  for(int i = 0; i < 5; ++i)
2004  tmp.fMaxIndex[i] = fMaxIndex[i];
2005  tmp.fTypeName = fTypeName;
2006  tmp.fSTLtype = fSTLtype;
2007  tmp.fCtype = fCtype;
2008  R__b.WriteClassBuffer(TStreamerSTL::Class(), &tmp);
2009  }
2010 }
2011 
2012 //______________________________________________________________________________
2013 
2014 //////////////////////////////////////////////////////////////////////////
2015 // //
2016 // TStreamerSTLstring implements streaming std::string. //
2017 // //
2018 //////////////////////////////////////////////////////////////////////////
2019 
2021 
2022 ////////////////////////////////////////////////////////////////////////////////
2023 /// Default ctor.
2024 
2026 {
2027 }
2028 
2029 ////////////////////////////////////////////////////////////////////////////////
2030 /// Create a TStreamerSTLstring object.
2031 
2032 TStreamerSTLstring::TStreamerSTLstring(const char *name, const char *title, Int_t offset,
2033  const char *typeName, Bool_t dmPointer)
2034  : TStreamerSTL()
2035 {
2036  SetName(name);
2037  SetTitle(title);
2038 
2039  if (dmPointer) {
2041  } else {
2043  }
2044 
2045  fNewType = fType;
2046  fOffset = offset;
2049  fTypeName= typeName;
2050 
2051 }
2052 
2053 ////////////////////////////////////////////////////////////////////////////////
2054 /// TStreamerSTLstring dtor.
2055 
2057 {
2058 }
2059 
2060 ////////////////////////////////////////////////////////////////////////////////
2061 /// Return the proper include for this element.
2062 
2064 {
2065  IncludeNameBuffer() = "<string>";
2066  return IncludeNameBuffer();
2067 }
2068 
2069 ////////////////////////////////////////////////////////////////////////////////
2070 /// Returns size of anyclass in bytes.
2071 
2073 {
2074  if (fArrayLength) return fArrayLength*sizeof(string);
2075  return sizeof(string);
2076 }
2077 
2078 ////////////////////////////////////////////////////////////////////////////////
2079 /// Stream an object of class TStreamerSTLstring.
2080 
2081 void TStreamerSTLstring::Streamer(TBuffer &R__b)
2082 {
2083  UInt_t R__s, R__c;
2084  if (R__b.IsReading()) {
2085  Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
2086  if (R__v > 1) {
2087  R__b.ReadClassBuffer(TStreamerSTLstring::Class(), this, R__v, R__s, R__c);
2088  return;
2089  }
2090  //====process old versions before automatic schema evolution
2091  TStreamerSTL::Streamer(R__b);
2092  R__b.CheckByteCount(R__s, R__c, TStreamerSTLstring::IsA());
2093  } else {
2095  }
2096 }
2097 
2098 //______________________________________________________________________________
2099 
2100 ///////////////////////////////////////////////////////////////////////////////
2101 // //
2102 // TStreamerArtificial implements StreamerElement injected by a TSchemaRule. //
2103 // //
2104 ///////////////////////////////////////////////////////////////////////////////
2105 
2107 
2108 void TStreamerArtificial::Streamer(TBuffer& /* R__b */)
2109 {
2110  // Avoid streaming the synthetic/artificial streamer elements.
2111 
2112  // Intentionally, nothing to do at all.
2113  return;
2114 }
2115 
2117 {
2118  // Return the read function if any.
2119 
2120  return fReadFunc;
2121 }
2122 
2124 {
2125  // Return the raw read function if any.
2126 
2127  return fReadRawFunc;
2128 }
TVirtualStreamerInfo::kCacheDelete
@ kCacheDelete
Definition: TVirtualStreamerInfo.h:100
TClass::GetStreamerInfo
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
Definition: TClass.cxx:4504
TStreamerBase::IsBase
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
Definition: TStreamerElement.cxx:731
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:1144
TVirtualStreamerInfo::kBits
@ kBits
Definition: TVirtualStreamerInfo.h:87
ROOT::kSTLdeque
@ kSTLdeque
Definition: ESTLType.h:32
TStreamerLoop::fCountVersion
Int_t fCountVersion
Definition: TStreamerElement.h:242
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:2854
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:739
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:1853
Version_t
short Version_t
Definition: RtypesCore.h:65
TStreamerArtificial::GetReadFunc
ROOT::TSchemaRule::ReadFuncPtr_t GetReadFunc()
Definition: TStreamerElement.cxx:2116
TStreamerLoop::fCountName
TString fCountName
Definition: TStreamerElement.h:243
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:863
TStreamerSTL::TStreamerSTL
TStreamerSTL()
Default ctor.
Definition: TStreamerElement.cxx:1689
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:942
Option_t
const char Option_t
Definition: RtypesCore.h:66
TStreamerBasicPointer::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:969
TStreamerSTL::SetStreamer
virtual void SetStreamer(TMemberStreamer *streamer)
Set pointer to Streamer function for this element NOTE: we do not take ownership.
Definition: TStreamerElement.cxx:1944
TStreamerBase::InitStreaming
void InitStreaming()
Error message in case of checksum/version mismatch.
Definition: TStreamerElement.cxx:703
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:425
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:1151
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:5518
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:957
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:577
TString::Data
const char * Data() const
Definition: TString.h:369
TStreamerObjectAny
Definition: TStreamerElement.h:312
TBuffer::ReadStaticArray
virtual Int_t ReadStaticArray(Bool_t *b)=0
TStreamerBasicPointer::~TStreamerBasicPointer
virtual ~TStreamerBasicPointer()
TStreamerBasicPointer dtor.
Definition: TStreamerElement.cxx:935
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:2063
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:1875
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:1276
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:1439
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:1229
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:208
TStreamerBasicType::GetSize
Int_t GetSize() const
Returns size of this element in bytes.
Definition: TStreamerElement.cxx:1161
TStreamerObjectPointer::GetSize
Int_t GetSize() const
Returns size of objectpointer in bytes.
Definition: TStreamerElement.cxx:1473
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:1634
TVirtualStreamerInfo::kAnyp
@ kAnyp
Definition: TVirtualStreamerInfo.h:90
TStreamerSTLstring::GetSize
Int_t GetSize() const
Returns size of anyclass in bytes.
Definition: TStreamerElement.cxx:2072
TStreamerString::GetSize
Int_t GetSize() const
Returns size of anyclass in bytes.
Definition: TStreamerElement.cxx:1650
TStreamerObjectAny::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1349
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:373
TNamed::fName
TString fName
Definition: TNamed.h:32
TStreamerArtificial::fReadFunc
ROOT::TSchemaRule::ReadFuncPtr_t fReadFunc
Definition: TStreamerElement.h:455
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:377
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:6941
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:1267
TClass.h
TList.h
TStreamerString::TStreamerString
TStreamerString()
Default ctor.
Definition: TStreamerElement.cxx:1619
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:6539
TStreamerBase::fBaseCheckSum
UInt_t & fBaseCheckSum
Definition: TStreamerElement.h:159
TClass::IsVersioned
Bool_t IsVersioned() const
Definition: TClass.h:475
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:1543
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:1550
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:331
TClass::HasInterpreterInfo
Bool_t HasInterpreterInfo() const
Definition: TClass.h:367
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:6268
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:1129
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:6824
TStreamerBasicType::fCounter
Int_t fCounter
Definition: TStreamerElement.h:276
TNamed::fTitle
TString fTitle
Definition: TNamed.h:33
TStreamerBasicPointer
Definition: TStreamerElement.h:198
TStreamerArtificial::GetReadRawFunc
ROOT::TSchemaRule::ReadRawFuncPtr_t GetReadRawFunc()
Definition: TStreamerElement.cxx:2123
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:2896
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:245
TStreamerElement::kWrite
@ kWrite
Definition: TStreamerElement.h:81
TStreamerLoop
Definition: TStreamerElement.h:235
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:1482
TStreamerLoop::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1084
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:1641
TStreamerBase::ls
virtual void ls(Option_t *option="") const
Print the content of the element.
Definition: TStreamerElement.cxx:753
TStreamerLoop::GetMethod
ULong_t GetMethod() const
return address of counter
Definition: TStreamerElement.cxx:1051
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:1249
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:1360
TStreamerSTL::ls
virtual void ls(Option_t *option="") const
Print the content of the element.
Definition: TStreamerElement.cxx:1899
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:207
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:977
TClass::GetListOfRealData
TList * GetListOfRealData() const
Definition: TClass.h:409
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:6844
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:2904
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:3342
TStreamerLoop::fCountClass
TString fCountClass
Definition: TStreamerElement.h:244
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:1446
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:2269
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:2925
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:1586
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:1375
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:2056
TVirtualMutex.h
TStreamerBasicPointer::fCountName
TString fCountName
Definition: TStreamerElement.h:206
TStreamerBasicPointer::fCountVersion
Int_t fCountVersion
Definition: TStreamerElement.h:205
TStreamerLoop::~TStreamerLoop
virtual ~TStreamerLoop()
TStreamerLoop dtor.
Definition: TStreamerElement.cxx:1044
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:5752
TStreamerSTL
Definition: TStreamerElement.h:391
TStreamerSTL::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1922
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:571
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:2871
TStreamerSTL::CannotSplit
Bool_t CannotSplit() const
We can not split STL's which are inside a variable size array.
Definition: TStreamerElement.cxx:1836
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:767
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:1561
TStreamerObjectPointer::GetInclude
const char * GetInclude() const
Return the proper include for this element.
Definition: TStreamerElement.cxx:1457
TObjArray.h
TClassEdit.h
TStreamerBasicPointer::TStreamerBasicPointer
TStreamerBasicPointer()
pointer to basic type counter
Definition: TStreamerElement.cxx:912
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:293
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:1577
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
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:1828
TClass::GetBaseClassOffset
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
Definition: TClass.cxx:2748
name
char name[80]
Definition: TGX11.cxx:110
TStreamerSTL::fSTLtype
Int_t fSTLtype
Definition: TStreamerElement.h:398
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:456
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:1064
TStreamerBasicType
Definition: TStreamerElement.h:269
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:1719
TStreamerObjectAny::~TStreamerObjectAny
virtual ~TStreamerObjectAny()
TStreamerObjectAny dtor.
Definition: TStreamerElement.cxx:1342
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:842
TVirtualCollectionProxy::GetCollectionType
virtual Int_t GetCollectionType() const =0
TStreamerObjectAny::TStreamerObjectAny
TStreamerObjectAny()
Default ctor.
Definition: TStreamerElement.cxx:1326
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:1076
TDataMember::GetClass
TClass * GetClass() const
Definition: TDataMember.h:73
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:352
TStreamerObject::GetSize
Int_t GetSize() const
Returns size of object class in bytes.
Definition: TStreamerElement.cxx:1282
TStreamerElement::fType
Int_t fType
Definition: TStreamerElement.h:40
TStreamerObject::Init
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Definition: TStreamerElement.cxx:1256
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:2025
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:1025
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:1864
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:1420
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:1524
TStreamerSTL::fCtype
Int_t fCtype
Definition: TStreamerElement.h:399