90 for(
Int_t ind = last-1; ind >= at; --ind) {
91 arr->
AddAt( arr->
At(ind), ind+1);
99 Int_t offset = objs.size();
102 for(
Int_t ind = last-1; ind >= at; --ind) {
103 arr->
AddAt( arr->
At(ind), ind+offset);
105 for(
size_t ins = 0; ins < objs.size(); ++ins) {
106 arr->
AddAt(objs[ins], at+ins);
115 while (at<last && arr->At(at) != oldobj) {
127 while (at<last && arr->At(at) != oldobj) {
237 struct TPreventRecursiveBuildGuard {
238 TPreventRecursiveBuildGuard(
TStreamerInfo* info): fInfo(info) {
242 ~TPreventRecursiveBuildGuard() {
273 TPreventRecursiveBuildGuard buildGuard(
this);
299 ROOT::TSchemaRuleSet::TMatches rules;
324 Error(
"Build()",
"Cannot stream virtual base %s of class %s",
328 const char* bname = base->
GetName();
329 const char* btitle = base->
GetTitle();
331 if (!strcmp(bname,
"string")) {
339 Error(
"Build",
"The class \"%s\" is compiled and its base class \"%s\" is a collection and we do not have a dictionary for it, we will not be able to read or write this base class.",
GetName(),bname);
353 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
369 if (!clm->
IsLoaded() && !(isCollection || isString)) {
372 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
388 std::string typeNameBuf;
389 std::string trueTypeNameBuf;
407 const char* dmName = dm->
GetName();
408 const char* dmTitle = dm->
GetTitle();
414 std::array<Int_t, 5> maxIndices;
424 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
425 dmFull = trueTypeNameBuf.c_str();
426 dmType = typeNameBuf.c_str();
433 trueTypeNameBuf = typeNameBuf;
434 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
435 dmFull = dmType = typeNameBuf.c_str();
436 dt =
gROOT->GetType(dmType);
449 const char* rbracket = ::strchr(dmTitle,
']');
450 if (lbracket && rbracket) {
454 Error(
"Build",
"%s, discarding: %s %s, illegal %s\n",
GetName(), dmFull, dmName, dmTitle);
460 if (!dtCounter || !isInteger) {
461 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] (must be Int_t)\n",
GetName(), dmFull, dmName, counterName);
469 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] must be placed before \n",
GetName(), dmFull, dmName, counterName);
479 if (!dmCounter && (strstr(dmFull,
"char*") || strstr(dmFull,
"Char_t*"))) {
481 dsize =
sizeof(
char*);
484 Error(
"Build",
"%s, unknown type: %s %s",
GetName(), dmFull, dmName);
486 }
else if (dmIsPtr && (dtype !=
kCharStar)) {
491 if ((
fName ==
"TString") || (
fName ==
"TClass")) {
494 Error(
"Build",
"%s, discarding: %s %s, no [dimension]\n",
GetName(), dmFull, dmName);
508 static const char* full_string_name =
"basic_string<char,char_traits<char>,allocator<char> >";
509 if (!strcmp(dmType,
"string") || !strcmp(dmType,
"std::string") || !strcmp(dmType, full_string_name)) {
513 if (proxy) element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, *proxy, dmIsPtr);
514 else element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, dmFull, dmIsPtr);
517 auto printErrorMsg = [&](
const char* category)
519 Error(
"Build",
"The class \"%s\" is %s and for its data member \"%s\" we do not have a dictionary for the collection \"%s\". Because of this, we will not be able to read or write this data member.",
GetName(), category, dmName, dmType);
523 printErrorMsg(
"compiled");
529 printErrorMsg(
"interpreted");
538 Error(
"Build",
"%s, unknown type: %s %s\n",
GetName(), dmFull, dmName);
556 Error(
"Build",
"%s: %s has no streamer or dictionary, data member %s will not be saved",
GetName(), dmFull, dmName);
567 Warning(
"Build",
"%s: %s has no streamer or dictionary, data member \"%s\" will not be saved",
GetName(), dmFull, dmName);
579 for (
Int_t i = 0; i < ndim; ++i) {
581 if (isStdArray) maxIndex = maxIndices[i];
601 if ( !wasCompiled && (rules && rules.HasRuleWithSource( element->
GetName(),
kTRUE )) ) {
602 needAllocClass =
kTRUE;
611 && rules && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) )
640 if (needAllocClass) {
714 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
716 if (element->
GetTitle()[0] ==
'<') {
721 if (content[
c] ==
'<') ++level;
722 else if (content[
c] ==
'>') --level;
733 "Update the collection proxy of the class \"%s\" \n"
734 "\tto be similar to \"%s\".",
739 The class %s had a collection proxy when written but it is not an STL\n \
740 collection and we did not record the type of the content of the collection.\n \
741 We will claim the content is a bool (i.e. no data will be read).",
765 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
GetName());
772 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
774 if (element->
GetTitle()[0] ==
'<') {
779 if (content[
c] ==
'<') ++level;
780 else if (content[
c] ==
'>') --level;
791 "Update the collection proxy of the class \"%s\" \n"
792 "\tto be similar to \"%s\".",
797 The class %s had a collection proxy when written but it is not an STL\n \
798 collection and we did not record the type of the content of the collection.\n \
799 We will claim the content is a bool (i.e. no data will be read).",
821 searchOnChecksum =
kFALSE;
827 searchOnChecksum =
kTRUE;
834 searchOnChecksum =
kFALSE;
840 searchOnChecksum =
kTRUE;
850 searchOnChecksum =
kFALSE;
856 searchOnChecksum =
kTRUE;
867 if (!searchOnChecksum) {
872 Int_t ninfos = array->GetEntriesFast() - 1;
873 for (
Int_t i = -1; i < ninfos; ++i) {
888 ninfos = array->GetEntriesFast() - 1;
890 while ((slot < ninfos) && (array->UncheckedAt(slot) != 0)) {
936#ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
997 for (
Int_t i = 0; i < nel; ++i) {
1015 if (oldIsNonVersioned) {
1018 The class %s transitioned from not having a specified class version\n\
1019 to having a specified class version (the current class version is %d).\n\
1020 However too many different non-versioned layouts of the class have been\n\
1021 loaded so far. This prevent the proper reading of objects written with\n\
1022 the class layout version %d, in particular from the file:\n\
1024 To work around this issue, load fewer 'old' files in the same ROOT session.",
1028 The class %s transitioned from not having a specified class version\n\
1029 to having a specified class version (the current class version is %d).\n\
1030 However too many different non-versioned layouts of the class have been\n\
1031 loaded so far. This prevent the proper reading of objects written with\n\
1032 the class layout version %d.\n\
1033 To work around this issue, load fewer 'old' files in the same ROOT session.",
1040 The StreamerInfo for version %d of class %s read from the file %s\n\
1041 has a different checksum than the previously loaded StreamerInfo.\n\
1042 Reading objects of type %s from the file %s \n\
1043 (and potentially other files) might not work correctly.\n\
1044 Most likely the version number of the class was not properly\n\
1045 updated [See ClassDef(%s,%d)].",
1049 The StreamerInfo from %s does not match existing one (%s:%d)\n\
1050 The existing one has not been used yet and will be discarded.\n\
1051 Reading the file %s will work properly, however writing object of\n\
1052 type %s will not work properly. Most likely the version number\n\
1053 of the class was not properly updated [See ClassDef(%s,%d)].",
1059 The StreamerInfo for version %d of class %s\n\
1060 has a different checksum than the previously loaded StreamerInfo.\n\
1061 Reading objects of type %s\n\
1062 (and potentially other files) might not work correctly.\n\
1063 Most likely the version number of the class was not properly\n\
1064 updated [See ClassDef(%s,%d)].",
1068 The StreamerInfo from %s does not match existing one (%s:%d)\n\
1069 The existing one has not been used yet and will be discarded.\n\
1070 Reading should work properly, however writing object of\n\
1071 type %s will not work properly. Most likely the version number\n\
1072 of the class was not properly updated [See ClassDef(%s,%d)].",
1104#ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
1140 The StreamerInfo of class %s read from file %s\n\
1141 has the same version (=%d) as the active class but a different checksum.\n\
1142 You should update the version to ClassDef(%s,%d).\n\
1143 Do not try to write objects with the current class definition,\n\
1147 The StreamerInfo of class %s \n\
1148 has the same version (=%d) as the active class but a different checksum.\n\
1149 You should update the version to ClassDef(%s,%d).\n\
1150 Do not try to write objects with the current class definition,\n\
1158 Fatal(
"BuildCheck",
"\n\
1159 The StreamerInfo of unversioned class %s \n\
1160 has the same version (=%d) as the active class but an old checksum.\n\
1192 fNumber = maininfo->GetNumber();
1225 for (
Int_t i=0;i < ndata;i++) {
1227 if (!element)
break;
1234 if (ty <=
kULong)
continue;
1238 {
for (
int j=ndata-1;j>=i;j--) {elements->
AddAtAndExpand(elements->
At(j),j+1);}}
1239 elements->
AddAt(bt,i);
1261 Warning(
"BuildFor",
"The build of %s streamer info for %s has been requested, but no matching conversion rules were specified",
GetName(), in_memory_cl->
GetName() );
1279 if (oldClass == 0 || newClass == 0)
return kFALSE;
1284 const char *oldname = oldClass->
GetName();
1285 for (
UInt_t i = oldlen, done =
false, nest = 0; (i>0) && !done ; --i) {
1286 switch (oldClass->
GetName()[i-1]) {
1287 case '>' : ++nest;
break;
1288 case '<' :
if (nest==0)
return kFALSE;
1290 case ':' :
if (nest == 0) oldname= &(oldClass->
GetName()[i]); done =
kTRUE;
break;
1293 oldlen = strlen(oldname);
1294 if (!(strlen(newClass->
GetName()) > strlen(oldClass->
GetName()))) {
1298 const char* newEnd = & (newClass->
GetName()[newlen-oldlen]);
1300 if (0 != strcmp(newEnd, oldname)) {
1328 Error(
"ImportStreamerInfo",
"Unable to clone the StreamerInfo for %s.",(*next)->GetName());
1374 if (oldContent == newContent) {
1375 contentMatch =
kTRUE;
1376 }
else if (newContent) {
1379 if (oldFlatContent == newFlatContent) {
1380 contentMatch =
kTRUE;
1386 contentMatch = (newContent==0);
1390 if ((oldContent==0 && oldProxy->
GetType() == newProxy->
GetType())
1467 TClass *FindAlternate(
TClass *context,
const std::string &i_name, std::string& newName)
1473 std::string
name(i_name);
1475 if (
name.compare(0,6,
"const ")==0) {
1481 while(
name[
name.length()-nstars-1]==
'*') {
1486 name.erase(
name.length()-nstars,nstars);
1489 std::string alternate(context->
GetName());
1490 alternate.append(
"::");
1491 alternate.append(
name);
1495 newName.append(altcl->
GetName());
1496 newName.append(suffix);
1500 size_t ctxt_cursor = strlen(context->
GetName());
1501 for (
size_t level = 0; ctxt_cursor != 0; --ctxt_cursor) {
1502 switch (context->
GetName()[ctxt_cursor]) {
1503 case '<': --level;
break;
1504 case '>': ++level;
break;
1505 case ':':
if (level == 0) {
1509 alternate.append(context->
GetName(),ctxt_cursor+1);
1510 alternate.append(
name);
1513 newName.append(altcl->
GetName());
1514 newName.append(suffix);
1554 TClass *firstNewCl =
f ?
f->GetClass() : 0;
1555 TClass *secondNewCl =
s ?
s->GetClass() : 0;
1560 if ((firstNewCl && !firstOldCl) || (secondNewCl && !secondOldCl))
1562 std::vector<std::string> inside;
1566 TClass *firstAltCl = firstOldCl;
1567 TClass *secondAltCl = secondOldCl;
1568 std::string firstNewName;
1569 std::string secondNewName;
1570 if (firstNewCl && !firstOldCl) {
1571 firstAltCl = FindAlternate(context, inside[1], firstNewName);
1572 }
else if (firstAltCl) {
1573 firstNewName = firstAltCl->
GetName();
1575 firstNewName = inside[1];
1577 if (secondNewCl && !secondOldCl) {
1578 secondAltCl = FindAlternate(context, inside[2], secondNewName);
1579 }
else if (secondAltCl) {
1580 secondNewName = secondAltCl->
GetName();
1582 secondNewName = inside[2];
1584 if ((firstNewCl && firstAltCl != firstOldCl) ||
1585 (secondNewCl && secondAltCl != secondOldCl) ) {
1588 std::string alternate = inside[0];
1589 alternate.append(
"<");
1590 alternate.append(firstNewName);
1591 alternate.append(
",");
1592 alternate.append(secondNewName);
1596 if (alternate[alternate.length()-1]==
'>') {
1597 alternate.append(
" ");
1599 alternate.append(
">");
1612 std::vector<std::string> inside;
1617 std::string newName;
1618 TClass *altcl = FindAlternate(context, inside[1], newName);
1621 std::string alternate = inside[0];
1622 alternate.append(
"<");
1623 alternate.append(newName);
1627 if (alternate[alternate.length()-1]==
'>') {
1628 alternate.append(
" ");
1630 alternate.append(
">");
1638 struct TBuildOldGuard {
1664 TBuildOldGuard buildOldGuard(
this);
1667 printf(
"\n====>Rebuilding TStreamerInfo for class: %s, version: %d\n",
GetName(),
fClassVersion);
1711 constexpr size_t kSizeOfPtr =
sizeof(
void*);
1738 ROOT::TSchemaRuleSet::TMatches rules;
1744 Int_t virtualInfoLocAlloc = 0;
1769#if defined(PROPER_IMPLEMEMANTION_OF_BASE_CLASS_RENAMING)
1790 Error(
"BuildOld",
"Could not find base class: %s for %s and could not find any matching rename rule\n", base->
GetName(),
GetName());
1800 Error(
"BuildOld",
"Could not find base class: %s for %s, renaming rule was found but is malformed\n", base->
GetName(),
GetName());
1810 else if( !baseclass ) {
1813 Warning(
"BuildOld",
"Missing base class: %s skipped", base->
GetName());
1815 baseclass =
new TClass(element->
GetName(), 1, 0, 0, -1, -1);
1816 element->
Update(0, baseclass);
1826 if (baseOffset < 0) {
1838 if (!baserule.empty()) {
1849 element->
Init(
this);
1861 if (infobase) baseclass = infobase->
GetClass();
1867 if (infobase && infobase->
fComp == 0) {
1889 if (baseOffset < 0) {
1894 offset += baseclass->
Size();
1901 Int_t baseOffset = -1;
1909 if (strchr(bc->
GetName(),
'<') || !strcmp(bc->
GetName(),
"string")) {
1912 if (bcName == elName) {
1927 Error(
"BuildOld",
"The class \"%s\" is compiled and its base class \"%s\" is a collection and we do not have a dictionary for it, we will not be able to read or write this base class.",
GetName(),bc->
GetName());
1940 if (newInfo ==
this) {
1941 baseOffset = offset;
1943 }
else if (newInfo) {
1947 const char *newElName = newElement->
GetName();
1948 if (newElement->
IsBase() && (strchr(newElName,
'<') || !strcmp(newElName,
"string")) ) {
1951 if (bcName == elName) {
1957 Error(
"BuildOld",
"Could not find STL base class: %s for %s\n", element->
GetName(),
GetName());
1961 asize = newElement->
GetSize();
1964 if (baseOffset == -1) {
1975 if (baseOffset < 0) {
1981 element->
Init(
this);
1996 std::string typeNameBuf;
1997 const char* dmType =
nullptr;
2001 std::array<Int_t, 5> maxIndices;
2012 element->
Init(
this);
2026 element->
Init(
this);
2035 dmType = typeNameBuf.c_str();
2042 dmType = typeNameBuf.c_str();
2043 dt =
gROOT->GetType(dmType);
2050 if (dmClassName.
Index(
"const ")==0) dmClassName.
Remove(0,6);
2055 Error(
"BuildOld",
"The class \"%s\" is compiled and for its data member \"%s\", we do not have a dictionary for the collection \"%s\", we will not be able to read or write this data member.",
GetName(),dm->
GetName(),elemDm->
GetName());
2072 element->
Init(
this);
2091 auto theType = isStdArray ? dt : dm->
GetDataType();
2103 if ((newType == ::
kChar_t) && dmIsPtr && !isArray && !hasCount) {
2105 }
else if (dmIsPtr) {
2107 }
else if (isArray) {
2111 if (newType == -1) {
2118 if (newInfo && (newInfo !=
this)) {
2121 if (newClass == 0) {
2122 newType = newElems ? newElems->
GetType() : -1;
2146 }
else if (element->
GetType() != newType) {
2159 if (oldClass == newClass.
GetClass()) {
2161 }
else if (ClassWasMovedToNamespace(oldClass, newClass.
GetClass())) {
2163 if (0 != (oldv = ImportStreamerInfo(oldClass, newClass.
GetClass()))) {
2164 Warning(
"BuildOld",
"Can not properly load the TStreamerInfo from %s into %s due to a conflict for the class version %d", oldClass->
GetName(), newClass->
GetName(), oldv);
2172 if (ContainerMatchTClonesArray(newClass.
GetClass())) {
2195 TClass *oldFixedClass = FixCollectionV5(
GetClass(),oldClass,newClass);
2196 if (oldFixedClass && oldFixedClass != oldClass) {
2197 element->
Update(oldClass,oldFixedClass);
2198 oldClass = oldFixedClass;
2201 if (CollectionMatch(oldClass, newClass)) {
2214 if (
ms &&
ms->IsValid()) {
2216 switch( element->
GetType() ) {
2242 }
else if (CollectionMatchFloat16(oldClass,newClass)) {
2244 }
else if (CollectionMatchDouble32(oldClass,newClass)) {
2246 }
else if (CollectionMatchLong64(oldClass,newClass)) {
2249 }
else if (CollectionMatchULong64(oldClass,newClass)) {
2262 }
else if(oldClass &&
2279 if (strncmp(dm->
GetTitle(),
"->",2)==0) {
2312 if ((!dmIsPtr || newType==
kSTLp) && (isStdArray ? ndim : dm->
GetArrayDim()) > 0) {
2317 if (newInfo && (newInfo !=
this)) {
2320 newType = newElems->
GetType();
2351 if (newType != -1) {
2359 cannotConvert =
kTRUE;
2363 printf(
"%s We have no clue\n", dm->
GetName());
2364 cannotConvert =
kTRUE;
2367 if (newType != -1) {
2371 cannotConvert =
kTRUE;
2375 cannotConvert =
kTRUE;
2379 if (cannotConvert) {
2402 strcmp(element->
GetName(),
"This") == 0 &&
2408 asize =
sizeof(std::vector<int>);
2414 if ((offset % kSizeOfPtr) != 0) {
2415 offset = offset - (offset % kSizeOfPtr) + kSizeOfPtr;
2421 if (!wasCompiled && rules) {
2422 if (rules.HasRuleWithSource( element->
GetName(),
kTRUE ) ) {
2424 if (allocClass == 0) {
2432 allocClass = infoalloc->
GetClass();
2438 && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2460 }
else if (rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2472 }
else if (rules && rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2508 for (iel = 0; iel < narr; ++iel) {
2511 tai[kel++] = element;
2513 arr[jel++] = element;
2516 for (kel = 0; jel < narr;) {
2517 arr[jel++] = tai[kel++];
2524 if (!wasCompiled && allocClass) {
2581 TMemberInfo(
TClass *parent) : fParent(parent) {};
2583 void SetDataType(
Int_t datatype) {
2584 fDataType = datatype;
2590 void SetClassName(
const char *
name) {
2593 void SetComment(
const char *title) {
2594 const char *left = strstr(title,
"[");
2596 const char *right = strstr(left,
"]");
2599 fComment.
Append(left,right-left);
2617 if (fName != other.fName)
return kTRUE;
2620 if (fDataType != other.fDataType) {
2621 if ( (fDataType == 4 && other.fDataType == 16)
2622 || (fDataType == 16 && other.fDataType == 4) ) {
2624 }
else if ( (fDataType == 14 && other.fDataType == 17)
2625 || (fDataType == 17 && other.fDataType == 14) ) {
2627 }
else if ( (fDataType == 3 && other.fDataType == 6)
2628 ||(fDataType == 6 && other.fDataType == 3) ){
2637 }
else if (fClassName != other.fClassName) {
2638 if ( (fClassName ==
"long" && (other.fClassName ==
"long long" || other.fClassName ==
"Long64_t"))
2639 || ( (fClassName ==
"long long" || fClassName ==
"Long64_t") && other.fClassName ==
"long") ) {
2641 }
else if ( (fClassName ==
"unsigned long" && (other.fClassName ==
"unsigned long long" || other.fClassName ==
"ULong64_t"))
2642 || ( (fClassName ==
"unsigned long long" || fClassName ==
"ULong64_t") && other.fClassName ==
"unsigned long") ) {
2647 if (
name != othername) {
2650 if (!CollectionMatch(cl,otherCl)) {
2651 TClass *oldFixedClass = FixCollectionV5(fParent,cl,otherCl);
2652 if (!oldFixedClass || !CollectionMatch(oldFixedClass,otherCl)) {
2661 return fComment != other.fComment;
2683 char* eaddr = ((
char*)obj) + element->
GetOffset();
2702 if (ecl && (
fClass!=ecl )) {
2721 char* eaddr = ((
char*)obj) + element->
GetOffset();
2738 if (newname && newname[0] &&
fName != newname) {
2741 for(
Int_t i = 0; i < ndata; ++i) {
2774 R__ASSERT( (cl==0 || info==0) && (cl!=0 || info!=0) );
2807 if (el && el->
IsBase()) {
2822 if (infoel && infoel->
IsBase()) {
2823 otherClass = infoel->
GetName();
2834 if (localClass != otherClass) {
2838 "The in-memory layout version %d for class '%s' has a base class (%s) that the on-file layout version %d does not have.",
2840 }
else if (otherClass.
Length()==0) {
2842 "The on-file layout version %d for class '%s' has a base class (%s) that the in-memory layout version %d does not have",
2846 "One base class of the on-file layout version %d and of the in memory layout version %d for '%s' is different: '%s' vs '%s'",
2850 if (!complete)
return kFALSE;
2851 result = result &&
kFALSE;
2855 if (!localBase)
continue;
2858 if (!otherBaseClass)
continue;
2861 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2862 " has the same version (=%d) as the active class but a different checksum.\n"
2863 " You should update the version to ClassDef(%s,%d).\n"
2864 " The objects on this file might not be readable because:\n"
2865 " The in-memory layout version %d for class '%s' has a base class (%s) with version %d but the on-file layout version %d recorded the version number %d for this base class (%s).",
2874 if (!localBaseInfo) {
2878 const TList *list =
file->GetStreamerInfoCache();
2881 if (!localBaseInfo) {
2883 msg.
Form(
" The StreamerInfo of the base class %s (of class %s) read from %s%s\n"
2884 " refers to a checksum (%x) that can not be found neither in memory nor in the file.\n",
2898 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2899 " has the same version (=%d) as the active class but a different checksum.\n"
2900 " You should update the version to ClassDef(%s,%d).\n"
2901 " The objects on this file might not be readable because:\n"
2902 " The in-memory layout version %d for class '%s' has a base class (%s) with checksum %x but the on-file layout version %d recorded the checksum value %x for this base class (%s).",
2912 if (!localBase || !otherBase)
continue;
2918 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2919 " has the same version (=%d) as the active class but a different checksum.\n"
2920 " You should update the version to ClassDef(%s,%d).\n"
2921 " The objects on this file might not be readable because:\n"
2922 " The in-memory layout version %d for class '%s' has a base class (%s) with version %d but the on-file layout version %d recorded the version number %d for this base class (%s).",
2932 if (localBaseInfo == otherBaseInfo ||
2938 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2939 " has the same version (=%d) as the active class but a different checksum.\n"
2940 " You should update the version to ClassDef(%s,%d).\n"
2941 " The objects on this file might not be readable because:\n"
2942 " The in-memory layout version %d for class '%s' has a base class (%s) with checksum %x but the on-file layout version %d recorded the checksum value %x for this base class (%s).",
2950 if (!result && !complete) {
2959 TMemberInfo other(cl ? cl : info->
GetClass());
2970 local.SetName( el->
GetName() );
2972 local.SetComment( el->
GetTitle() );
2973 local.SetDataType( el->
GetType() );
2981 other.SetName( tdm->
GetName() );
2983 other.SetComment( tdm->
GetTitle() );
3010 other.SetName( infoel->
GetName() );
3012 other.SetComment( infoel->
GetTitle() );
3013 other.SetDataType( infoel->
GetType() );
3022 Warning(
"CompareContent",
"The following data member of\nthe in-memory layout version %d of class '%s' is missing from \nthe on-file layout version %d:\n"
3025 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
3027 }
else if (other.fName.Length()==0) {
3028 Warning(
"CompareContent",
"The following data member of\nthe in-memory layout version %d of class '%s' is missing from \nthe on-file layout version %d:\n"
3031 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data());
3033 Warning(
"CompareContent",
"The following data member of\nthe on-file layout version %d of class '%s' differs from \nthe in-memory layout version %d:\n"
3038 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data()
3039 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
3042 result = result &&
kFALSE;
3043 if (!complete)
return result;
3067 constexpr size_t kSizeOfPtr =
sizeof(
void*);
3068 if ((
fSize % kSizeOfPtr) != 0) {
3105 static TClassRef string_classref(
"string");
3106 if (
fClass == string_classref) {
3165 if (allocator)
return allocator->
GetClass();
3215 for (
int i=0; i<il; i++)
id =
id*3+
name[i];
3227 for (
int i=0; i<il; i++)
id =
id*3+
name[i];
3238 if (el->
IsBase())
continue;
3253 for (i=0; i<il; i++)
id =
id*3+
name[i];
3275 type.ReplaceAll(
"ULong64_t",
"unsigned long long");
3276 type.ReplaceAll(
"Long64_t",
"long long");
3277 type.ReplaceAll(
"signed char",
"char");
3278 type.ReplaceAll(
"<signed char",
"<char");
3279 type.ReplaceAll(
",signed char",
",char");
3280 if (
type==
"signed char")
type =
"char";
3284 for (i=0; i<il; i++)
id =
id*3+
type[i];
3299 const char *right = strstr(left,
"]");
3302 while (left != right) {
3346 if (atstart) { fprintf(
file,
" : "); atstart =
kFALSE; }
3347 else fprintf(
file,
" , ");
3348 fprintf(
file,
"%s(const_cast<%s &>( rhs ))\n", element->
GetName(),protoname.
Data());
3351 if (atstart) { fprintf(
file,
" : "); atstart =
kFALSE; }
3352 else fprintf(
file,
" , ");
3353 fprintf(
file,
"%s(const_cast<%s &>( rhs ).%s)\n",element->
GetName(),protoname.
Data(),element->
GetName());
3357 fprintf(
file,
"{\n");
3358 fprintf(
file,
" // This is NOT a copy constructor. This is actually a move constructor (for stl container's sake).\n");
3359 fprintf(
file,
" // Use at your own risk!\n");
3360 fprintf(
file,
" (void)rhs; // avoid warning about unused parameter\n");
3368 if (!defMod) { fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3369 const char *ename = element->
GetName();
3370 const char *colon2 = strstr(ename,
"::");
3371 if (colon2) ename = colon2+2;
3373 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3375 fprintf(
file,
" memset(modrhs.%s,0,%d);\n",ename,element->
GetSize());
3378 const char *ename = element->
GetName();
3381 fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3383 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3386 fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3388 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3392 fprintf(
file,
" for (Int_t i=0;i<%d;i++) %s[i] = rhs.%s[i];\n",element->
GetArrayLength(),ename,ename);
3396 fprintf(
file,
"[0]");
3398 fprintf(
file,
"))[i] = (&(rhs.%s",ename);
3400 fprintf(
file,
"[0]");
3402 fprintf(
file,
"))[i];\n");
3405 if (!defMod) { fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3406 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3409 fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3413 std::string method_name =
"clear";
3415 method_name =
"reset";
3418 fprintf(
file,
" modrhs.%s();\n", method_name.c_str());
3420 fprintf(
file,
" modrhs.%s.%s();\n",ename, method_name.c_str());
3438 const char *ename = element->
GetName();
3439 const char *colon2 = strstr(ename,
"::");
3440 if (colon2) ename = colon2+2;
3443 fprintf(
file,
" %s = 0;\n",ename);
3445 fprintf(
file,
" memset(%s,0,%d);\n",ename,element->
GetSize());
3449 fprintf(
file,
" delete %s; %s = 0;\n",ename,ename);
3451 fprintf(
file,
" for (Int_t i=0;i<%d;i++) delete %s[i]; memset(%s,0,%d);\n",element->
GetArrayLength(),ename,ename,element->
GetSize());
3456 const char *ename = element->
GetName();
3458 fprintf(
file,
" %s = 0;\n",ename);
3460 fprintf(
file,
" delete [] %s; %s = 0;\n",ename,ename);
3464 const char *ename = element->
GetName();
3466 fprintf(
file,
" %s = 0;\n",ename);
3468 fprintf(
file,
" delete %s; %s = 0;\n",ename,ename);
3470 fprintf(
file,
" delete [] %s; %s = 0;\n",ename,ename);
3474 const char *ename = element->
GetName();
3475 const char *prefix =
"";
3478 }
else if ( element->
IsBase() ) {
3487 fprintf(
file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3495 std::vector<std::string> inside;
3498 if (inside[1][inside[1].size()-1]==
'*' || inside[2][inside[2].size()-1]==
'*') {
3499 fprintf(
file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3505 fprintf(
file,
" delete %s; %s = 0;\n",ename,ename);
3522 const char *clname =
GetName();
3524 if (strchr(clname,
':')) {
3526 Int_t len = strlen(clname);
3527 const char *
name = clname;
3530 for (
Int_t cur = 0; cur < len; ++cur) {
3531 switch (clname[cur]) {
3538 if (nest == 0) { cur = len;
continue; }
3542 if (nest == 0 && clname[cur+1] ==
':') {
3545 name = clname + cur + 2;
3552 template_protoname.
Append(clname,pr_pos);
3556 const char *where = strstr(clname,
"<");
3557 isTemplate = where != 0;
3559 template_protoname.
Append(clname,where-clname);
3563 if (needGenericTemplate && isTemplate) {
3565 fprintf(fp,
"#ifndef %s_h\n", templateName.
Data());
3566 fprintf(fp,
"#define %s_h\n", templateName.
Data());
3577 if (!element->
IsBase())
continue;
3579 const char *ename = element->
GetName();
3580 if (nbase == 1) fprintf(fp,
" : public %s",ename);
3581 else fprintf(fp,
" , public %s",ename);
3586 if (subClasses && subClasses->
GetEntries()) {
3587 Bool_t needheader =
true;
3589 TIter subnext(subClasses);
3594 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3596 fprintf(fp,
"\npublic:\n");
3597 fprintf(fp,
"// Nested classes forward declaration.\n");
3601 UInt_t sub_numberOfClasses = 0;
3602 UInt_t sub_numberOfNamespaces;
3610 for (
UInt_t i = 0;i < sub_numberOfClasses;++i) {
3611 fprintf(fp,
"}; // end of class.\n");
3613 if (sub_numberOfNamespaces > 0) {
3614 Error(
"GenerateDeclaration",
"Nested classes %s thought to be inside a namespace inside the class %s",subinfo->
GetName(),
GetName());
3621 fprintf(fp,
"\npublic:\n");
3622 fprintf(fp,
"// Nested classes declaration.\n");
3625 if (subClasses && subClasses->
GetEntries()) {
3631 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3638 fprintf(fp,
"\npublic:\n");
3639 fprintf(fp,
"// Data Members.\n");
3652 if (element->
IsBase())
continue;
3653 const char *ename = element->
GetName();
3685 lt = enamebasic.
Length();
3689 if (lt>=ltype) ltype = lt+1;
3691 for (is = 3+lt; is < (3+ltype); ++is)
line +=
' ';
3696 if (ld>=ldata) ldata = ld+1;
3697 for (is = 3+ltype+ld; is < (3+ltype+ldata); ++is)
line +=
' ';
3701 fprintf(fp,
"%s\n",
line.Data());
3704 if (needGenericTemplate && isTemplate) {
3706 fprintf(fp,
"\n %s() {\n",protoname.
Data());
3709 fprintf(fp,
" %s(const %s & rhs )\n",protoname.
Data(),protoname.
Data());
3712 fprintf(fp,
" virtual ~%s() {\n",protoname.
Data());
3714 fprintf(fp,
" }\n\n");
3718 fprintf(fp,
"\n %s();\n",protoname.
Data());
3719 fprintf(fp,
" %s(const %s & );\n",protoname.
Data(),protoname.
Data());
3720 fprintf(fp,
" virtual ~%s();\n\n",protoname.
Data());
3724 fprintf(sfp,
"#ifndef %s_cxx\n",guard.
Data());
3725 fprintf(sfp,
"#define %s_cxx\n",guard.
Data());
3726 fprintf(sfp,
"%s::%s() {\n",
GetName(),protoname.
Data());
3730 fprintf(sfp,
"%s::%s(const %s & rhs)\n",
GetName(),protoname.
Data(),protoname.
Data());
3734 fprintf(sfp,
"%s::~%s() {\n",
GetName(),protoname.
Data());
3737 fprintf(sfp,
"#endif // %s_cxx\n\n",guard.
Data());
3745 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.
Data(),0);
3747 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.
Data(),
fClassVersion + 1);
3752 for(
UInt_t i=0;i<numberOfNamespaces;++i) {
3753 fprintf(fp,
"} // namespace\n");
3756 if (needGenericTemplate && isTemplate) {
3757 fprintf(fp,
"#endif // generic template declaration\n");
3766 if (inclist[0]==0) {
3772 const char *clname =
GetName();
3773 if (strchr(clname,
'<')) {
3788 const char *ename = element->
GetName();
3789 const char *colon2 = strstr(ename,
"::");
3790 if (colon2) ename = colon2+2;
3797 if (ltype < lt) ltype = lt;
3798 if (ldata < ld) ldata = ld;
3802 incRiostream =
kTRUE;
3808 if (!include[0])
continue;
3810 Bool_t greater = (include[0]==
'<');
3813 if (strncmp(include,
"include/",8)==0) {
3816 if (strncmp(include,
"include\\",9)==0) {
3819 if (strncmp(element->
GetTypeName(),
"pair<",strlen(
"pair<"))==0) {
3821 }
else if (strncmp(element->
GetTypeName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0) {
3824 TString incName( include, strlen(include)-1 );
3845 if (strncmp(
GetName(),
"pair<",strlen(
"pair<"))==0)
return 0;
3846 if (strncmp(
GetName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0)
return 0;
3857 for(
UInt_t i=len; i>0; --i) {
3859 case '>': ++nest;
if (scope==0) { isTemplate =
kTRUE; }
break;
3860 case '<': --nest;
break;
3862 if (nest==0 &&
GetName()[i-1]==
':') {
3865 cl =
gROOT->GetClass(nsname);
3869 }
else if (cl == 0 && extrainfos != 0) {
3884 if (
gDebug) printf(
"generating code for class %s\n",
GetName());
3890 filename.
Form(
"%s/%s.h",dirname,headername.
Data());
3892 FILE *fp = fopen(filename.
Data(),
"w");
3894 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3899 FILE *allfp = fopen(filename.
Data(),
"a");
3901 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3905 fprintf(allfp,
"#include \"%s.h\"\n", headername.
Data());
3908 char *inclist =
new char[50000];
3913 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3914 fprintf(fp,
"// This class has been generated by TFile::MakeProject\n");
3915 fprintf(fp,
"// (%s by ROOT version %s)\n",td.
AsString(),
gROOT->GetVersion());
3916 fprintf(fp,
"// from the StreamerInfo in file %s\n",
gDirectory->GetFile()->GetName());
3917 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3920 fprintf(fp,
"#ifndef %s_h\n",headername.
Data());
3921 fprintf(fp,
"#define %s_h\n",headername.
Data());
3928 TIter subnext(subClasses);
3937 FILE *sfp = fopen( sourcename.
Data(),
"a" );
3941 Error(
"GenerateHeaderFile",
"Could not open %s for appending",sourcename.
Data());
3945 fprintf(fp,
"#endif\n");
3949 if (sfp) fclose(sfp);
3960 char dmbracket[256];
3974 char *rdmc = (
char*)rdm->
GetName();
3977 if (dm->
IsaPointer() && rdmc[0] ==
'*') rdmc++;
3980 if (strcmp(rdmc,dm->
GetName()) == 0) {
3992 if (strstr(rdm->
GetName(),dmbracket)) {
4006 if (elementName == 0)
return 0;
4068 Int_t base_offset = 0;
4069 Int_t local_offset = 0;
4075 if (!base_cl || !base_element) {
4078 base_offset = base_element->
GetOffset();
4081 offset = base_offset + local_offset;
4096 Int_t local_offset = 0;
4105 offset = base_offset + local_offset;
4153 ::Obsolete(
"TStreamerInfo::GetStreamerElementReal",
"v5-34-20",
"v6-00-02");
4155 if (i < 0 || i >=
fNdata)
return 0;
4156 if (j < 0)
return 0;
4161 for (
Int_t ise=0;ise < nelems;ise++) {
4163 if (ise+j >= nelems)
return 0;
4172template <
typename T>
4194#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4216#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4222#define READ_ARRAY(TYPE_t) \
4224 Int_t sub_instance, index; \
4225 Int_t instance = k; \
4227 index = instance / len; \
4228 sub_instance = instance % len; \
4233 TYPE_t **val =(TYPE_t**)(ladd); \
4234 return T((val[sub_instance])[index]); \
4252#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4276template <
typename T>
4285 if (i < 0)
return 0;
4289 if (atype ==
kSTL) {
4291 if (newClass == 0) {
4303 if (j >= nc)
return 0;
4304 char *element_ptr = (
char*)proxy->
At(j);
4305 return GetTypedValueAux<T>(atype,element_ptr,0,1);
4309 return GetTypedValueAux<T>(atype,ladd,j,len);
4318template <
typename T>
4325 if (j >= nc)
return 0;
4340template <
typename T>
4344 if (j >= nc)
return 0;
4346 char *pointer = (
char*)cont->
At(j);
4359template <
typename T>
4364 if (j >= nc)
return 0;
4366 char **ptr = (
char**)cont->
At(j);
4367 char *pointer = *ptr;
4378 if (rules.empty())
return;
4383 for(
auto rule : rules) {
4384 if( rule->IsRenameRule() || rule->IsAliasRule() )
4389 if ( rule->HasTarget( element->
GetName() ) ) {
4392 if ( rule->GetAttributes()[0] != 0 ) {
4393 TString attr( rule->GetAttributes() );
4410 const TObjArray *sources = rule->GetSource();
4411 TIter input(sources);
4413 while((src = input())) {
4422 rule->AsString(ruleStr);
4423 Warning(
"InsertArtificialElements",
"For class %s in StreamerInfo %d is missing the source data member %s when trying to apply the rule:\n %s",
4431 if (!rule)
continue;
4434 typedef std::vector<TStreamerArtificial*> vec_t;
4437 if (rule->GetTarget()==0) {
4445 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4447 toAdd.push_back(newel);
4449 toAdd.reserve(rule->GetTarget()->GetEntries());
4460 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4462 toAdd.push_back(newel);
4467 for(
Int_t other = 1; other < rule->GetTarget()->GetEntries(); ++other) {
4468 objstr = (
TObjString*)(rule->GetTarget()->At(other));
4470 newName = objstr->
String();
4477 toAdd.push_back(newel);
4484 TIter s_iter(rule->GetSource());
4489 if (loc == -1 || (i+1)>loc) {
4505 for(vec_t::iterator iter = toAdd.begin(); iter != toAdd.end(); ++iter) {
4538 while ((obj = next()))
4541 if (strstr(option,
"full") != 0) {
4547 if (sequenceType.
Length()) {
4549 sequenceType +=
"]";
4551 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4553 sequenceType.
Data());
4557 Bool_t wantOrig = strstr(option,
"incOrig") != 0;
4567 if (sequenceType.
Length() != 0) {
4568 sequenceType +=
',';
4570 sequenceType +=
"optimized";
4572 if (sequenceType.
Length()) {
4574 sequenceType +=
"]";
4576 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4578 sequenceType.
Data());
4579 if (optimized && wantOrig) {
4584 if (sequenceType.
Length()) {
4586 sequenceType +=
"]";
4588 Printf(
" j=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4590 sequenceType.
Data());
4608 char* p = (
char*) obj;
4614 p =
new char[
fSize];
4615 memset(p, 0,
fSize);
4647 char**
r = (
char**) eaddr;
4649 for (
Int_t i = 0; i < len; ++i) {
4662 void**
r = (
void**) eaddr;
4669 const char* title = element->
GetTitle();
4670 const char* bracket1 = strrchr(title,
'(');
4671 const char* bracket2 = strrchr(title,
')');
4672 if (bracket1 && bracket2 && (bracket2 != (bracket1 + 1))) {
4673 Int_t len = bracket2 - (bracket1 + 1);
4674 char* clonesClass =
new char[len+1];
4675 clonesClass[0] =
'\0';
4676 strncat(clonesClass, bracket1 + 1, len);
4677 void**
r = (
void**) eaddr;
4679 delete[] clonesClass;
4682 void**
r = (
void**) eaddr;
4693 if (einfo) einfo->
New(eaddr);
4711 if (strcmp(element->
GetName(),
"This")==0 &&
4731 for (
Int_t i = 0; i < len; ++i,
r += size) {
4754 Error(
"NewArray",
"TClass pointer is null!");
4760 char* p = (
char*) ary;
4772 char* dataBegin = (
char*) &
r[2];
4785#define DeleteBasicPointer(addr,element,name) \
4787 name **f = (name**)(addr); \
4788 int n = element->GetArrayLength() ? element->GetArrayLength() : 1;\
4789 for(int j=0;j<n;j++) { \
4804 char *p = (
char*)obj;
4808 for (
Int_t elenum = nelements - 1; elenum >= 0; --elenum) {
4847 void**
r = (
void**) eaddr;
4848 for (
Int_t j = len - 1; j >= 0; --j) {
4862 void**
r = (
void**) eaddr;
4863 for (
Int_t j = len - 1; j >= 0; --j) {
4871 if (etype ==
kBase) {
4886 if (etype ==
kSTL) {
4890 if (strcmp(ele->
GetName(),
"This")==0) {
4914 char*
r = eaddr + (size * (len - 1));
4915 for (
Int_t j = len - 1; j >= 0; --j,
r -= size) {
4937 if (obj == 0)
return;
4939 char* p = (
char*) obj;
4945 if (allocator !=
this) {
4963 if (ary == 0)
return;
4970 char* memBegin = (
char*) &
r[-2];
4972 char* p = ((
char*) ary) + ((arrayLen - 1) * size);
4997 printf(
" %-15s = ",
name);
5010 const static TClassRef stringClass(
"string");
5011 if (
fClass == stringClass) {
5012 std::string *st = (std::string*)(pointer);
5013 printf(
"%s\n",st->c_str());
5016 printf(
"%s\n",st->
Data());
5029 if (aleng > lenmax) aleng = lenmax;
5040 if (!clones) {printf(
" %-15s = \n",
name);
return;}
5041 printf(
" %-15s = ",
name);
5043 if (nc > lenmax) nc = lenmax;
5048 if (aleng > lenmax) aleng = lenmax;
5050 for (
Int_t k=0;k < nc;k++) {
5052 char *ladd = pointer+offset;
5055 if (k < nc-1) printf(
", ");
5065 if (!cont) {printf(
" %-15s = \n",
name);
return;}
5066 printf(
" %-15s = ",
name);
5068 if (nc > lenmax) nc = lenmax;
5073 if (aleng > lenmax) aleng = lenmax;
5075 for (
Int_t k=0;k < nc;k++) {
5076 char *pointer = (
char*)cont->
At(k);
5077 char *ladd = pointer+offset;
5080 if (k < nc-1) printf(
", ");
5088void TStreamerInfo::Streamer(
TBuffer &R__b)
5098 TNamed::Streamer(R__b);
5119 for (
Int_t i = 0; i < nobjects; i++) {
5122 if ( el->IsA() == basic ) {
5142 (*fElements)[i] = rel;
5151 TNamed::Streamer(R__b);
5162 TNamed::Streamer(R__b);
5177 for (
Int_t i = 0; i < nobjects; i++) {
5183 }
else if (el != 0) {
5184 elements.AddLast(el);
5204 static std::atomic<Bool_t> onlyonce(
kFALSE);
5206 if (onlyonce.compare_exchange_strong(expected,
kTRUE)) {
5207 Warning(
"TagFile",
"This function is deprecated, use TBuffer::TagStreamerInfo instead");
5211 if (fNumber < 0 || fNumber >= nindex) {
5212 Error(
"TagFile",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s",
5228#define DOLOOP for (k = 0, pointer = arr[0]; k < narr; pointer = arr[++k])
5231 static void PrintCR(
int j,
Int_t aleng,
UInt_t ltype)
5233 if (j == aleng-1) printf(
"\n");
5236 if (j%ltype == ltype-1) printf(
"\n ");
5261 case kInt: {
Int_t *val = (
Int_t* )ladd; printf(
"%d" ,*val);
break;}
5276 case kOffsetL +
kBool: {
Bool_t *val = (
Bool_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%c " ,val[j]); PrintCR(j,aleng,20); }
break;}
5277 case kOffsetL +
kChar: {
Char_t *val = (
Char_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%c " ,val[j]); PrintCR(j,aleng,20); }
break;}
5279 case kOffsetL +
kInt: {
Int_t *val = (
Int_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%d " ,val[j]); PrintCR(j,aleng,10); }
break;}
5280 case kOffsetL +
kLong: {
Long_t *val = (
Long_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%ld ",val[j]); PrintCR(j,aleng, 5); }
break;}
5288 case kOffsetL +
kUInt: {
UInt_t *val = (
UInt_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%u " ,val[j]); PrintCR(j,aleng, 5); }
break;}
5291 case kOffsetL +
kBits: {
UInt_t *val = (
UInt_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%d " ,val[j]); PrintCR(j,aleng, 5); }
break;}
5294 case kOffsetP +
kBool: {
Bool_t **val = (
Bool_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5295 case kOffsetP +
kChar: {
Char_t **val = (
Char_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5296 case kOffsetP +
kShort: {
Short_t **val = (
Short_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,10); }
break;}
5297 case kOffsetP +
kInt: {
Int_t **val = (
Int_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,10); }
break;}
5298 case kOffsetP +
kLong: {
Long_t **val = (
Long_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%ld ",(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5300 case kOffsetP +
kFloat: {
Float_t **val = (
Float_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%f " ,(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5304 case kOffsetP +
kUChar: {
UChar_t **val = (
UChar_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%u " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5306 case kOffsetP +
kUInt: {
UInt_t **val = (
UInt_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%u " ,(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5307 case kOffsetP +
kULong: {
ULong_t **val = (
ULong_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%lu ",(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5314 char **val = (
char**)ladd;
5315 if (*val) printf(
"%s",*val);
5344 printf(
"%s",st->
Data());
5377 printf(
"printing kAny case (%d)",atype);
5391 printf(
"printing kBase case (%d)",atype);
5401 printf(
"printing kStreamer case (%d)",atype);
5416 printf(
"printing kStreamLoop case (%d)",atype);
5433 if (ladd && aElement->
GetClass() == stringClass) {
5434 std::string *st = (std::string*)(ladd);
5435 printf(
"%s",st->c_str());
5440 printf(
"(unknown_type*)0x%lx",(
Long_t)(ladd));
5456 element->
Update(oldcl,newcl);
unsigned long long ULong64_t
const Bool_t kIterBackward
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
void Error(const char *location, const char *msgfmt,...)
R__EXTERN TVirtualMutex * gInterpreterMutex
static void R__WriteMoveConstructorBody(FILE *file, const TString &protoname, TIter &next)
Write down the body of the 'move' constructor.
static void R__TObjArray_InsertAt(TObjArray *arr, TObject *obj, Int_t at)
static void R__TObjArray_InsertAfter(TObjArray *arr, TObject *newobj, TObject *oldobj)
#define READ_ARRAY(TYPE_t)
static void R__WriteConstructorBody(FILE *file, TIter &next)
#define DeleteBasicPointer(addr, element, name)
static void R__TObjArray_InsertBefore(TObjArray *arr, TObject *newobj, TObject *oldobj)
static void R__WriteDestructorBody(FILE *file, TIter &next)
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
const TMatches FindRules(const TString &source) const
Return all the rules that are about the given 'source' class.
Bool_t HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
const TObjArray * GetTarget() const
Get the target data members of this rule (i.e. the in memory data member).
Array of chars or bytes (8 bits per element).
Each class (see TClass) has a linked list of its base class(es).
Int_t GetDelta()
Get offset from "this" to part of base class.
ROOT::ESTLType IsSTLContainer()
Return which type (if any) of STL container the data member is.
const char * GetTitle() const
Get base class description (comment).
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
Buffer base class used for serializing objects.
virtual void ClassBegin(const TClass *, Version_t=-1)=0
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=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 Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE)=0
virtual void ClassEnd(const TClass *)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t GetVersionOwner() const =0
void SetBufferOffset(Int_t offset=0)
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TClassRef is used to implement a permanent reference to a TClass object.
TClass * GetClass() const
The ROOT global object gROOT contains a list of all defined classes.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
void RemoveStreamerInfo(Int_t slot)
Remove and delete the StreamerInfo in the given slot.
TVirtualStreamerInfo * GetStreamerInfoAbstractEmulated(Int_t version=0) const
For the case where the requestor class is emulated and this class is abstract, returns a pointer to t...
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Bool_t HasDataMemberInfo() const
void CopyCollectionProxy(const TVirtualCollectionProxy &)
Copy the argument.
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Long_t GetDataMemberOffset(const char *membername) const
return offset for member name.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
void RegisterStreamerInfo(TVirtualStreamerInfo *info)
Register the StreamerInfo in the given slot, change the State of the TClass as appropriate.
Bool_t CallShowMembers(const void *obj, TMemberInspector &insp, Bool_t isTransient=kFALSE) const
Call ShowMembers() on the obj of this class type, passing insp and parent.
TVirtualStreamerInfo * GetCurrentStreamerInfo()
void IgnoreTObjectStreamer(Bool_t ignore=kTRUE)
When the class kIgnoreTObjectStreamer bit is set, the automatically generated Streamer will not call ...
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
Bool_t MatchLegacyCheckSum(UInt_t checksum) const
Return true if the checksum passed as argument is one of the checksum value produced by the older che...
Bool_t HasInterpreterInfo() const
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfRealData() const
Int_t Size() const
Return size of object of this class.
Bool_t CanIgnoreTObjectStreamer()
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
const TObjArray * GetStreamerInfos() const
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method).
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Bool_t IsVersioned() const
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
TVirtualStreamerInfo * FindStreamerInfoAbstractEmulated(UInt_t checksum) const
For the case where the requestor class is emulated and this class is abstract, returns a pointer to t...
Version_t GetClassVersion() const
TRealData * GetRealData(const char *name) const
Return pointer to TRealData element with name "name".
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.
An array of clone (identical) objects.
static TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)
Generate emulated collection proxy for a given class.
static TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
static Proxy_t * GenExplicitProxy(const ::ROOT::TCollectionProxyInfo &info, TClass *cl)
Generate proxy from static functions.
static TClassStreamer * GenExplicitClassStreamer(const ::ROOT::TCollectionProxyInfo &info, TClass *cl)
Generate class streamer from static functions.
virtual Int_t GetEntries() const
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Small helper to read a TBuffer containing a TClonesArray into any valid collection.
All ROOT classes may have RTTI (run time type identification) support added.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
const char * GetTrueTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Bool_t IsPersistent() const
Long_t GetOffset() const
Get offset from "this".
Int_t GetArrayDim() const
Return number of array dimensions.
Int_t GetUnitSize() const
Get the sizeof the underlying type of the data member (i.e.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Int_t IsSTLContainer()
The return type is defined in TDictionary (kVector, kList, etc.)
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
TClass * GetClass() const
Basic data type descriptor (datatype information is obtained from CINT).
TString GetTypeName()
Get basic type of typedef, e,g.
Int_t Size() const
Get size of basic typedef'ed type.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsString() const
Return the date & time as a string (ctime() format).
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
static TString GetHeaderName(const char *name, const TList *extrainfos, Bool_t includeNested=kFALSE)
Return the header name containing the description of name.
static UInt_t GenerateForwardDeclaration(FILE *fp, const char *clname, char *inclist, Bool_t implementEmptyClass, Bool_t needGenericTemplate, const TList *extrainfos)
Insert a (complete) forward declaration for the class 'clname'.
static void AddInclude(FILE *fp, const char *header, Bool_t system, char *inclist)
Add an include statement, if it has not already been added.
static UInt_t GenerateIncludeForTemplate(FILE *fp, const char *clname, char *inclist, Bool_t forward, const TList *extrainfos)
Add to the header file, the #include needed for the argument of this template.
static void GeneratePostDeclaration(FILE *fp, const TVirtualStreamerInfo *info, char *inclist)
Add to the header file anything that need to appear after the class declaration (this includes some #...
static UInt_t GenerateClassPrefix(FILE *fp, const char *clname, Bool_t top, TString &protoname, UInt_t *numberOfClasses, Int_t implementEmptyClass=kFALSE, Bool_t needGenericTemplate=kFALSE)
Write the start of the class (forward) declaration.
static TString UpdateAssociativeToVector(const char *name)
If we have a map, multimap, set or multiset, plus unordered partners, and the key is a class,...
Abstract base class for accessing the data-members of a class.
const char * GetParent() const
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr)
void InspectMember(const T &obj, const char *name, Bool_t isTransient)
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 const char * GetTitle() const
Returns title of object.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
virtual void Compress()
Remove empty slots from array.
Int_t GetEntries() const
Return the number of objects in array (i.e.
TObject * UncheckedAt(Int_t i) const
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Int_t GetLast() const
Return index of last object in array.
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
TObject * At(Int_t idx) const
Collectable string class.
Mother of all ROOT objects.
friend class TClonesArray
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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 const char * GetTitle() const
Returns title of object.
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
@ kCanDelete
if object in a list can be deleted
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
The TRealData class manages the effective list of all data members for a given class.
TDataMember * GetDataMember() const
TMemberStreamer * GetStreamer() const
Return the associate streamer object.
virtual const char * GetName() const
Returns name of object.
Long_t GetThisOffset() const
void SetReadFunc(ROOT::TSchemaRule::ReadFuncPtr_t val)
void SetReadRawFunc(ROOT::TSchemaRule::ReadRawFuncPtr_t val)
void SetErrorMessage(const char *msg)
void SetNewBaseClass(TClass *cl)
TVirtualStreamerInfo * GetBaseStreamerInfo() const
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
void SetCountClass(const char *clname)
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
const char * GetCountClass() const
virtual void SetSize(Int_t dsize)
virtual Int_t GetSize() const
Returns size of this element in bytes.
virtual const char * GetInclude() const
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.
Int_t GetArrayDim() const
TClass * GetNewClass() const
Int_t GetArrayLength() const
virtual void SetStreamer(TMemberStreamer *streamer)
set pointer to Streamer function for this element
virtual Bool_t IsTransient() const
Return kTRUE if the element represent an entity that is not written to the disk (transient members,...
Int_t GetMaxIndex(Int_t i) const
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
TClass * GetClass() const
virtual void SetType(Int_t dtype)
virtual void Init(TVirtualStreamerInfo *obj=0)
Initliaze the element.
virtual void SetNewClass(TClass *cl)
virtual void SetTypeName(const char *name)
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 void SetOffset(Int_t offset)
virtual void SetNewType(Int_t dtype)
virtual void SetMaxIndex(Int_t dim, Int_t max)
set maximum index for array with dimension dim
virtual Bool_t HasCounter() const
void GetSequenceType(TString &type) const
Fill type with the string representation of sequence information including 'cached',...
ActionContainer_t fActions
void Update(const TClass *oldcl, TClass *newcl)
Update the TClass pointer cached in this object.
TClass * fClass
Not Owned.
TStreamerElement * fElem
Not Owned.
Describe Streamer information for one class version.
Int_t fNVirtualInfoLoc
! Number of virtual info location to update.
Int_t fOnFileClassVersion
!Class version identifier as stored on file.
TObjArray * GetElements() const
TStreamerElement * GetStreamerElement(const char *datamember, Int_t &offset) const
Return the StreamerElement of "datamember" inside our class or any of its base classes.
void Clear(Option_t *)
If opt contains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (usef...
Int_t fNfulldata
!number of elements
void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)
Recursively mark streamer infos for writing to a file.
Int_t GetSize() const
Return total size of all persistent elements of the class (with offsets).
TCompInfo * fComp
![fNslots with less than fElements->GetEntries()*1.5 used] Compiled info
std::atomic< ULong_t > fLiveCount
! Number of outstanding pointer to this StreamerInfo.
void Compile()
loop on the TStreamerElement list regroup members with same type Store predigested information into l...
T GetTypedValue(char *pointer, Int_t i, Int_t j, Int_t len) const
Return value of element i in object at pointer.
TStreamerInfoActions::TActionSequence * fWriteMemberWiseVecPtr
! List of write action resulting from the compilation for use in member wise streaming.
void * NewArray(Long_t nElements, void *ary=0)
An array of emulated objects is created at address ary, if ary is null, we allocate memory for the ar...
TStreamerInfoActions::TActionSequence * fReadText
! List of text read action resulting from the compilation, used for JSON.
void DeleteArray(void *p, Bool_t dtorOnly=kFALSE)
Destroy an array of emulated objects, with optional delete.
TCompInfo ** fCompFull
![fElements->GetEntries()]
TObjArray * fElements
Array of TStreamerElements.
void InsertArtificialElements(std::vector< const ROOT::TSchemaRule * > &rules)
Insert new members as expressed in the array of TSchemaRule(s).
void PrintValue(const char *name, char *pointer, Int_t i, Int_t len, Int_t lenmax=1000) const
print value of element i in object at pointer The function may be called in two ways: -method1 len < ...
Int_t GetDataMemberOffset(TDataMember *dm, TMemberStreamer *&streamer) const
Compute data member offset.
EReadWrite
Status bits See TVirtualStreamerInfo::EStatusBits for the values.
@ kArtificial
Cache the value in memory than is not part of the object but is accessible via a SchemaRule.
@ kNeedObjectForVirtualBaseClass
@ kUChar
Equal to TDataType's kchar.
TClass * GetActualClass(const void *obj) const
Assuming that obj points to (the part of) an object that is of the type described by this streamerInf...
void BuildCheck(TFile *file=0)
Check if built and consistent with the class dictionary.
T GetTypedValueSTLP(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
Return value of element i in object number j in a TClonesArray and eventually element k in a sub-arra...
void TagFile(TFile *fFile)
Mark the classindex of the current file as using this TStreamerInfo.
TClass * GetClass() const
void ls(Option_t *option="") const
List the TStreamerElement list and also the precomputed tables if option contains the string "incOrig...
T GetTypedValueSTL(TVirtualCollectionProxy *cont, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
Return value of element i in object number j in a TClonesArray and eventually element k in a sub-arra...
Int_t GetOffset(const char *) const
Return the offset of the data member as indicated by this StreamerInfo.
void Destructor(void *p, Bool_t dtorOnly=kFALSE)
Emulated destructor for this class.
void Build()
Build the I/O data structure for the current class version.
TStreamerInfoActions::TActionSequence * fReadMemberWise
! List of read action resulting from the compilation for use in member wise streaming.
void CallShowMembers(const void *obj, TMemberInspector &insp, Bool_t isTransient) const
Emulated a call ShowMembers() on the obj of this class type, passing insp and parent.
Int_t GetType(Int_t id) const
Int_t fClassVersion
Class version identifier.
Int_t fNdata
!number of optimized elements
TStreamerInfo()
Default ctor.
TStreamerInfoActions::TActionSequence * fReadMemberWiseVecPtr
! List of read action resulting from the compilation for use in member wise streaming.
TStreamerInfoActions::TActionSequence * fReadObjectWise
! List of read action resulting from the compilation.
TStreamerElement * GetStreamerElementReal(Int_t i, Int_t j) const
Obsolete: this routine is obsolete and should not longer be used.
void * New(void *obj=0)
An emulated object is created at address obj, if obj is null we allocate memory for the object.
TClass * fClass
!pointer to class
Bool_t MatchLegacyCheckSum(UInt_t checksum) const
Return true if the checksum passed as argument is one of the checksum value produced by the older che...
TCompInfo ** fCompOpt
![fNdata]
Int_t GetOnFileClassVersion() const
virtual Bool_t BuildFor(const TClass *cl)
Check if we can build this for foreign class - do we have some rules to do that.
UInt_t fCheckSum
Checksum of original class.
Int_t GetSizeElements() const
Return total size of all persistent elements of the class use GetSize if you want to get the real siz...
static std::atomic< Int_t > fgCount
Number of TStreamerInfo instances.
T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
UInt_t GenerateIncludes(FILE *fp, char *inclist, const TList *extrainfos)
Add to the header file, the #include need for this class.
virtual TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
void ComputeSize()
Compute total size of all persistent elements of the class.
Int_t fNumber
!Unique identifier
void PrintValueSTL(const char *name, TVirtualCollectionProxy *cont, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in a TClonesArray.
TStreamerInfoActions::TActionSequence * fWriteObjectWise
! List of write action resulting from the compilation.
Bool_t CompareContent(TClass *cl, TVirtualStreamerInfo *info, Bool_t warn, Bool_t complete, TFile *file)
Return True if the current StreamerInfo in cl or info is equivalent to this TStreamerInfo.
Int_t fSize
!size of the persistent class
static T GetTypedValueAux(Int_t type, void *ladd, int k, Int_t len)
Get the value from inside a collection.
void GenerateDeclaration(FILE *fp, FILE *sfp, const TList *subClasses, Bool_t top=kTRUE)
Write the Declaration of class.
static void PrintValueAux(char *ladd, Int_t atype, TStreamerElement *aElement, Int_t aleng, Int_t *count)
print value of element in object at pointer, type atype, leng aleng or *count The function may be cal...
TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
void BuildEmulated(TFile *file)
Create an Emulation TStreamerInfo object.
Int_t GetClassVersion() const
TStreamerInfoActions::TActionSequence * fWriteMemberWise
! List of write action resulting from the compilation for use in member wise streaming.
virtual TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)
Generate emulated collection proxy for a given class.
void BuildOld()
rebuild the TStreamerInfo structure
Int_t fNslots
!total numbrer of slots in fComp.
virtual TVirtualCollectionProxy * GenExplicitProxy(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)
Generate proxy from static functions.
virtual TClassStreamer * GenExplicitClassStreamer(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)
Generate class streamer from static functions.
Version_t fOldVersion
! Version of the TStreamerInfo object read from the file
void DestructorImpl(void *p, Bool_t dtorOnly)
Internal part of the destructor.
virtual ~TStreamerInfo()
TStreamerInfo dtor.
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class
TStreamerInfoActions::TActionSequence * fWriteText
! List of text write action resulting for the compilation, used for JSON.
void SetClass(TClass *cl)
ULong_t * fVirtualInfoLoc
![fNVirtualInfoLoc] Location of the pointer to the TStreamerInfo inside the object (when emulated)
UInt_t GetCheckSum() const
void PrintValueClones(const char *name, TClonesArray *clones, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in a TClonesArray.
Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses=0, const TList *extrainfos=0)
Generate header file for the class described by this TStreamerInfo the function is called by TFile::M...
void SetCountClass(const char *clname)
const char * GetCountClass() const
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Bool_t IsBase() const
Return kTRUE if the element represent a base class.
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 & Prepend(const char *cs)
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
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 const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Int_t GetProperties() const
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE) const
virtual EDataType GetType() const =0
virtual void Clear(const char *opt="")=0
virtual TClass * GetValueClass() const =0
virtual void * At(UInt_t idx)=0
virtual Int_t GetCollectionType() const =0
virtual UInt_t Size() const =0
virtual Bool_t HasPointers() const =0
Abstract Interface class describing Streamer information for one class.
Bool_t fIsBuilt
true if the StreamerInfo has been optimized
virtual void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)=0
Bool_t IsCompiled() const
std::atomic< Bool_t > fIsCompiled
true if the StreamerInfo has been 'built' (i.e. has all the StreamerElements it should have)
static const char * GetElementCounterStart(const char *dmTitle)
Given a comment/title declaring an array counter, for example:
static TStreamerBasicType * GetElementCounter(const char *countName, TClass *cl)
Get pointer to a TStreamerBasicType in TClass *cl static function.
virtual TObjArray * GetElements() const =0
virtual void * New(void *obj=0)=0
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE)=0
virtual Bool_t CompareContent(TClass *cl, TVirtualStreamerInfo *info, Bool_t warn, Bool_t complete, TFile *file)=0
virtual Int_t GetClassVersion() const =0
virtual TClass * GetClass() const =0
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
Type GetType(const std::string &Name)
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
bool IsStdArray(std::string_view name)
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace
std::string GetLong64_Name(const char *original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'.
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container code of cont...
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
bool GetStdArrayProperties(const char *typeName, std::string &typeNameBuf, std::array< int, 5 > &maxIndices, int &ndim)
std::string GetNameForIO(const std::string &templateInstanceName, TClassEdit::EModType mode=TClassEdit::kNone, bool *hasChanged=nullptr)
int GetSplit(const char *type, std::vector< std::string > &output, int &nestedLoc, EModType mode=TClassEdit::kNone)
Stores in output (after emptying it) the split type.
bool IsUniquePtr(std::string_view name)
bool IsSTLBitset(const char *type)
Return true is the name is std::bitset<number> or bitset<number>
static constexpr double ms
static constexpr double s