91 for(
Int_t ind = last-1; ind >= at; --ind) {
92 arr->
AddAt( arr->
At(ind), ind+1);
100 Int_t offset = objs.size();
103 for(
Int_t ind = last-1; ind >= at; --ind) {
104 arr->
AddAt( arr->
At(ind), ind+offset);
106 for(
size_t ins = 0; ins < objs.size(); ++ins) {
107 arr->
AddAt(objs[ins], at+ins);
116 while (at<last && arr->At(at) != oldobj) {
128 while (at<last && arr->At(at) != oldobj) {
238 struct TPreventRecursiveBuildGuard {
239 TPreventRecursiveBuildGuard(
TStreamerInfo* info): fInfo(info) {
243 ~TPreventRecursiveBuildGuard() {
274 TPreventRecursiveBuildGuard buildGuard(
this);
300 ROOT::TSchemaRuleSet::TMatches rules;
325 Error(
"Build()",
"Cannot stream virtual base %s of class %s",
329 const char* bname = base->
GetName();
330 const char* btitle = base->
GetTitle();
332 if (!strcmp(bname,
"string")) {
340 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);
354 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
370 if (!clm->
IsLoaded() && !(isCollection || isString)) {
373 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
389 std::string typeNameBuf;
390 std::string trueTypeNameBuf;
408 const char* dmName = dm->
GetName();
409 const char* dmTitle = dm->
GetTitle();
415 std::array<Int_t, 5> maxIndices;
425 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
426 dmFull = trueTypeNameBuf.c_str();
427 dmType = typeNameBuf.c_str();
434 trueTypeNameBuf = typeNameBuf;
435 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
436 dmFull = dmType = typeNameBuf.c_str();
437 dt =
gROOT->GetType(dmType);
450 const char* rbracket = ::strchr(dmTitle,
']');
451 if (lbracket && rbracket) {
455 Error(
"Build",
"%s, discarding: %s %s, illegal %s\n",
GetName(), dmFull, dmName, dmTitle);
461 if (!dtCounter || !isInteger) {
462 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] (must be Int_t)\n",
GetName(), dmFull, dmName, counterName);
470 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] must be placed before \n",
GetName(), dmFull, dmName, counterName);
480 if (!dmCounter && (strstr(dmFull,
"char*") || strstr(dmFull,
"Char_t*"))) {
482 dsize =
sizeof(
char*);
485 Error(
"Build",
"%s, unknown type: %s %s",
GetName(), dmFull, dmName);
487 }
else if (dmIsPtr && (dtype !=
kCharStar)) {
492 if ((
fName ==
"TString") || (
fName ==
"TClass")) {
495 Error(
"Build",
"%s, discarding: %s %s, no [dimension]\n",
GetName(), dmFull, dmName);
509 static const char* full_string_name =
"basic_string<char,char_traits<char>,allocator<char> >";
510 if (!strcmp(dmType,
"string") || !strcmp(dmType,
"std::string") || !strcmp(dmType, full_string_name)) {
514 if (proxy) element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, *proxy, dmIsPtr);
515 else element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, dmFull, dmIsPtr);
518 auto printErrorMsg = [&](
const char* category)
520 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);
524 printErrorMsg(
"compiled");
530 printErrorMsg(
"interpreted");
539 Error(
"Build",
"%s, unknown type: %s %s\n",
GetName(), dmFull, dmName);
557 Error(
"Build",
"%s: %s has no streamer or dictionary, data member %s will not be saved",
GetName(), dmFull, dmName);
568 Warning(
"Build",
"%s: %s has no streamer or dictionary, data member \"%s\" will not be saved",
GetName(), dmFull, dmName);
580 for (
Int_t i = 0; i < ndim; ++i) {
582 if (isStdArray) maxIndex = maxIndices[i];
602 if ( !wasCompiled && (rules && rules.HasRuleWithSource( element->
GetName(),
kTRUE )) ) {
603 needAllocClass =
kTRUE;
612 && rules && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) )
641 if (needAllocClass) {
715 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
717 if (element->
GetTitle()[0] ==
'<') {
722 if (content[
c] ==
'<') ++level;
723 else if (content[
c] ==
'>') --level;
734 "Update the collection proxy of the class \"%s\" \n"
735 "\tto be similar to \"%s\".",
740 The class %s had a collection proxy when written but it is not an STL\n \
741 collection and we did not record the type of the content of the collection.\n \
742 We will claim the content is a bool (i.e. no data will be read).",
773 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
GetName());
780 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
782 if (element->
GetTitle()[0] ==
'<') {
787 if (content[
c] ==
'<') ++level;
788 else if (content[
c] ==
'>') --level;
799 "Update the collection proxy of the class \"%s\" \n"
800 "\tto be similar to \"%s\".",
805 The class %s had a collection proxy when written but it is not an STL\n \
806 collection and we did not record the type of the content of the collection.\n \
807 We will claim the content is a bool (i.e. no data will be read).",
829 searchOnChecksum =
kFALSE;
835 searchOnChecksum =
kTRUE;
842 searchOnChecksum =
kFALSE;
848 searchOnChecksum =
kTRUE;
858 searchOnChecksum =
kFALSE;
864 searchOnChecksum =
kTRUE;
875 if (!searchOnChecksum) {
881 for (
Int_t i = -1; i < ninfos; ++i) {
898 while ((slot < ninfos) && (array->
UncheckedAt(slot) != 0)) {
944#ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
1005 for (
Int_t i = 0; i < nel; ++i) {
1023 if (oldIsNonVersioned) {
1026 The class %s transitioned from not having a specified class version\n\
1027 to having a specified class version (the current class version is %d).\n\
1028 However too many different non-versioned layouts of the class have been\n\
1029 loaded so far. This prevent the proper reading of objects written with\n\
1030 the class layout version %d, in particular from the file:\n\
1032 To work around this issue, load fewer 'old' files in the same ROOT session.",
1036 The class %s transitioned from not having a specified class version\n\
1037 to having a specified class version (the current class version is %d).\n\
1038 However too many different non-versioned layouts of the class have been\n\
1039 loaded so far. This prevent the proper reading of objects written with\n\
1040 the class layout version %d.\n\
1041 To work around this issue, load fewer 'old' files in the same ROOT session.",
1048 The StreamerInfo for version %d of class %s read from the file %s\n\
1049 has a different checksum than the previously loaded StreamerInfo.\n\
1050 Reading objects of type %s from the file %s \n\
1051 (and potentially other files) might not work correctly.\n\
1052 Most likely the version number of the class was not properly\n\
1053 updated [See ClassDef(%s,%d)].",
1057 The StreamerInfo from %s does not match existing one (%s:%d)\n\
1058 The existing one has not been used yet and will be discarded.\n\
1059 Reading the file %s will work properly, however writing object of\n\
1060 type %s will not work properly. Most likely the version number\n\
1061 of the class was not properly updated [See ClassDef(%s,%d)].",
1067 The StreamerInfo for version %d of class %s\n\
1068 has a different checksum than the previously loaded StreamerInfo.\n\
1069 Reading objects of type %s\n\
1070 (and potentially other files) might not work correctly.\n\
1071 Most likely the version number of the class was not properly\n\
1072 updated [See ClassDef(%s,%d)].",
1076 The StreamerInfo from %s does not match existing one (%s:%d)\n\
1077 The existing one has not been used yet and will be discarded.\n\
1078 Reading should work properly, however writing object of\n\
1079 type %s will not work properly. Most likely the version number\n\
1080 of the class was not properly updated [See ClassDef(%s,%d)].",
1112#ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
1148 The StreamerInfo of class %s read from file %s\n\
1149 has the same version (=%d) as the active class but a different checksum.\n\
1150 You should update the version to ClassDef(%s,%d).\n\
1151 Do not try to write objects with the current class definition,\n\
1155 The StreamerInfo of class %s \n\
1156 has the same version (=%d) as the active class but a different checksum.\n\
1157 You should update the version to ClassDef(%s,%d).\n\
1158 Do not try to write objects with the current class definition,\n\
1166 Fatal(
"BuildCheck",
"\n\
1167 The StreamerInfo of unversioned class %s \n\
1168 has the same version (=%d) as the active class but an old checksum.\n\
1200 fNumber = maininfo->GetNumber();
1233 for (
Int_t i=0;i < ndata;i++) {
1235 if (!element)
break;
1242 if (ty <=
kULong)
continue;
1246 {
for (
int j=ndata-1;j>=i;j--) {elements->
AddAtAndExpand(elements->
At(j),j+1);}}
1247 elements->
AddAt(bt,i);
1269 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() );
1287 if (oldClass == 0 || newClass == 0)
return kFALSE;
1292 const char *oldname = oldClass->
GetName();
1293 for (
UInt_t i = oldlen, done =
false, nest = 0; (i>0) && !done ; --i) {
1294 switch (oldClass->
GetName()[i-1]) {
1295 case '>' : ++nest;
break;
1296 case '<' :
if (nest==0)
return kFALSE;
1298 case ':' :
if (nest == 0) oldname= &(oldClass->
GetName()[i]); done =
kTRUE;
break;
1301 oldlen = strlen(oldname);
1302 if (!(strlen(newClass->
GetName()) > strlen(oldClass->
GetName()))) {
1306 const char* newEnd = & (newClass->
GetName()[newlen-oldlen]);
1308 if (0 != strcmp(newEnd, oldname)) {
1336 Error(
"ImportStreamerInfo",
"Unable to clone the StreamerInfo for %s.",(*next)->GetName());
1382 if (oldContent == newContent) {
1383 contentMatch =
kTRUE;
1384 }
else if (newContent) {
1387 if (oldFlatContent == newFlatContent) {
1388 contentMatch =
kTRUE;
1394 contentMatch = (newContent==0);
1398 if ((oldContent==0 && oldProxy->
GetType() == newProxy->
GetType())
1475 TClass *FindAlternate(
TClass *context,
const std::string &i_name, std::string& newName)
1481 std::string
name(i_name);
1483 if (
name.compare(0,6,
"const ")==0) {
1489 while(
name[
name.length()-nstars-1]==
'*') {
1494 name.erase(
name.length()-nstars,nstars);
1497 std::string alternate(context->
GetName());
1498 alternate.append(
"::");
1499 alternate.append(
name);
1503 newName.append(altcl->
GetName());
1504 newName.append(suffix);
1508 size_t ctxt_cursor = strlen(context->
GetName());
1509 for (
size_t level = 0; ctxt_cursor != 0; --ctxt_cursor) {
1510 switch (context->
GetName()[ctxt_cursor]) {
1511 case '<': --level;
break;
1512 case '>': ++level;
break;
1513 case ':':
if (level == 0) {
1517 alternate.append(context->
GetName(),ctxt_cursor+1);
1518 alternate.append(
name);
1521 newName.append(altcl->
GetName());
1522 newName.append(suffix);
1562 TClass *firstNewCl =
f ?
f->GetClass() : 0;
1563 TClass *secondNewCl =
s ?
s->GetClass() : 0;
1568 if ((firstNewCl && !firstOldCl) || (secondNewCl && !secondOldCl))
1570 std::vector<std::string> inside;
1574 TClass *firstAltCl = firstOldCl;
1575 TClass *secondAltCl = secondOldCl;
1576 std::string firstNewName;
1577 std::string secondNewName;
1578 if (firstNewCl && !firstOldCl) {
1579 firstAltCl = FindAlternate(context, inside[1], firstNewName);
1580 }
else if (firstAltCl) {
1581 firstNewName = firstAltCl->
GetName();
1583 firstNewName = inside[1];
1585 if (secondNewCl && !secondOldCl) {
1586 secondAltCl = FindAlternate(context, inside[2], secondNewName);
1587 }
else if (secondAltCl) {
1588 secondNewName = secondAltCl->
GetName();
1590 secondNewName = inside[2];
1592 if ((firstNewCl && firstAltCl != firstOldCl) ||
1593 (secondNewCl && secondAltCl != secondOldCl) ) {
1596 std::string alternate = inside[0];
1597 alternate.append(
"<");
1598 alternate.append(firstNewName);
1599 alternate.append(
",");
1600 alternate.append(secondNewName);
1604 if (alternate[alternate.length()-1]==
'>') {
1605 alternate.append(
" ");
1607 alternate.append(
">");
1620 std::vector<std::string> inside;
1625 std::string newName;
1626 TClass *altcl = FindAlternate(context, inside[1], newName);
1629 std::string alternate = inside[0];
1630 alternate.append(
"<");
1631 alternate.append(newName);
1635 if (alternate[alternate.length()-1]==
'>') {
1636 alternate.append(
" ");
1638 alternate.append(
">");
1646 struct TBuildOldGuard {
1672 TBuildOldGuard buildOldGuard(
this);
1675 printf(
"\n====>Rebuilding TStreamerInfo for class: %s, version: %d\n",
GetName(),
fClassVersion);
1719 constexpr size_t kSizeOfPtr =
sizeof(
void*);
1746 ROOT::TSchemaRuleSet::TMatches rules;
1752 Int_t virtualInfoLocAlloc = 0;
1777#if defined(PROPER_IMPLEMEMANTION_OF_BASE_CLASS_RENAMING)
1800 Error(
"BuildOld",
"Could not find base class: %s for %s and could not find any matching rename rule\n", base->
GetName(),
GetName());
1810 Error(
"BuildOld",
"Could not find base class: %s for %s, renaming rule was found but is malformed\n", base->
GetName(),
GetName());
1820 else if( !baseclass ) {
1823 Warning(
"BuildOld",
"Missing base class: %s skipped", base->
GetName());
1825 baseclass =
new TClass(element->
GetName(), 1, 0, 0, -1, -1);
1826 element->
Update(0, baseclass);
1836 if (baseOffset < 0) {
1848 if (!baserule.empty()) {
1859 element->
Init(
this);
1871 if (infobase) baseclass = infobase->
GetClass();
1877 if (infobase && infobase->
fComp == 0) {
1899 if (baseOffset < 0) {
1904 offset += baseclass->
Size();
1911 Int_t baseOffset = -1;
1919 if (strchr(bc->
GetName(),
'<') || !strcmp(bc->
GetName(),
"string")) {
1922 if (bcName == elName) {
1937 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());
1950 if (newInfo ==
this) {
1951 baseOffset = offset;
1953 }
else if (newInfo) {
1957 const char *newElName = newElement->
GetName();
1958 if (newElement->
IsBase() && (strchr(newElName,
'<') || !strcmp(newElName,
"string")) ) {
1961 if (bcName == elName) {
1967 Error(
"BuildOld",
"Could not find STL base class: %s for %s\n", element->
GetName(),
GetName());
1971 asize = newElement->
GetSize();
1974 if (baseOffset == -1) {
1985 if (baseOffset < 0) {
1991 element->
Init(
this);
2006 std::string typeNameBuf;
2007 const char* dmType =
nullptr;
2011 std::array<Int_t, 5> maxIndices;
2022 element->
Init(
this);
2036 element->
Init(
this);
2045 dmType = typeNameBuf.c_str();
2052 dmType = typeNameBuf.c_str();
2053 dt =
gROOT->GetType(dmType);
2060 if (dmClassName.
Index(
"const ")==0) dmClassName.
Remove(0,6);
2065 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());
2082 element->
Init(
this);
2101 auto theType = isStdArray ? dt : dm->
GetDataType();
2113 if ((newType ==
::kChar_t) && dmIsPtr && !isArray && !hasCount) {
2115 }
else if (dmIsPtr) {
2117 }
else if (isArray) {
2121 if (newType == -1) {
2128 if (newInfo && (newInfo !=
this)) {
2131 if (newClass == 0) {
2132 newType = newElems ? newElems->
GetType() : -1;
2156 }
else if (element->
GetType() != newType) {
2169 if (oldClass == newClass.
GetClass()) {
2171 }
else if (ClassWasMovedToNamespace(oldClass, newClass.
GetClass())) {
2173 if (0 != (oldv = ImportStreamerInfo(oldClass, newClass.
GetClass()))) {
2174 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);
2182 if (ContainerMatchTClonesArray(newClass.
GetClass())) {
2205 TClass *oldFixedClass = FixCollectionV5(
GetClass(),oldClass,newClass);
2206 if (oldFixedClass && oldFixedClass != oldClass) {
2207 element->
Update(oldClass,oldFixedClass);
2208 oldClass = oldFixedClass;
2211 if (CollectionMatch(oldClass, newClass)) {
2224 if (
ms &&
ms->IsValid()) {
2226 switch( element->
GetType() ) {
2252 }
else if (CollectionMatchFloat16(oldClass,newClass)) {
2254 }
else if (CollectionMatchDouble32(oldClass,newClass)) {
2256 }
else if (CollectionMatchLong64(oldClass,newClass)) {
2259 }
else if (CollectionMatchULong64(oldClass,newClass)) {
2272 }
else if(oldClass &&
2289 if (strncmp(dm->
GetTitle(),
"->",2)==0) {
2322 if ((!dmIsPtr || newType==
kSTLp) && (isStdArray ? ndim : dm->
GetArrayDim()) > 0) {
2327 if (newInfo && (newInfo !=
this)) {
2330 newType = newElems->
GetType();
2361 if (newType != -1) {
2369 cannotConvert =
kTRUE;
2373 printf(
"%s We have no clue\n", dm->
GetName());
2374 cannotConvert =
kTRUE;
2377 if (newType != -1) {
2381 cannotConvert =
kTRUE;
2385 cannotConvert =
kTRUE;
2389 if (cannotConvert) {
2412 strcmp(element->
GetName(),
"This") == 0 &&
2418 asize =
sizeof(std::vector<int>);
2424 if ((offset % kSizeOfPtr) != 0) {
2425 offset = offset - (offset % kSizeOfPtr) + kSizeOfPtr;
2431 if (!wasCompiled && rules) {
2432 if (rules.HasRuleWithSource( element->
GetName(),
kTRUE ) ) {
2434 if (allocClass == 0) {
2442 allocClass = infoalloc->
GetClass();
2448 && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2470 }
else if (rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2482 }
else if (rules && rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2518 for (iel = 0; iel < narr; ++iel) {
2521 tai[kel++] = element;
2523 arr[jel++] = element;
2526 for (kel = 0; jel < narr;) {
2527 arr[jel++] = tai[kel++];
2534 if (!wasCompiled && allocClass) {
2591 TMemberInfo(
TClass *parent) : fParent(parent) {};
2593 void SetDataType(
Int_t datatype) {
2594 fDataType = datatype;
2600 void SetClassName(
const char *
name) {
2603 void SetComment(
const char *title) {
2604 const char *left = strstr(title,
"[");
2606 const char *right = strstr(left,
"]");
2609 fComment.
Append(left,right-left);
2627 if (fName != other.fName)
return kTRUE;
2630 if (fDataType != other.fDataType) {
2631 if ( (fDataType == 4 && other.fDataType == 16)
2632 || (fDataType == 16 && other.fDataType == 4) ) {
2634 }
else if ( (fDataType == 14 && other.fDataType == 17)
2635 || (fDataType == 17 && other.fDataType == 14) ) {
2637 }
else if ( (fDataType == 3 && other.fDataType == 6)
2638 ||(fDataType == 6 && other.fDataType == 3) ){
2647 }
else if (fClassName != other.fClassName) {
2648 if ( (fClassName ==
"long" && (other.fClassName ==
"long long" || other.fClassName ==
"Long64_t"))
2649 || ( (fClassName ==
"long long" || fClassName ==
"Long64_t") && other.fClassName ==
"long") ) {
2651 }
else if ( (fClassName ==
"unsigned long" && (other.fClassName ==
"unsigned long long" || other.fClassName ==
"ULong64_t"))
2652 || ( (fClassName ==
"unsigned long long" || fClassName ==
"ULong64_t") && other.fClassName ==
"unsigned long") ) {
2657 if (
name != othername) {
2660 if (!CollectionMatch(cl,otherCl)) {
2661 TClass *oldFixedClass = FixCollectionV5(fParent,cl,otherCl);
2662 if (!oldFixedClass || !CollectionMatch(oldFixedClass,otherCl)) {
2671 return fComment != other.fComment;
2693 char* eaddr = ((
char*)obj) + element->
GetOffset();
2712 if (ecl && (
fClass!=ecl )) {
2731 char* eaddr = ((
char*)obj) + element->
GetOffset();
2748 if (newname && newname[0] &&
fName != newname) {
2751 for(
Int_t i = 0; i < ndata; ++i) {
2784 R__ASSERT( (cl==0 || info==0) && (cl!=0 || info!=0) );
2817 if (el && el->
IsBase()) {
2832 if (infoel && infoel->
IsBase()) {
2833 otherClass = infoel->
GetName();
2844 if (localClass != otherClass) {
2848 "The in-memory layout version %d for class '%s' has a base class (%s) that the on-file layout version %d does not have.",
2850 }
else if (otherClass.
Length()==0) {
2852 "The on-file layout version %d for class '%s' has a base class (%s) that the in-memory layout version %d does not have",
2856 "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'",
2860 if (!complete)
return kFALSE;
2861 result = result &&
kFALSE;
2865 if (!localBase)
continue;
2868 if (!otherBaseClass)
continue;
2871 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2872 " has the same version (=%d) as the active class but a different checksum.\n"
2873 " You should update the version to ClassDef(%s,%d).\n"
2874 " The objects on this file might not be readable because:\n"
2875 " 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).",
2884 if (!localBaseInfo) {
2888 const TList *list =
file->GetStreamerInfoCache();
2891 if (!localBaseInfo) {
2893 msg.
Form(
" The StreamerInfo of the base class %s (of class %s) read from %s%s\n"
2894 " refers to a checksum (%x) that can not be found neither in memory nor in the file.\n",
2908 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2909 " has the same version (=%d) as the active class but a different checksum.\n"
2910 " You should update the version to ClassDef(%s,%d).\n"
2911 " The objects on this file might not be readable because:\n"
2912 " 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).",
2922 if (!localBase || !otherBase)
continue;
2928 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2929 " has the same version (=%d) as the active class but a different checksum.\n"
2930 " You should update the version to ClassDef(%s,%d).\n"
2931 " The objects on this file might not be readable because:\n"
2932 " 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).",
2942 if (localBaseInfo == otherBaseInfo ||
2948 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2949 " has the same version (=%d) as the active class but a different checksum.\n"
2950 " You should update the version to ClassDef(%s,%d).\n"
2951 " The objects on this file might not be readable because:\n"
2952 " 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).",
2960 if (!result && !complete) {
2969 TMemberInfo other(cl ? cl : info->
GetClass());
2980 local.SetName( el->
GetName() );
2982 local.SetComment( el->
GetTitle() );
2983 local.SetDataType( el->
GetType() );
2991 other.SetName( tdm->
GetName() );
2993 other.SetComment( tdm->
GetTitle() );
3020 other.SetName( infoel->
GetName() );
3022 other.SetComment( infoel->
GetTitle() );
3023 other.SetDataType( infoel->
GetType() );
3032 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"
3035 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
3037 }
else if (other.fName.Length()==0) {
3038 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"
3041 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data());
3043 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"
3048 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data()
3049 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
3052 result = result &&
kFALSE;
3053 if (!complete)
return result;
3077 constexpr size_t kSizeOfPtr =
sizeof(
void*);
3078 if ((
fSize % kSizeOfPtr) != 0) {
3115 static TClassRef string_classref(
"string");
3116 if (
fClass == string_classref) {
3175 if (allocator)
return allocator->
GetClass();
3225 for (
int i=0; i<il; i++)
id =
id*3+
name[i];
3237 for (
int i=0; i<il; i++)
id =
id*3+
name[i];
3248 if (el->
IsBase())
continue;
3263 for (i=0; i<il; i++)
id =
id*3+
name[i];
3285 type.ReplaceAll(
"ULong64_t",
"unsigned long long");
3286 type.ReplaceAll(
"Long64_t",
"long long");
3287 type.ReplaceAll(
"signed char",
"char");
3288 type.ReplaceAll(
"<signed char",
"<char");
3289 type.ReplaceAll(
",signed char",
",char");
3290 if (
type==
"signed char")
type =
"char";
3294 for (i=0; i<il; i++)
id =
id*3+
type[i];
3309 const char *right = strstr(left,
"]");
3312 while (left != right) {
3356 constexpr auto auto_ptr_len =
str_length(
"auto_ptr<");
3357 constexpr auto unique_ptr_len =
str_length(
"unique_ptr<");
3361 return ((strncmp(
name,
"auto_ptr<", auto_ptr_len) == 0)
3362 || (strncmp(
name,
"unique_ptr<", unique_ptr_len) == 0));
3375 if (atstart) { fprintf(
file,
" : "); atstart =
kFALSE; }
3376 else fprintf(
file,
" , ");
3377 fprintf(
file,
"%s(const_cast<%s &>( rhs ))\n", element->
GetName(),protoname.
Data());
3380 if (atstart) { fprintf(
file,
" : "); atstart =
kFALSE; }
3381 else fprintf(
file,
" , ");
3383 fprintf(
file,
"%s(const_cast<%s &>( rhs ).%s.release() )\n",element->
GetName(),protoname.
Data(),element->
GetName());
3385 fprintf(
file,
"%s(const_cast<%s &>( rhs ).%s)\n",element->
GetName(),protoname.
Data(),element->
GetName());
3390 fprintf(
file,
"{\n");
3391 fprintf(
file,
" // This is NOT a copy constructor. This is actually a move constructor (for stl container's sake).\n");
3392 fprintf(
file,
" // Use at your own risk!\n");
3393 fprintf(
file,
" (void)rhs; // avoid warning about unused parameter\n");
3401 if (!defMod) { fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3402 const char *ename = element->
GetName();
3403 const char *colon2 = strstr(ename,
"::");
3404 if (colon2) ename = colon2+2;
3406 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3408 fprintf(
file,
" memset(modrhs.%s,0,%d);\n",ename,element->
GetSize());
3411 const char *ename = element->
GetName();
3414 fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3416 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3419 fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3421 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3425 fprintf(
file,
" for (Int_t i=0;i<%d;i++) %s[i] = rhs.%s[i];\n",element->
GetArrayLength(),ename,ename);
3429 fprintf(
file,
"[0]");
3431 fprintf(
file,
"))[i] = (&(rhs.%s",ename);
3433 fprintf(
file,
"[0]");
3435 fprintf(
file,
"))[i];\n");
3438 if (!defMod) { fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3439 fprintf(
file,
" modrhs.%s = 0;\n",ename);
3442 fprintf(
file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3446 std::string method_name =
"clear";
3448 method_name =
"reset";
3451 fprintf(
file,
" modrhs.%s();\n", method_name.c_str());
3453 fprintf(
file,
" modrhs.%s.%s();\n",ename, method_name.c_str());
3471 const char *ename = element->
GetName();
3472 const char *colon2 = strstr(ename,
"::");
3473 if (colon2) ename = colon2+2;
3476 fprintf(
file,
" %s = 0;\n",ename);
3478 fprintf(
file,
" memset(%s,0,%d);\n",ename,element->
GetSize());
3482 fprintf(
file,
" delete %s; %s = 0;\n",ename,ename);
3484 fprintf(
file,
" for (Int_t i=0;i<%d;i++) delete %s[i]; memset(%s,0,%d);\n",element->
GetArrayLength(),ename,ename,element->
GetSize());
3489 const char *ename = element->
GetName();
3491 fprintf(
file,
" %s = 0;\n",ename);
3493 fprintf(
file,
" delete [] %s; %s = 0;\n",ename,ename);
3497 const char *ename = element->
GetName();
3499 fprintf(
file,
" %s = 0;\n",ename);
3501 fprintf(
file,
" delete %s; %s = 0;\n",ename,ename);
3503 fprintf(
file,
" delete [] %s; %s = 0;\n",ename,ename);
3507 const char *ename = element->
GetName();
3508 const char *prefix =
"";
3511 }
else if ( element->
IsBase() ) {
3520 fprintf(
file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3528 std::vector<std::string> inside;
3531 if (inside[1][inside[1].size()-1]==
'*' || inside[2][inside[2].size()-1]==
'*') {
3532 fprintf(
file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3538 fprintf(
file,
" delete %s; %s = 0;\n",ename,ename);
3555 const char *clname =
GetName();
3557 if (strchr(clname,
':')) {
3559 Int_t len = strlen(clname);
3560 const char *
name = clname;
3563 for (
Int_t cur = 0; cur < len; ++cur) {
3564 switch (clname[cur]) {
3571 if (nest == 0) { cur = len;
continue; }
3575 if (nest == 0 && clname[cur+1] ==
':') {
3578 name = clname + cur + 2;
3585 template_protoname.
Append(clname,pr_pos);
3589 const char *where = strstr(clname,
"<");
3590 isTemplate = where != 0;
3592 template_protoname.
Append(clname,where-clname);
3596 if (needGenericTemplate && isTemplate) {
3598 fprintf(fp,
"#ifndef %s_h\n", templateName.
Data());
3599 fprintf(fp,
"#define %s_h\n", templateName.
Data());
3610 if (!element->
IsBase())
continue;
3612 const char *ename = element->
GetName();
3613 if (nbase == 1) fprintf(fp,
" : public %s",ename);
3614 else fprintf(fp,
" , public %s",ename);
3619 if (subClasses && subClasses->
GetEntries()) {
3620 Bool_t needheader =
true;
3622 TIter subnext(subClasses);
3627 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3629 fprintf(fp,
"\npublic:\n");
3630 fprintf(fp,
"// Nested classes forward declaration.\n");
3634 UInt_t sub_numberOfClasses = 0;
3635 UInt_t sub_numberOfNamespaces;
3643 for (
UInt_t i = 0;i < sub_numberOfClasses;++i) {
3644 fprintf(fp,
"}; // end of class.\n");
3646 if (sub_numberOfNamespaces > 0) {
3647 Error(
"GenerateDeclaration",
"Nested classes %s thought to be inside a namespace inside the class %s",subinfo->
GetName(),
GetName());
3654 fprintf(fp,
"\npublic:\n");
3655 fprintf(fp,
"// Nested classes declaration.\n");
3658 if (subClasses && subClasses->
GetEntries()) {
3664 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3671 fprintf(fp,
"\npublic:\n");
3672 fprintf(fp,
"// Data Members.\n");
3685 if (element->
IsBase())
continue;
3686 const char *ename = element->
GetName();
3716 }
else if (strncmp(enamebasic.
Data(),
"auto_ptr<", strlen(
"auto_ptr<")) == 0) {
3720 lt = enamebasic.
Length();
3724 if (lt>=ltype) ltype = lt+1;
3726 for (is = 3+lt; is < (3+ltype); ++is)
line +=
' ';
3731 if (ld>=ldata) ldata = ld+1;
3732 for (is = 3+ltype+ld; is < (3+ltype+ldata); ++is)
line +=
' ';
3736 fprintf(fp,
"%s\n",
line.Data());
3739 if (needGenericTemplate && isTemplate) {
3741 fprintf(fp,
"\n %s() {\n",protoname.
Data());
3744 fprintf(fp,
" %s(%s && ) = default;\n",protoname.
Data(),protoname.
Data());
3745 fprintf(fp,
" %s(const %s & rhs )\n",protoname.
Data(),protoname.
Data());
3748 fprintf(fp,
" virtual ~%s() {\n",protoname.
Data());
3750 fprintf(fp,
" }\n\n");
3754 fprintf(fp,
"\n %s();\n",protoname.
Data());
3755 fprintf(fp,
" %s(%s && ) = default;\n",protoname.
Data(),protoname.
Data());
3756 fprintf(fp,
" %s(const %s & );\n",protoname.
Data(),protoname.
Data());
3757 fprintf(fp,
" virtual ~%s();\n\n",protoname.
Data());
3761 fprintf(sfp,
"#ifndef %s_cxx\n",guard.
Data());
3762 fprintf(sfp,
"#define %s_cxx\n",guard.
Data());
3763 fprintf(sfp,
"%s::%s() {\n",
GetName(),protoname.
Data());
3767 fprintf(sfp,
"%s::%s(const %s & rhs)\n",
GetName(),protoname.
Data(),protoname.
Data());
3771 fprintf(sfp,
"%s::~%s() {\n",
GetName(),protoname.
Data());
3774 fprintf(sfp,
"#endif // %s_cxx\n\n",guard.
Data());
3782 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.
Data(),0);
3784 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.
Data(),
fClassVersion + 1);
3789 for(
UInt_t i=0;i<numberOfNamespaces;++i) {
3790 fprintf(fp,
"} // namespace\n");
3793 if (needGenericTemplate && isTemplate) {
3794 fprintf(fp,
"#endif // generic template declaration\n");
3803 if (inclist[0]==0) {
3809 const char *clname =
GetName();
3810 if (strchr(clname,
'<')) {
3825 const char *ename = element->
GetName();
3826 const char *colon2 = strstr(ename,
"::");
3827 if (colon2) ename = colon2+2;
3834 if (ltype < lt) ltype = lt;
3835 if (ldata < ld) ldata = ld;
3839 incRiostream =
kTRUE;
3845 if (!include[0])
continue;
3847 Bool_t greater = (include[0]==
'<');
3850 if (strncmp(include,
"include/",8)==0) {
3853 if (strncmp(include,
"include\\",9)==0) {
3856 if (strncmp(element->
GetTypeName(),
"pair<",strlen(
"pair<"))==0) {
3858 }
else if (strncmp(element->
GetTypeName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0) {
3861 TString incName( include, strlen(include)-1 );
3882 if (strncmp(
GetName(),
"pair<",strlen(
"pair<"))==0)
return 0;
3883 if (strncmp(
GetName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0)
return 0;
3894 for(
UInt_t i=len; i>0; --i) {
3896 case '>': ++nest;
if (scope==0) { isTemplate =
kTRUE; }
break;
3897 case '<': --nest;
break;
3899 if (nest==0 &&
GetName()[i-1]==
':') {
3902 cl =
gROOT->GetClass(nsname);
3906 }
else if (cl == 0 && extrainfos != 0) {
3921 if (
gDebug) printf(
"generating code for class %s\n",
GetName());
3927 filename.
Form(
"%s/%s.h",dirname,headername.
Data());
3929 FILE *fp = fopen(filename.
Data(),
"w");
3931 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3936 FILE *allfp = fopen(filename.
Data(),
"a");
3938 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3942 fprintf(allfp,
"#include \"%s.h\"\n", headername.
Data());
3945 char *inclist =
new char[50000];
3950 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3951 fprintf(fp,
"// This class has been generated by TFile::MakeProject\n");
3952 fprintf(fp,
"// (%s by ROOT version %s)\n",td.
AsString(),
gROOT->GetVersion());
3953 fprintf(fp,
"// from the StreamerInfo in file %s\n",
gDirectory->GetFile()->GetName());
3954 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3957 fprintf(fp,
"#ifndef %s_h\n",headername.
Data());
3958 fprintf(fp,
"#define %s_h\n",headername.
Data());
3965 TIter subnext(subClasses);
3974 FILE *sfp = fopen( sourcename.
Data(),
"a" );
3978 Error(
"GenerateHeaderFile",
"Could not open %s for appending",sourcename.
Data());
3982 fprintf(fp,
"#endif\n");
3986 if (sfp) fclose(sfp);
3997 char dmbracket[256];
4011 char *rdmc = (
char*)rdm->
GetName();
4014 if (dm->
IsaPointer() && rdmc[0] ==
'*') rdmc++;
4017 if (strcmp(rdmc,dm->
GetName()) == 0) {
4029 if (strstr(rdm->
GetName(),dmbracket)) {
4043 if (elementName == 0)
return 0;
4105 Int_t base_offset = 0;
4106 Int_t local_offset = 0;
4112 if (!base_cl || !base_element) {
4115 base_offset = base_element->
GetOffset();
4118 offset = base_offset + local_offset;
4133 Int_t local_offset = 0;
4142 offset = base_offset + local_offset;
4190 ::Obsolete(
"TStreamerInfo::GetStreamerElementReal",
"v5-34-20",
"v6-00-02");
4192 if (i < 0 || i >=
fNdata)
return 0;
4193 if (j < 0)
return 0;
4198 for (
Int_t ise=0;ise < nelems;ise++) {
4200 if (ise+j >= nelems)
return 0;
4209template <
typename T>
4231#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4253#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4259#define READ_ARRAY(TYPE_t) \
4261 Int_t sub_instance, index; \
4262 Int_t instance = k; \
4264 index = instance / len; \
4265 sub_instance = instance % len; \
4270 TYPE_t **val =(TYPE_t**)(ladd); \
4271 return T((val[sub_instance])[index]); \
4289#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4313template <
typename T>
4322 if (i < 0)
return 0;
4326 if (atype ==
kSTL) {
4328 if (newClass == 0) {
4340 if (j >= nc)
return 0;
4341 char *element_ptr = (
char*)proxy->
At(j);
4342 return GetTypedValueAux<T>(atype,element_ptr,0,1);
4346 return GetTypedValueAux<T>(atype,ladd,j,len);
4355template <
typename T>
4362 if (j >= nc)
return 0;
4377template <
typename T>
4381 if (j >= nc)
return 0;
4383 char *pointer = (
char*)cont->
At(j);
4396template <
typename T>
4401 if (j >= nc)
return 0;
4403 char **ptr = (
char**)cont->
At(j);
4404 char *pointer = *ptr;
4415 if (rules.empty())
return;
4420 for(
auto rule : rules) {
4421 if( rule->IsRenameRule() || rule->IsAliasRule() )
4426 if ( rule->HasTarget( element->
GetName() ) ) {
4429 if ( rule->GetAttributes()[0] != 0 ) {
4430 TString attr( rule->GetAttributes() );
4447 const TObjArray *sources = rule->GetSource();
4448 TIter input(sources);
4450 while((src = input())) {
4459 rule->AsString(ruleStr);
4460 Warning(
"InsertArtificialElements",
"For class %s in StreamerInfo %d is missing the source data member %s when trying to apply the rule:\n %s",
4468 if (!rule)
continue;
4471 typedef std::vector<TStreamerArtificial*> vec_t;
4474 if (rule->GetTarget()==0) {
4482 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4484 toAdd.push_back(newel);
4486 toAdd.reserve(rule->GetTarget()->GetEntries());
4497 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4499 toAdd.push_back(newel);
4504 for(
Int_t other = 1; other < rule->GetTarget()->GetEntries(); ++other) {
4505 objstr = (
TObjString*)(rule->GetTarget()->At(other));
4507 newName = objstr->
String();
4514 toAdd.push_back(newel);
4521 TIter s_iter(rule->GetSource());
4526 if (loc == -1 || (i+1)>loc) {
4542 for(vec_t::iterator iter = toAdd.begin(); iter != toAdd.end(); ++iter) {
4575 while ((obj = next()))
4578 if (strstr(option,
"full") != 0) {
4584 if (sequenceType.
Length()) {
4586 sequenceType +=
"]";
4588 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4590 sequenceType.
Data());
4594 Bool_t wantOrig = strstr(option,
"incOrig") != 0;
4604 if (sequenceType.
Length() != 0) {
4605 sequenceType +=
',';
4607 sequenceType +=
"optimized";
4609 if (sequenceType.
Length()) {
4611 sequenceType +=
"]";
4613 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4615 sequenceType.
Data());
4616 if (optimized && wantOrig) {
4621 if (sequenceType.
Length()) {
4623 sequenceType +=
"]";
4625 Printf(
" j=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4627 sequenceType.
Data());
4645 char* p = (
char*) obj;
4651 p =
new char[
fSize];
4652 memset(p, 0,
fSize);
4684 char**
r = (
char**) eaddr;
4686 for (
Int_t i = 0; i < len; ++i) {
4699 void**
r = (
void**) eaddr;
4706 const char* title = element->
GetTitle();
4707 const char* bracket1 = strrchr(title,
'(');
4708 const char* bracket2 = strrchr(title,
')');
4709 if (bracket1 && bracket2 && (bracket2 != (bracket1 + 1))) {
4710 Int_t len = bracket2 - (bracket1 + 1);
4711 char* clonesClass =
new char[len+1];
4712 clonesClass[0] =
'\0';
4713 strncat(clonesClass, bracket1 + 1, len);
4714 void**
r = (
void**) eaddr;
4716 delete[] clonesClass;
4719 void**
r = (
void**) eaddr;
4730 if (einfo) einfo->
New(eaddr);
4748 if (strcmp(element->
GetName(),
"This")==0 &&
4771 for (
Int_t i = 0; i < len; ++i,
r += size) {
4794 Error(
"NewArray",
"TClass pointer is null!");
4800 char* p = (
char*) ary;
4812 char* dataBegin = (
char*) &
r[2];
4825#define DeleteBasicPointer(addr,element,name) \
4827 name **f = (name**)(addr); \
4828 int n = element->GetArrayLength() ? element->GetArrayLength() : 1;\
4829 for(int j=0;j<n;j++) { \
4844 char *p = (
char*)obj;
4848 for (
Int_t elenum = nelements - 1; elenum >= 0; --elenum) {
4887 void**
r = (
void**) eaddr;
4888 for (
Int_t j = len - 1; j >= 0; --j) {
4902 void**
r = (
void**) eaddr;
4903 for (
Int_t j = len - 1; j >= 0; --j) {
4911 if (etype ==
kBase) {
4926 if (etype ==
kSTL) {
4930 if (strcmp(ele->
GetName(),
"This")==0) {
4954 char*
r = eaddr + (size * (len - 1));
4955 for (
Int_t j = len - 1; j >= 0; --j,
r -= size) {
4977 if (obj == 0)
return;
4979 char* p = (
char*) obj;
4985 if (allocator !=
this) {
5003 if (ary == 0)
return;
5010 char* memBegin = (
char*) &
r[-2];
5012 char* p = ((
char*) ary) + ((arrayLen - 1) * size);
5037 printf(
" %-15s = ",
name);
5050 const static TClassRef stringClass(
"string");
5051 if (
fClass == stringClass) {
5052 std::string *st = (std::string*)(pointer);
5053 printf(
"%s\n",st->c_str());
5056 printf(
"%s\n",st->
Data());
5069 if (aleng > lenmax) aleng = lenmax;
5080 if (!clones) {printf(
" %-15s = \n",
name);
return;}
5081 printf(
" %-15s = ",
name);
5083 if (nc > lenmax) nc = lenmax;
5088 if (aleng > lenmax) aleng = lenmax;
5090 for (
Int_t k=0;k < nc;k++) {
5092 char *ladd = pointer+offset;
5095 if (k < nc-1) printf(
", ");
5105 if (!cont) {printf(
" %-15s = \n",
name);
return;}
5106 printf(
" %-15s = ",
name);
5108 if (nc > lenmax) nc = lenmax;
5113 if (aleng > lenmax) aleng = lenmax;
5115 for (
Int_t k=0;k < nc;k++) {
5116 char *pointer = (
char*)cont->
At(k);
5117 char *ladd = pointer+offset;
5120 if (k < nc-1) printf(
", ");
5128void TStreamerInfo::Streamer(
TBuffer &R__b)
5138 TNamed::Streamer(R__b);
5159 for (
Int_t i = 0; i < nobjects; i++) {
5162 if ( el->IsA() == basic ) {
5182 (*fElements)[i] = rel;
5191 TNamed::Streamer(R__b);
5202 TNamed::Streamer(R__b);
5217 for (
Int_t i = 0; i < nobjects; i++) {
5223 }
else if (el != 0) {
5224 elements.AddLast(el);
5244 static std::atomic<Bool_t> onlyonce(
kFALSE);
5246 if (onlyonce.compare_exchange_strong(expected,
kTRUE)) {
5247 Warning(
"TagFile",
"This function is deprecated, use TBuffer::TagStreamerInfo instead");
5251 if (fNumber < 0 || fNumber >= nindex) {
5252 Error(
"TagFile",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s",
5268#define DOLOOP for (k = 0, pointer = arr[0]; k < narr; pointer = arr[++k])
5271 static void PrintCR(
int j,
Int_t aleng,
UInt_t ltype)
5273 if (j == aleng-1) printf(
"\n");
5276 if (j%ltype == ltype-1) printf(
"\n ");
5301 case kInt: {
Int_t *val = (
Int_t* )ladd; printf(
"%d" ,*val);
break;}
5316 case kOffsetL +
kBool: {
Bool_t *val = (
Bool_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%c " ,val[j]); PrintCR(j,aleng,20); }
break;}
5317 case kOffsetL +
kChar: {
Char_t *val = (
Char_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%c " ,val[j]); PrintCR(j,aleng,20); }
break;}
5319 case kOffsetL +
kInt: {
Int_t *val = (
Int_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%d " ,val[j]); PrintCR(j,aleng,10); }
break;}
5320 case kOffsetL +
kLong: {
Long_t *val = (
Long_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%ld ",val[j]); PrintCR(j,aleng, 5); }
break;}
5328 case kOffsetL +
kUInt: {
UInt_t *val = (
UInt_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%u " ,val[j]); PrintCR(j,aleng, 5); }
break;}
5331 case kOffsetL +
kBits: {
UInt_t *val = (
UInt_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%d " ,val[j]); PrintCR(j,aleng, 5); }
break;}
5334 case kOffsetP +
kBool: {
Bool_t **val = (
Bool_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5335 case kOffsetP +
kChar: {
Char_t **val = (
Char_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5336 case kOffsetP +
kShort: {
Short_t **val = (
Short_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,10); }
break;}
5337 case kOffsetP +
kInt: {
Int_t **val = (
Int_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,10); }
break;}
5338 case kOffsetP +
kLong: {
Long_t **val = (
Long_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%ld ",(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5340 case kOffsetP +
kFloat: {
Float_t **val = (
Float_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%f " ,(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5344 case kOffsetP +
kUChar: {
UChar_t **val = (
UChar_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%u " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5346 case kOffsetP +
kUInt: {
UInt_t **val = (
UInt_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%u " ,(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5347 case kOffsetP +
kULong: {
ULong_t **val = (
ULong_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%lu ",(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5354 char **val = (
char**)ladd;
5355 if (*val) printf(
"%s",*val);
5384 printf(
"%s",st->
Data());
5417 printf(
"printing kAny case (%d)",atype);
5431 printf(
"printing kBase case (%d)",atype);
5441 printf(
"printing kStreamer case (%d)",atype);
5456 printf(
"printing kStreamLoop case (%d)",atype);
5473 if (ladd && aElement->
GetClass() == stringClass) {
5474 std::string *st = (std::string*)(ladd);
5475 printf(
"%s",st->c_str());
5480 printf(
"(unknown_type*)0x%lx",(
Long_t)(ladd));
5496 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)
static bool R__IsUniquePtr(TStreamerElement *element)
Return true if the element is auto_ptr or unique_ptr.
#define READ_ARRAY(TYPE_t)
static void R__WriteConstructorBody(FILE *file, TIter &next)
#define DeleteBasicPointer(addr, element, name)
static constexpr int str_length(const char *str)
static void R__TObjArray_InsertBefore(TObjArray *arr, TObject *newobj, TObject *oldobj)
static void R__WriteDestructorBody(FILE *file, TIter &next)
void Printf(const char *fmt,...)
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
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.
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
Find an object in this list using its name.
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)
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 void * New() const
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 s
static constexpr double ms