37namespace std {}
using namespace std;
49 if (className.
Index(
"const ")==0) className.
Remove(0,6);
70 if (!element)
return 0;
77 if (!rdCounter)
return 0;
82 if (!element)
return 0;
120 if (!comments)
return;
121 const char *left = strstr(comments,
"[");
123 const char *right = strstr(left,
"]");
125 const char *comma = strstr(left,
",");
126 if (!comma || comma > right) {
128 left = strstr(right,
"[");
130 right = strstr(left,
"]");
132 comma = strstr(left,
",");
133 if (!comma || comma >right)
return;
136 const char *comma2 = 0;
137 if (comma) comma2 = strstr(comma+1,
",");
138 if (comma2 > right) comma2 = 0;
141 TString sbits(comma2+1,right-comma2-1);
142 sscanf(sbits.
Data(),
"%d",&nbits);
143 if (nbits < 2 || nbits > 32) {
144 ::Error(
"GetRange",
"Illegal specification for the number of bits; %d. reset to 32.",nbits);
149 TString range(left+1,right-left-1);
150 TString sxmin(left+1,comma-left-1);
164 TString sxmax(comma+1,right-comma-1);
179 if (nbits < 32) bigint = 1<<nbits;
180 else bigint = 0xffffffff;
220 if (typeName && !strcmp(typeName,
"BASE")) {
266 static TClassRef clonesArray(
"TClonesArray");
310 char *action = (
char*)strstr(
GetTitle(),
"EXEC:");
311 if (!action)
return 0;
312 Int_t nch = strlen(action)+1;
313 char *caction =
new char[nch];
314 strlcpy(caction,action+5,nch);
315 char *blank = (
char*)strchr(caction,
' ');
316 if (blank) *blank = 0;
350 sequenceType.
Clear();
353 if (!
first) sequenceType +=
",";
355 sequenceType +=
"wholeObject";
359 sequenceType +=
"cached";
362 if (!
first) sequenceType +=
",";
364 sequenceType +=
"repeat";
367 if (!
first) sequenceType +=
",";
369 sequenceType +=
"nodelete";
372 if (!
first) sequenceType +=
",";
374 sequenceType +=
"write";
470 if (sequenceType.
Length()) {
472 sequenceType +=
") ";
474 printf(
" %-14s %-15s offset=%3d type=%2d %s%-20s\n",
494 if (dim < 0 || dim > 4)
return;
511void TStreamerElement::Streamer(
TBuffer &R__b)
522 TNamed::Streamer(R__b);
588 if (classname == newClass->
GetName()) {
617 fBaseCheckSum( *( (
UInt_t*)&(fMaxIndex[1]) ) ),
618 fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
632 fBaseCheckSum( *( (
UInt_t*)&(fMaxIndex[1]) ) ),
633 fStreamerFunc(0), fConvStreamerFunc(0), fStreamerInfo(0)
679 if (cl)
return cl->
Size();
751 if (sequenceType.
Length()) {
753 sequenceType +=
") ";
779 (*extstrm)(
b, pointer);
787 (*extstrm)(
b, pointer);
799void TStreamerBase::Streamer(
TBuffer &R__b)
808 TStreamerElement::Streamer(R__b);
872 (*extstrm)(
b, pointer);
881 (*extstrm)(
b, pointer);
954 return sizeof(
void *);
981void TStreamerBasicPointer::Streamer(
TBuffer &R__b)
993 TStreamerElement::Streamer(R__b);
1061 return sizeof(
void*);
1087void TStreamerLoop::Streamer(
TBuffer &R__b)
1098 TStreamerElement::Streamer(R__b);
1163void TStreamerBasicType::Streamer(
TBuffer &R__b)
1172 TStreamerElement::Streamer(R__b);
1279 Int_t classSize = 8;
1280 if (cl) classSize = cl->
Size();
1288void TStreamerObject::Streamer(
TBuffer &R__b)
1298 TStreamerElement::Streamer(R__b);
1372 Int_t classSize = 8;
1373 if (cl) classSize = cl->
Size();
1381void TStreamerObjectAny::Streamer(
TBuffer &R__b)
1391 TStreamerElement::Streamer(R__b);
1422 Int_t offset,
const char *typeName)
1470 return sizeof(
void *);
1486void TStreamerObjectPointer::Streamer(
TBuffer &R__b)
1496 TStreamerElement::Streamer(R__b);
1526 Int_t offset,
const char *typeName)
1574 return sizeof(
void *);
1590void TStreamerObjectAnyPointer::Streamer(
TBuffer &R__b)
1653void TStreamerString::Streamer(
TBuffer &R__b)
1663 TStreamerElement::Streamer(R__b);
1697 || strcmp(
name,typeName)==0) {
1722 const char *typeName,
const char *trueType,
Bool_t dmPointer)
1725 const char *t = trueType;
1726 if (!t || !*t) t = typeName;
1731 || strcmp(
name,typeName)==0) {
1736 Int_t nch = strlen(t);
1737 char *
s =
new char[nch+1];
1739 char *sopen = strchr(
s,
'<');
1741 Fatal(
"TStreamerSTL",
"For %s, the type name (%s) is seemingly not a template (template argument not found)",
name,
s);
1744 *sopen = 0; sopen++;
1747 char* current=sopen;
1748 for(
int count = 0; *current!=
'\0'; current++) {
1749 if (*current==
'<') count++;
1750 if (*current==
'>') {
1751 if (count==0)
break;
1754 if (*current==
',' && count==0)
break;
1756 char *sclose = current; *sclose = 0; sclose--;
1757 char *sconst = strstr(sopen,
"const ");
1758 char *sbracket = strstr(sopen,
"<");
1759 if (sconst && (sbracket==0 || sconst < sbracket)) {
1761 char *pconst = sconst-1;
1762 if (*pconst ==
' ' || *pconst ==
'<' || *pconst ==
'*' || *pconst ==
'\0') sopen = sconst + 5;
1770 while (*sopen==
' ') sopen++;
1774 char *star = strrchr(sopen,
'>');
1775 if (star) star = strchr(star,
'*');
1776 else star = strchr(sopen,
'*');
1782 while (*sclose ==
' ') {*sclose = 0; sclose--;}
1801 if(strcmp(sopen,
"string")) {
1850 if ( type_name[strlen(type_name)-1]==
'*' )
return kTRUE;
1878 Error(
"GetSize",
"Could not find the TClass for %s.\n"
1879 "This is likely to have been a typedef, if possible please declare it in CINT to work around the issue\n",
fTypeName.
Data());
1904 if (sequenceType.
Length()) {
1906 sequenceType +=
") ";
1908 printf(
" %-14s %-15s offset=%3d type=%2d %s,stl=%d, ctype=%d, %-20s\n",
1946void TStreamerSTL::Streamer(
TBuffer &R__b)
1955 TStreamerElement::Streamer(R__b);
2004 for(
int i = 0; i < 5; ++i)
2034 const char *typeName,
Bool_t dmPointer)
2076 return sizeof(string);
2082void TStreamerSTLstring::Streamer(
TBuffer &R__b)
2092 TStreamerSTL::Streamer(R__b);
2109void TStreamerArtificial::Streamer(
TBuffer& )
unsigned long long ULong64_t
void Error(const char *location, const char *msgfmt,...)
R__EXTERN TVirtualMutex * gInterpreterMutex
R__EXTERN TInterpreter * gCling
static TStreamerBasicType * InitCounter(const char *countClass, const char *countName, TVirtualStreamerInfo *directive)
Helper function to initialize the 'index/counter' value of the Pointer streamerElements.
static TString & IncludeNameBuffer()
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,...
static TString ExtractClassName(const TString &type_name)
#define R__LOCKGUARD(mutex)
void(* ReadFuncPtr_t)(char *, TVirtualObject *)
void(* ReadRawFuncPtr_t)(char *, TBuffer &)
Buffer base class used for serializing objects.
virtual void ClassBegin(const TClass *, Version_t=-1)=0
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TObject * GetParent() const
Return pointer to parent of this buffer.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual void ClassEnd(const TClass *)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
void SetBufferOffset(Int_t offset=0)
virtual Int_t ReadStaticArray(Bool_t *b)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TClassRef is used to implement a permanent reference to a TClass object.
virtual void SetOnFileClass(const TClass *cl)
static DictFuncPtr_t GetDict(const char *cname)
Given the class name returns the Dictionary() function of a class (uses hash of name).
TClass instances represent classes, structs and namespaces in the ROOT type system.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
ClassStreamerFunc_t GetStreamerFunc() const
Get a wrapper/accessor function around this class custom streamer (member function).
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
Bool_t HasInterpreterInfo() const
TList * GetListOfRealData() const
Int_t Size() const
Return size of object of this class.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
ClassConvStreamerFunc_t GetConvStreamerFunc() const
Get a wrapper/accessor function around this class custom conversion streamer (member function).
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
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...
TVirtualStreamerInfo * FindConversionStreamerInfo(const char *onfile_classname, UInt_t checksum) const
Return a Conversion StreamerInfo from the class 'classname' for the layout represented by 'checksum' ...
Bool_t IsVersioned() const
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
Version_t GetClassVersion() const
const char * GetDeclFileName() const
Return name of the file containing the declaration of this class.
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.
Int_t WriteBuffer(TBuffer &b, void *pointer, const char *info="")
Function called by the Streamer functions to serialize object at p to buffer b.
All ROOT classes may have RTTI (run time type identification) support added.
TClass * GetClass() const
Basic data type descriptor (datatype information is obtained from CINT).
TString GetTypeName()
Get basic type of typedef, e,g.
virtual Bool_t ClassInfo_IsEnum(const char *) const
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
The TRealData class manages the effective list of all data members for a given class.
TDataMember * GetDataMember() const
static Int_t AddExec(const char *name)
If Exec with name does not exist in the list of Execs, it is created.
ROOT::TSchemaRule::ReadRawFuncPtr_t GetReadRawFunc()
ROOT::TSchemaRule::ReadRawFuncPtr_t fReadRawFunc
ROOT::TSchemaRule::ReadFuncPtr_t GetReadFunc()
ROOT::TSchemaRule::ReadFuncPtr_t fReadFunc
void InitStreaming()
Error message in case of checksum/version mismatch.
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
Int_t WriteBuffer(TBuffer &b, char *pointer)
Write the base class into the buffer.
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
const char * GetInclude() const
Return the proper include for this element.
virtual ~TStreamerBase()
TStreamerBase dtor.
TClass * fBaseClass
checksum of the base class (used during memberwise streaming)
Int_t ReadBuffer(TBuffer &b, char *pointer)
Read the content of the buffer.
ClassConvStreamerFunc_t fConvStreamerFunc
Pointer to a wrapper around a custom streamer member function.
TClass * fNewBaseClass
pointer to base class
Int_t GetSize() const
Returns size of baseclass in bytes.
TVirtualStreamerInfo * fStreamerInfo
Pointer to a wrapper around a custom convertion streamer member function.
virtual void Update(const TClass *oldClass, TClass *newClass)
Function called by the TClass constructor when replacing an emulated class by the real class.
ClassStreamerFunc_t fStreamerFunc
pointer to new base class if renamed
virtual void ls(Option_t *option="") const
Print the content of the element.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual ~TStreamerBasicPointer()
TStreamerBasicPointer dtor.
void SetArrayDim(Int_t dim)
Set number of array dimensions.
Int_t GetSize() const
Returns size of basicpointer in bytes.
ULong_t GetMethod() const
return offset of counter
TStreamerBasicPointer()
pointer to basic type counter
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
TStreamerBasicType * fCounter
Int_t GetSize() const
Returns size of this element in bytes.
ULong_t GetMethod() const
return address of counter
TStreamerBasicType()
value of data member when referenced by an array
virtual ~TStreamerBasicType()
TStreamerBasicType dtor.
TStreamerElement()
Default ctor.
virtual Int_t GetSize() const
Returns size of this element in bytes.
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...
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
virtual ~TStreamerElement()
TStreamerElement dtor.
Int_t GetArrayDim() const
TMemberStreamer * GetStreamer() const
Return the local streamer object.
Int_t fTObjectOffset
element offset in class
Double_t fXmax
Minimum of data member if a range is specified [xmin,xmax,nbits].
Int_t GetArrayLength() const
virtual void SetStreamer(TMemberStreamer *streamer)
set pointer to Streamer function for this element
TMemberStreamer * fStreamer
new element class when reading
TString fTypeName
new element type when reading
virtual Bool_t IsTransient() const
Return kTRUE if the element represent an entity that is not written to the disk (transient members,...
Double_t fFactor
Maximum of data member if a range is specified [xmin,xmax,nbits].
virtual Bool_t IsaPointer() const
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class
const char * GetTypeName() const
virtual Bool_t CannotSplit() const
Returns true if the element cannot be split, false otherwise.
virtual void SetType(Int_t dtype)
virtual void Init(TVirtualStreamerInfo *obj=0)
Initliaze the element.
Double_t fXmin
pointer to element Streamer
const char * GetTypeNameBasic() const
Return type name of this element in case the type name is not a standard basic type,...
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
virtual Int_t GetExecID() const
Returns the TExec id for the EXEC instruction in the comment field of a TRef data member.
TClass * fNewClass
pointer to class of object
virtual void SetMaxIndex(Int_t dim, Int_t max)
set maximum index for array with dimension dim
void GetSequenceType(TString &type) const
Fill type with the string representation of sequence information including 'cached',...
Int_t fNewType
base offset for TObject if the element inherits from it
virtual void ls(Option_t *option="") const
Print the content of the element.
TStreamerBasicType * fCounter
virtual ~TStreamerLoop()
TStreamerLoop dtor.
ULong_t GetMethod() const
return address of counter
const char * GetInclude() const
Return the proper include for this element.
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Int_t GetSize() const
Returns size of counter in bytes.
TStreamerLoop()
pointer to basic type counter
Int_t GetSize() const
Returns size of objectpointer in bytes.
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
const char * GetInclude() const
Return the proper include for this element.
virtual ~TStreamerObjectAnyPointer()
TStreamerObjectAnyPointer dtor.
TStreamerObjectAnyPointer()
Default ctor.
virtual ~TStreamerObjectAny()
TStreamerObjectAny dtor.
Int_t GetSize() const
Returns size of anyclass in bytes.
TStreamerObjectAny()
Default ctor.
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
const char * GetInclude() const
Return the proper include for this element.
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
TStreamerObjectPointer()
Default ctor.
const char * GetInclude() const
Return the proper include for this element.
virtual ~TStreamerObjectPointer()
TStreamerObjectPointer dtor.
Int_t GetSize() const
Returns size of objectpointer in bytes.
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
const char * GetInclude() const
Return the proper include for this element.
TStreamerObject()
Default ctor.
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
virtual ~TStreamerObject()
TStreamerObject dtor.
Int_t GetSize() const
Returns size of object class in bytes.
const char * GetInclude() const
Return the proper include for this element.
Int_t GetSize() const
Returns size of STL container in bytes.
Bool_t CannotSplit() const
We can not split STL's which are inside a variable size array.
TStreamerSTL()
Default ctor.
virtual void ls(Option_t *option="") const
Print the content of the element.
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
virtual ~TStreamerSTL()
TStreamerSTL dtor.
virtual void SetStreamer(TMemberStreamer *streamer)
Set pointer to Streamer function for this element NOTE: we do not take ownership.
Bool_t IsaPointer() const
Return true if the data member is a pointer.
const char * GetInclude() const
Return the proper include for this element.
virtual ~TStreamerSTLstring()
TStreamerSTLstring dtor.
Int_t GetSize() const
Returns size of anyclass in bytes.
TStreamerSTLstring()
Default ctor.
TStreamerString()
Default ctor.
Int_t GetSize() const
Returns size of anyclass in bytes.
const char * GetInclude() const
Return the proper include for this element.
virtual ~TStreamerString()
TStreamerString dtor.
void ToLower()
Change string to lower-case.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
void Clear()
Clear string without changing its capacity.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
TString & Remove(Ssiz_t pos)
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual EDataType GetType() const =0
virtual TClass * GetValueClass() const =0
virtual Int_t GetCollectionType() const =0
virtual Bool_t HasPointers() const =0
Abstract Interface class describing Streamer information for one class.
static TStreamerBasicType * GetElementCounter(const char *countName, TClass *cl)
Get pointer to a TStreamerBasicType in TClass *cl static function.
virtual TObjArray * GetElements() const =0
virtual TClass * GetClass() const =0
ROOT::ESTLType STLKind(std::string_view type)
Converts STL container name to number.
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
static constexpr double s