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) {
157 fOnFileClassVersion = 0;
158 fOldVersion =
Class()->GetClassVersion();
159 fNVirtualInfoLoc = 0;
165 fReadMemberWiseVecPtr = 0;
167 fWriteObjectWise = 0;
168 fWriteMemberWise = 0;
169 fWriteMemberWiseVecPtr = 0;
237 struct TPreventRecursiveBuildGuard {
238 TPreventRecursiveBuildGuard(
TStreamerInfo* info): fInfo(info) {
242 ~TPreventRecursiveBuildGuard() {
273 TPreventRecursiveBuildGuard buildGuard(
this);
299 ROOT::TSchemaRuleSet::TMatches rules;
315 Int_t offset = base->GetDelta();
320 Error(
"Build()",
"Cannot stream virtual base %s of class %s",
324 const char* bname = base->GetName();
325 const char* btitle = base->GetTitle();
327 if (!strcmp(bname,
"string")) {
329 }
else if (base->IsSTLContainer()) {
335 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);
349 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
365 if (!clm->
IsLoaded() && !(isCollection || isString)) {
368 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
383 std::string typeNameBuf;
384 std::string trueTypeNameBuf;
402 const char* dmName = dm->
GetName();
403 const char* dmTitle = dm->
GetTitle();
409 std::array<Int_t, 5> maxIndices;
419 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
420 dmFull = trueTypeNameBuf.c_str();
421 dmType = typeNameBuf.c_str();
428 trueTypeNameBuf = typeNameBuf;
429 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
430 dmFull = dmType = typeNameBuf.c_str();
431 dt =
gROOT->GetType(dmType);
444 const char* rbracket = ::strchr(dmTitle,
']');
445 if (lbracket && rbracket) {
449 Error(
"Build",
"%s, discarding: %s %s, illegal %s\n",
GetName(), dmFull, dmName, dmTitle);
455 if (!dtCounter || !isInteger) {
456 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] (must be Int_t)\n",
GetName(), dmFull, dmName, counterName);
464 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] must be placed before \n",
GetName(), dmFull, dmName, counterName);
474 if (!dmCounter && (strstr(dmFull,
"char*") || strstr(dmFull,
"Char_t*"))) {
476 dsize =
sizeof(
char*);
479 Error(
"Build",
"%s, unknown type: %s %s",
GetName(), dmFull, dmName);
481 }
else if (dmIsPtr && (dtype !=
kCharStar)) {
486 if ((
fName ==
"TString") || (
fName ==
"TClass")) {
489 Error(
"Build",
"%s, discarding: %s %s, no [dimension]\n",
GetName(), dmFull, dmName);
503 static const char* full_string_name =
"basic_string<char,char_traits<char>,allocator<char> >";
504 if (!strcmp(dmType,
"string") || !strcmp(dmType,
"std::string") || !strcmp(dmType, full_string_name)) {
508 if (proxy) element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, *proxy, dmIsPtr);
509 else element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, dmFull, dmIsPtr);
512 auto printErrorMsg = [&](
const char* category)
514 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);
518 printErrorMsg(
"compiled");
524 printErrorMsg(
"interpreted");
533 Error(
"Build",
"%s, unknown type: %s %s\n",
GetName(), dmFull, dmName);
551 Error(
"Build",
"%s: %s has no streamer or dictionary, data member %s will not be saved",
GetName(), dmFull, dmName);
562 Warning(
"Build",
"%s: %s has no streamer or dictionary, data member \"%s\" will not be saved",
GetName(), dmFull, dmName);
574 for (
Int_t i = 0; i < ndim; ++i) {
576 if (isStdArray) maxIndex = maxIndices[i];
596 if ( !wasCompiled && (rules && rules.HasRuleWithSource( element->
GetName(),
kTRUE )) ) {
597 needAllocClass =
kTRUE;
606 && rules && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) )
634 if (needAllocClass) {
704 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
706 if (element->
GetTitle()[0] ==
'<') {
711 if (content[
c] ==
'<') ++level;
712 else if (content[
c] ==
'>') --level;
723 "Update the collection proxy of the class \"%s\" \n" 724 "\tto be similar to \"%s\".",
729 The class %s had a collection proxy when written but it is not an STL\n \ 730 collection and we did not record the type of the content of the collection.\n \ 731 We will claim the content is a bool (i.e. no data will be read).",
755 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
GetName());
762 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
764 if (element->
GetTitle()[0] ==
'<') {
769 if (content[
c] ==
'<') ++level;
770 else if (content[
c] ==
'>') --level;
781 "Update the collection proxy of the class \"%s\" \n" 782 "\tto be similar to \"%s\".",
787 The class %s had a collection proxy when written but it is not an STL\n \ 788 collection and we did not record the type of the content of the collection.\n \ 789 We will claim the content is a bool (i.e. no data will be read).",
811 searchOnChecksum =
kFALSE;
817 searchOnChecksum =
kTRUE;
824 searchOnChecksum =
kFALSE;
830 searchOnChecksum =
kTRUE;
840 searchOnChecksum =
kFALSE;
846 searchOnChecksum =
kTRUE;
857 if (!searchOnChecksum) {
863 for (
Int_t i = -1; i < ninfos; ++i) {
880 while ((slot < ninfos) && (array->
UncheckedAt(slot) != 0)) {
926 #ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES 987 for (
Int_t i = 0; i < nel; ++i) {
1005 if (oldIsNonVersioned) {
1008 The class %s transitioned from not having a specified class version\n\ 1009 to having a specified class version (the current class version is %d).\n\ 1010 However too many different non-versioned layouts of the class have been\n\ 1011 loaded so far. This prevent the proper reading of objects written with\n\ 1012 the class layout version %d, in particular from the file:\n\ 1014 To work around this issue, load fewer 'old' files in the same ROOT session.",
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.\n\ 1023 To work around this issue, load fewer 'old' files in the same ROOT session.",
1030 The StreamerInfo for version %d of class %s read from the file %s\n\ 1031 has a different checksum than the previously loaded StreamerInfo.\n\ 1032 Reading objects of type %s from the file %s \n\ 1033 (and potentially other files) might not work correctly.\n\ 1034 Most likely the version number of the class was not properly\n\ 1035 updated [See ClassDef(%s,%d)].",
1039 The StreamerInfo from %s does not match existing one (%s:%d)\n\ 1040 The existing one has not been used yet and will be discarded.\n\ 1041 Reading the file %s will work properly, however writing object of\n\ 1042 type %s will not work properly. Most likely the version number\n\ 1043 of the class was not properly updated [See ClassDef(%s,%d)].",
1049 The StreamerInfo for version %d of class %s\n\ 1050 has a different checksum than the previously loaded StreamerInfo.\n\ 1051 Reading objects of type %s\n\ 1052 (and potentially other files) might not work correctly.\n\ 1053 Most likely the version number of the class was not properly\n\ 1054 updated [See ClassDef(%s,%d)].",
1058 The StreamerInfo from %s does not match existing one (%s:%d)\n\ 1059 The existing one has not been used yet and will be discarded.\n\ 1060 Reading should work properly, however writing object of\n\ 1061 type %s will not work properly. Most likely the version number\n\ 1062 of the class was not properly updated [See ClassDef(%s,%d)].",
1094 #ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES 1115 #endif // TEST_FOR_BACKWARD_COMPATIBILITY 1122 if (bc->GetClassPointer()->GetCollectionType()) {
1130 The StreamerInfo of class %s read from file %s\n\ 1131 has the same version (=%d) as the active class but a different checksum.\n\ 1132 You should update the version to ClassDef(%s,%d).\n\ 1133 Do not try to write objects with the current class definition,\n\ 1137 The StreamerInfo of class %s \n\ 1138 has the same version (=%d) as the active class but a different checksum.\n\ 1139 You should update the version to ClassDef(%s,%d).\n\ 1140 Do not try to write objects with the current class definition,\n\ 1148 Fatal(
"BuildCheck",
"\n\ 1149 The StreamerInfo of unversioned class %s \n\ 1150 has the same version (=%d) as the active class but an old checksum.\n\ 1211 for (
Int_t i=0;i < ndata;i++) {
1213 if (!element)
break;
1220 if (ty <=
kULong)
continue;
1224 {
for (
int j=ndata-1;j>=i;j--) {elements->
AddAtAndExpand(elements->
At(j),j+1);}}
1225 elements->
AddAt(bt,i);
1247 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() );
1265 if (oldClass == 0 || newClass == 0)
return kFALSE;
1270 const char *oldname = oldClass->
GetName();
1271 for (
UInt_t i = oldlen, done =
false, nest = 0; (i>0) && !done ; --i) {
1272 switch (oldClass->
GetName()[i-1]) {
1273 case '>' : ++nest;
break;
1274 case '<' :
if (nest==0)
return kFALSE;
1276 case ':' :
if (nest == 0) oldname= &(oldClass->
GetName()[i]); done =
kTRUE;
break;
1279 oldlen = strlen(oldname);
1280 if (!(strlen(newClass->
GetName()) > strlen(oldClass->
GetName()))) {
1284 const char* newEnd = & (newClass->
GetName()[newlen-oldlen]);
1286 if (0 != strcmp(newEnd, oldname)) {
1314 Error(
"ImportStreamerInfo",
"Unable to clone the StreamerInfo for %s.",(*next)->GetName());
1316 info->SetClass(newClass);
1317 Int_t oldv = info->GetClassVersion();
1360 if (oldContent == newContent) {
1361 contentMatch =
kTRUE;
1362 }
else if (newContent) {
1365 if (oldFlatContent == newFlatContent) {
1366 contentMatch =
kTRUE;
1372 contentMatch = (newContent==0);
1376 if ((oldContent==0 && oldProxy->
GetType() == newProxy->
GetType())
1453 TClass *FindAlternate(
TClass *context,
const std::string &i_name, std::string& newName)
1459 std::string
name(i_name);
1461 if (name.compare(0,6,
"const ")==0) {
1467 while(name[name.length()-nstars-1]==
'*') {
1472 name.erase(name.length()-nstars,nstars);
1475 std::string alternate(context->
GetName());
1476 alternate.append(
"::");
1477 alternate.append(name);
1481 newName.append(altcl->
GetName());
1482 newName.append(suffix);
1486 size_t ctxt_cursor = strlen(context->
GetName());
1487 for (
size_t level = 0; ctxt_cursor != 0; --ctxt_cursor) {
1488 switch (context->
GetName()[ctxt_cursor]) {
1489 case '<': --level;
break;
1490 case '>': ++level;
break;
1491 case ':':
if (level == 0) {
1495 alternate.append(context->
GetName(),ctxt_cursor+1);
1496 alternate.append(name);
1499 newName.append(altcl->
GetName());
1500 newName.append(suffix);
1535 info = old->GetValueClass()->GetStreamerInfo();
1546 if ((firstNewCl && !firstOldCl) || (secondNewCl && !secondOldCl))
1548 std::vector<std::string> inside;
1552 TClass *firstAltCl = firstOldCl;
1553 TClass *secondAltCl = secondOldCl;
1554 std::string firstNewName;
1555 std::string secondNewName;
1556 if (firstNewCl && !firstOldCl) {
1557 firstAltCl = FindAlternate(context, inside[1], firstNewName);
1559 if (secondNewCl && !secondOldCl) {
1560 secondAltCl = FindAlternate(context, inside[2], secondNewName);
1562 if ((firstNewCl && firstAltCl != firstOldCl) ||
1563 (secondNewCl && secondAltCl != secondOldCl) ) {
1566 std::string alternate = inside[0];
1567 alternate.append(
"<");
1568 alternate.append(firstAltCl ? firstNewName : inside[1]);
1569 alternate.append(
",");
1570 alternate.append(secondAltCl? secondNewName : inside[2]);
1574 if (alternate[alternate.length()-1]==
'>') {
1575 alternate.append(
" ");
1577 alternate.append(
">");
1582 }
else if (current->
GetValueClass() && !old->GetValueClass()
1583 && old->GetType() ==
kInt_t) {
1590 std::vector<std::string> inside;
1595 std::string newName;
1596 TClass *altcl = FindAlternate(context, inside[1], newName);
1599 std::string alternate = inside[0];
1600 alternate.append(
"<");
1601 alternate.append(newName);
1605 if (alternate[alternate.length()-1]==
'>') {
1606 alternate.append(
" ");
1608 alternate.append(
">");
1616 struct TBuildOldGuard {
1642 TBuildOldGuard buildOldGuard(
this);
1645 printf(
"\n====>Rebuilding TStreamerInfo for class: %s, version: %d\n",
GetName(),
fClassVersion);
1689 constexpr
size_t kSizeOfPtr =
sizeof(
void*);
1716 ROOT::TSchemaRuleSet::TMatches rules;
1722 Int_t virtualInfoLocAlloc = 0;
1747 #if defined(PROPER_IMPLEMEMANTION_OF_BASE_CLASS_RENAMING) 1768 Error(
"BuildOld",
"Could not find base class: %s for %s and could not find any matching rename rule\n", base->
GetName(),
GetName());
1778 Error(
"BuildOld",
"Could not find base class: %s for %s, renaming rule was found but is malformed\n", base->
GetName(),
GetName());
1788 else if( !baseclass ) {
1791 Warning(
"BuildOld",
"Missing base class: %s skipped", base->
GetName());
1793 baseclass =
new TClass(element->
GetName(), 1, 0, 0, -1, -1);
1794 element->
Update(0, baseclass);
1804 if (baseOffset < 0) {
1816 if (!baserule.empty()) {
1827 element->
Init(
this);
1839 if (infobase) baseclass = infobase->
GetClass();
1845 if (infobase && infobase->
fComp == 0) {
1867 if (baseOffset < 0) {
1872 offset += baseclass->
Size();
1879 Int_t baseOffset = -1;
1887 if (strchr(bc->
GetName(),
'<') || !strcmp(bc->
GetName(),
"string")) {
1890 if (bcName == elName) {
1905 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());
1918 if (newInfo ==
this) {
1919 baseOffset = offset;
1921 }
else if (newInfo) {
1925 const char *newElName = newElement->
GetName();
1926 if (newElement->IsBase() && (strchr(newElName,
'<') || !strcmp(newElName,
"string")) ) {
1929 if (bcName == elName) {
1935 Error(
"BuildOld",
"Could not find STL base class: %s for %s\n", element->
GetName(),
GetName());
1938 baseOffset = newElement->GetOffset();
1939 asize = newElement->GetSize();
1942 if (baseOffset == -1) {
1953 if (baseOffset < 0) {
1959 element->
Init(
this);
1974 std::string typeNameBuf;
1975 const char* dmType =
nullptr;
1977 Bool_t isUniquePtr =
false;
1980 std::array<Int_t, 5> maxIndices;
1991 element->
Init(
this);
2005 element->
Init(
this);
2014 dmType = typeNameBuf.c_str();
2021 dmType = typeNameBuf.c_str();
2022 dt =
gROOT->GetType(dmType);
2029 if (dmClassName.
Index(
"const ")==0) dmClassName.
Remove(0,6);
2034 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());
2051 element->
Init(
this);
2070 auto theType = isStdArray ? dt : dm->
GetDataType();
2082 if ((newType == ::
kChar_t) && dmIsPtr && !isArray && !hasCount) {
2084 }
else if (dmIsPtr) {
2086 }
else if (isArray) {
2090 if (newType == -1) {
2097 if (newInfo && (newInfo !=
this)) {
2100 if (newClass == 0) {
2101 newType = newElems ? newElems->
GetType() : -1;
2125 }
else if (element->
GetType() != newType) {
2138 if (oldClass == newClass.
GetClass()) {
2140 }
else if (ClassWasMovedToNamespace(oldClass, newClass.
GetClass())) {
2142 if (0 != (oldv = ImportStreamerInfo(oldClass, newClass.
GetClass()))) {
2143 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);
2151 if (ContainerMatchTClonesArray(newClass.
GetClass())) {
2174 TClass *oldFixedClass = FixCollectionV5(
GetClass(),oldClass,newClass);
2175 if (oldFixedClass && oldFixedClass != oldClass) {
2176 element->
Update(oldClass,oldFixedClass);
2177 oldClass = oldFixedClass;
2180 if (CollectionMatch(oldClass, newClass)) {
2195 switch( element->
GetType() ) {
2221 }
else if (CollectionMatchFloat16(oldClass,newClass)) {
2223 }
else if (CollectionMatchDouble32(oldClass,newClass)) {
2225 }
else if (CollectionMatchLong64(oldClass,newClass)) {
2228 }
else if (CollectionMatchULong64(oldClass,newClass)) {
2241 }
else if(oldClass &&
2258 if (isUniquePtr || strncmp(dm->
GetTitle(),
"->",2)==0) {
2291 if ((!dmIsPtr || newType==
kSTLp) && (isStdArray ? ndim : dm->
GetArrayDim()) > 0) {
2296 if (newInfo && (newInfo !=
this)) {
2299 newType = newElems->
GetType();
2330 if (newType != -1) {
2338 cannotConvert =
kTRUE;
2342 printf(
"%s We have no clue\n", dm->
GetName());
2343 cannotConvert =
kTRUE;
2346 if (newType != -1) {
2350 cannotConvert =
kTRUE;
2354 cannotConvert =
kTRUE;
2358 if (cannotConvert) {
2381 strcmp(element->
GetName(),
"This") == 0 &&
2387 asize =
sizeof(std::vector<int>);
2393 if ((offset % kSizeOfPtr) != 0) {
2394 offset = offset - (offset % kSizeOfPtr) + kSizeOfPtr;
2400 if (!wasCompiled && rules) {
2401 if (rules.HasRuleWithSource( element->
GetName(),
kTRUE ) ) {
2403 if (allocClass == 0) {
2411 allocClass = infoalloc->
GetClass();
2417 && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2440 }
else if (rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2452 }
else if (rules && rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2488 for (iel = 0; iel < narr; ++iel) {
2491 tai[kel++] = element;
2493 arr[jel++] = element;
2496 for (kel = 0; jel < narr;) {
2497 arr[jel++] = tai[kel++];
2504 if (!wasCompiled && allocClass) {
2561 TMemberInfo(
TClass *parent) : fParent(parent) {};
2563 void SetDataType(
Int_t datatype) {
2564 fDataType = datatype;
2570 void SetClassName(
const char *name) {
2573 void SetComment(
const char *title) {
2574 const char *left = strstr(title,
"[");
2576 const char *right = strstr(left,
"]");
2579 fComment.
Append(left,right-left);
2597 if (fName != other.fName)
return kTRUE;
2600 if (fDataType != other.fDataType) {
2601 if ( (fDataType == 4 && other.fDataType == 16)
2602 || (fDataType == 16 && other.fDataType == 4) ) {
2604 }
else if ( (fDataType == 14 && other.fDataType == 17)
2605 || (fDataType == 17 && other.fDataType == 14) ) {
2607 }
else if ( (fDataType == 3 && other.fDataType == 6)
2608 ||(fDataType == 6 && other.fDataType == 3) ){
2617 }
else if (fClassName != other.fClassName) {
2618 if ( (fClassName ==
"long" && (other.fClassName ==
"long long" || other.fClassName ==
"Long64_t"))
2619 || ( (fClassName ==
"long long" || fClassName ==
"Long64_t") && other.fClassName ==
"long") ) {
2621 }
else if ( (fClassName ==
"unsigned long" && (other.fClassName ==
"unsigned long long" || other.fClassName ==
"ULong64_t"))
2622 || ( (fClassName ==
"unsigned long long" || fClassName ==
"ULong64_t") && other.fClassName ==
"unsigned long") ) {
2627 if (name != othername) {
2630 if (!CollectionMatch(cl,otherCl)) {
2631 TClass *oldFixedClass = FixCollectionV5(fParent,cl,otherCl);
2632 if (!oldFixedClass || !CollectionMatch(oldFixedClass,otherCl)) {
2641 return fComment != other.fComment;
2663 char* eaddr = ((
char*)obj) + element->
GetOffset();
2682 if (ecl && (
fClass!=ecl )) {
2701 char* eaddr = ((
char*)obj) + element->
GetOffset();
2718 if (newname && newname[0] &&
fName != newname) {
2721 for(
Int_t i = 0; i < ndata; ++i) {
2752 R__ASSERT( (cl==0 || info==0) && (cl!=0 || info!=0) );
2785 if (el && el->
IsBase()) {
2800 if (infoel && infoel->
IsBase()) {
2801 otherClass = infoel->
GetName();
2812 if (localClass != otherClass) {
2816 "The in-memory layout version %d for class '%s' has a base class (%s) that the on-file layout version %d does not have.",
2818 }
else if (otherClass.
Length()==0) {
2820 "The on-file layout version %d for class '%s' has a base class (%s) that the in-memory layout version %d does not have",
2824 "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'",
2828 if (!complete)
return kFALSE;
2829 result = result &&
kFALSE;
2833 if (!localBase)
continue;
2836 if (!otherBaseClass)
continue;
2839 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2840 " has the same version (=%d) as the active class but a different checksum.\n" 2841 " You should update the version to ClassDef(%s,%d).\n" 2842 " The objects on this file might not be readable because:\n" 2843 " 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).",
2852 if (!localBaseInfo) {
2859 if (!localBaseInfo) {
2861 msg.
Form(
" The StreamerInfo of the base class %s (of class %s) read from %s%s\n" 2862 " refers to a checksum (%x) that can not be found neither in memory nor in the file.\n",
2864 file ?
"file " :
"", file ? file->
GetName() :
"",
2876 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2877 " has the same version (=%d) as the active class but a different checksum.\n" 2878 " You should update the version to ClassDef(%s,%d).\n" 2879 " The objects on this file might not be readable because:\n" 2880 " 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).",
2890 if (!localBase || !otherBase)
continue;
2896 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2897 " has the same version (=%d) as the active class but a different checksum.\n" 2898 " You should update the version to ClassDef(%s,%d).\n" 2899 " The objects on this file might not be readable because:\n" 2900 " 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).",
2910 if (localBaseInfo == otherBaseInfo ||
2916 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2917 " has the same version (=%d) as the active class but a different checksum.\n" 2918 " You should update the version to ClassDef(%s,%d).\n" 2919 " The objects on this file might not be readable because:\n" 2920 " 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).",
2928 if (!result && !complete) {
2937 TMemberInfo other(cl ? cl : info->
GetClass());
2948 local.SetName( el->
GetName() );
2950 local.SetComment( el->
GetTitle() );
2951 local.SetDataType( el->
GetType() );
2959 other.SetName( tdm->
GetName() );
2961 other.SetComment( tdm->
GetTitle() );
2988 other.SetName( infoel->
GetName() );
2990 other.SetComment( infoel->
GetTitle() );
2991 other.SetDataType( infoel->
GetType() );
3000 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" 3003 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
3005 }
else if (other.fName.Length()==0) {
3006 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" 3009 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data());
3011 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" 3016 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data()
3017 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
3020 result = result &&
kFALSE;
3021 if (!complete)
return result;
3045 constexpr
size_t kSizeOfPtr =
sizeof(
void*);
3046 if ((fSize % kSizeOfPtr) != 0) {
3047 fSize = fSize - (fSize % kSizeOfPtr) + kSizeOfPtr;
3083 static TClassRef string_classref(
"string");
3084 if (
fClass == string_classref) {
3143 if (allocator)
return allocator->
GetClass();
3193 for (
int i=0; i<il; i++)
id =
id*3+name[i];
3201 for (
int i=0; i<il; i++)
id =
id*3+name[i];
3211 if (el->
IsBase())
continue;
3226 for (i=0; i<il; i++)
id =
id*3+name[i];
3248 type.
ReplaceAll(
"ULong64_t",
"unsigned long long");
3253 if (type==
"signed char") type =
"char";
3257 for (i=0; i<il; i++)
id =
id*3+type[i];
3272 const char *right = strstr(left,
"]");
3275 while (left != right) {
3298 fprintf(file,
" %s = 0;\n",element->
GetName());
3300 fprintf(file,
" memset(%s,0,%d);\n",element->
GetName(),element->
GetSize());
3304 fprintf(file,
" %s = 0;\n",element->
GetName());
3319 if (atstart) { fprintf(file,
" : "); atstart =
kFALSE; }
3320 else fprintf(file,
" , ");
3321 fprintf(file,
"%s(const_cast<%s &>( rhs ))\n", element->
GetName(),protoname.
Data());
3324 if (atstart) { fprintf(file,
" : "); atstart =
kFALSE; }
3325 else fprintf(file,
" , ");
3326 fprintf(file,
"%s(const_cast<%s &>( rhs ).%s)\n",element->
GetName(),protoname.
Data(),element->
GetName());
3330 fprintf(file,
"{\n");
3331 fprintf(file,
" // This is NOT a copy constructor. This is actually a move constructor (for stl container's sake).\n");
3332 fprintf(file,
" // Use at your own risk!\n");
3333 fprintf(file,
" (void)rhs; // avoid warning about unused parameter\n");
3341 if (!defMod) { fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3342 const char *ename = element->
GetName();
3343 const char *colon2 = strstr(ename,
"::");
3344 if (colon2) ename = colon2+2;
3346 fprintf(file,
" modrhs.%s = 0;\n",ename);
3348 fprintf(file,
" memset(modrhs.%s,0,%d);\n",ename,element->
GetSize());
3351 const char *ename = element->
GetName();
3354 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3356 fprintf(file,
" modrhs.%s = 0;\n",ename);
3359 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3361 fprintf(file,
" modrhs.%s = 0;\n",ename);
3365 fprintf(file,
" for (Int_t i=0;i<%d;i++) %s[i] = rhs.%s[i];\n",element->
GetArrayLength(),ename,ename);
3367 fprintf(file,
" for (Int_t i=0;i<%d;i++) (&(%s",element->
GetArrayLength(),ename);
3369 fprintf(file,
"[0]");
3371 fprintf(file,
"))[i] = (&(rhs.%s",ename);
3373 fprintf(file,
"[0]");
3375 fprintf(file,
"))[i];\n");
3378 if (!defMod) { fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3379 fprintf(file,
" modrhs.%s = 0;\n",ename);
3382 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3386 std::string method_name =
"clear";
3388 method_name =
"reset";
3390 if (element->IsBase()) {
3391 fprintf(file,
" modrhs.%s();\n", method_name.c_str());
3393 fprintf(file,
" modrhs.%s.%s();\n",ename, method_name.c_str());
3411 const char *ename = element->
GetName();
3412 const char *colon2 = strstr(ename,
"::");
3413 if (colon2) ename = colon2+2;
3416 fprintf(file,
" %s = 0;\n",ename);
3418 fprintf(file,
" memset(%s,0,%d);\n",ename,element->
GetSize());
3422 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3424 fprintf(file,
" for (Int_t i=0;i<%d;i++) delete %s[i]; memset(%s,0,%d);\n",element->
GetArrayLength(),ename,ename,element->
GetSize());
3429 const char *ename = element->
GetName();
3431 fprintf(file,
" %s = 0;\n",ename);
3433 fprintf(file,
" delete [] %s; %s = 0;\n",ename,ename);
3437 const char *ename = element->
GetName();
3439 fprintf(file,
" %s = 0;\n",ename);
3441 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3443 fprintf(file,
" delete [] %s; %s = 0;\n",ename,ename);
3447 const char *ename = element->
GetName();
3448 const char *prefix =
"";
3451 }
else if ( element->
IsBase() ) {
3460 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3468 std::vector<std::string> inside;
3471 if (inside[1][inside[1].size()-1]==
'*' || inside[2][inside[2].size()-1]==
'*') {
3472 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3478 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3495 const char *clname =
GetName();
3497 if (strchr(clname,
':')) {
3499 Int_t len = strlen(clname);
3500 const char *
name = clname;
3503 for (
Int_t cur = 0; cur < len; ++cur) {
3504 switch (clname[cur]) {
3511 if (nest == 0) { cur = len;
continue; }
3515 if (nest == 0 && clname[cur+1] ==
':') {
3518 name = clname + cur + 2;
3525 template_protoname.
Append(clname,pr_pos);
3529 const char *where = strstr(clname,
"<");
3530 isTemplate = where != 0;
3532 template_protoname.
Append(clname,where-clname);
3536 if (needGenericTemplate && isTemplate) {
3538 fprintf(fp,
"#ifndef %s_h\n", templateName.
Data());
3539 fprintf(fp,
"#define %s_h\n", templateName.
Data());
3550 if (!element->
IsBase())
continue;
3552 const char *ename = element->
GetName();
3553 if (nbase == 1) fprintf(fp,
" : public %s",ename);
3554 else fprintf(fp,
" , public %s",ename);
3559 if (subClasses && subClasses->
GetEntries()) {
3560 Bool_t needheader =
true;
3562 TIter subnext(subClasses);
3567 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3569 fprintf(fp,
"\npublic:\n");
3570 fprintf(fp,
"// Nested classes forward declaration.\n");
3574 UInt_t sub_numberOfClasses = 0;
3575 UInt_t sub_numberOfNamespaces;
3583 for (
UInt_t i = 0;i < sub_numberOfClasses;++i) {
3584 fprintf(fp,
"}; // end of class.\n");
3586 if (sub_numberOfNamespaces > 0) {
3587 Error(
"GenerateDeclaration",
"Nested classes %s thought to be inside a namespace inside the class %s",subinfo->
GetName(),
GetName());
3594 fprintf(fp,
"\npublic:\n");
3595 fprintf(fp,
"// Nested classes declaration.\n");
3598 if (subClasses && subClasses->
GetEntries()) {
3604 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3611 fprintf(fp,
"\npublic:\n");
3612 fprintf(fp,
"// Data Members.\n");
3625 if (element->
IsBase())
continue;
3626 const char *ename = element->
GetName();
3658 lt = enamebasic.
Length();
3662 if (lt>=ltype) ltype = lt+1;
3664 for (is = 3+lt; is < (3+ltype); ++is) line +=
' ';
3667 if (element->
IsaPointer() && !strchr(line,
'*')) line[2+ltype] =
'*';
3669 if (ld>=ldata) ldata = ld+1;
3670 for (is = 3+ltype+ld; is < (3+ltype+ldata); ++is) line +=
' ';
3674 fprintf(fp,
"%s\n",line.
Data());
3677 if (needGenericTemplate && isTemplate) {
3679 fprintf(fp,
"\n %s() {\n",protoname.Data());
3682 fprintf(fp,
" %s(const %s & rhs )\n",protoname.Data(),protoname.Data());
3685 fprintf(fp,
" virtual ~%s() {\n",protoname.Data());
3687 fprintf(fp,
" }\n\n");
3691 fprintf(fp,
"\n %s();\n",protoname.Data());
3692 fprintf(fp,
" %s(const %s & );\n",protoname.Data(),protoname.Data());
3693 fprintf(fp,
" virtual ~%s();\n\n",protoname.Data());
3697 fprintf(sfp,
"#ifndef %s_cxx\n",guard.Data());
3698 fprintf(sfp,
"#define %s_cxx\n",guard.Data());
3699 fprintf(sfp,
"%s::%s() {\n",
GetName(),protoname.Data());
3703 fprintf(sfp,
"%s::%s(const %s & rhs)\n",
GetName(),protoname.Data(),protoname.Data());
3707 fprintf(sfp,
"%s::~%s() {\n",
GetName(),protoname.Data());
3710 fprintf(sfp,
"#endif // %s_cxx\n\n",guard.Data());
3718 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.Data(),0);
3720 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.Data(),
fClassVersion + 1);
3725 for(
UInt_t i=0;i<numberOfNamespaces;++i) {
3726 fprintf(fp,
"} // namespace\n");
3729 if (needGenericTemplate && isTemplate) {
3730 fprintf(fp,
"#endif // generic template declaration\n");
3739 if (inclist[0]==0) {
3745 const char *clname =
GetName();
3746 if (strchr(clname,
'<')) {
3761 const char *ename = element->
GetName();
3762 const char *colon2 = strstr(ename,
"::");
3763 if (colon2) ename = colon2+2;
3770 if (ltype < lt) ltype = lt;
3771 if (ldata < ld) ldata = ld;
3775 incRiostream =
kTRUE;
3781 if (!include[0])
continue;
3783 Bool_t greater = (include[0]==
'<');
3786 if (strncmp(include,
"include/",8)==0) {
3789 if (strncmp(include,
"include\\",9)==0) {
3792 if (strncmp(element->
GetTypeName(),
"pair<",strlen(
"pair<"))==0) {
3794 }
else if (strncmp(element->
GetTypeName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0) {
3797 TString incName( include, strlen(include)-1 );
3818 if (strncmp(
GetName(),
"pair<",strlen(
"pair<"))==0)
return 0;
3819 if (strncmp(
GetName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0)
return 0;
3830 for(
UInt_t i=len; i>0; --i) {
3832 case '>': ++nest;
if (scope==0) { isTemplate =
kTRUE; }
break;
3833 case '<': --nest;
break;
3835 if (nest==0 &&
GetName()[i-1]==
':') {
3838 cl =
gROOT->GetClass(nsname);
3842 }
else if (cl == 0 && extrainfos != 0) {
3857 if (
gDebug) printf(
"generating code for class %s\n",
GetName());
3863 filename.
Form(
"%s/%s.h",dirname,headername.
Data());
3865 FILE *fp = fopen(filename.
Data(),
"w");
3867 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3872 FILE *allfp = fopen(filename.
Data(),
"a");
3874 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3878 fprintf(allfp,
"#include \"%s.h\"\n", headername.
Data());
3881 char *inclist =
new char[50000];
3886 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3887 fprintf(fp,
"// This class has been generated by TFile::MakeProject\n");
3888 fprintf(fp,
"// (%s by ROOT version %s)\n",td.
AsString(),
gROOT->GetVersion());
3889 fprintf(fp,
"// from the StreamerInfo in file %s\n",
gDirectory->GetFile()->GetName());
3890 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3893 fprintf(fp,
"#ifndef %s_h\n",headername.
Data());
3894 fprintf(fp,
"#define %s_h\n",headername.
Data());
3901 TIter subnext(subClasses);
3910 FILE *sfp = fopen( sourcename.
Data(),
"a" );
3914 Error(
"GenerateHeaderFile",
"Could not open %s for appending",sourcename.
Data());
3918 fprintf(fp,
"#endif\n");
3922 if (sfp) fclose(sfp);
3933 char dmbracket[256];
3947 char *rdmc = (
char*)rdm->
GetName();
3950 if (dm->
IsaPointer() && rdmc[0] ==
'*') rdmc++;
3953 if (strcmp(rdmc,dm->
GetName()) == 0) {
3965 if (strstr(rdm->
GetName(),dmbracket)) {
3979 if (elementName == 0)
return 0;
4041 Int_t base_offset = 0;
4042 Int_t local_offset = 0;
4048 if (!base_cl || !base_element) {
4051 base_offset = base_element->GetOffset();
4054 offset = base_offset + local_offset;
4069 Int_t local_offset = 0;
4078 offset = base_offset + local_offset;
4126 ::Obsolete(
"TStreamerInfo::GetStreamerElementReal",
"v5-34-20",
"v6-00-02");
4128 if (i < 0 || i >=
fNdata)
return 0;
4129 if (j < 0)
return 0;
4134 for (
Int_t ise=0;ise < nelems;ise++) {
4136 if (ise+j >= nelems)
return 0;
4145 template <
typename T>
4167 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 4189 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 4195 #define READ_ARRAY(TYPE_t) \ 4197 Int_t sub_instance, index; \ 4198 Int_t instance = k; \ 4200 index = instance / len; \ 4201 sub_instance = instance % len; \ 4206 TYPE_t **val =(TYPE_t**)(ladd); \ 4207 return T((val[sub_instance])[index]); \ 4225 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 4249 template <
typename T>
4258 if (i < 0)
return 0;
4262 if (atype ==
kSTL) {
4264 if (newClass == 0) {
4276 if (j >= nc)
return 0;
4277 char *element_ptr = (
char*)proxy->
At(j);
4278 return GetTypedValueAux<T>(atype,element_ptr,0,1);
4282 return GetTypedValueAux<T>(atype,ladd,j,len);
4291 template <
typename T>
4298 if (j >= nc)
return 0;
4313 template <
typename T>
4317 if (j >= nc)
return 0;
4319 char *pointer = (
char*)cont->
At(j);
4332 template <
typename T>
4337 if (j >= nc)
return 0;
4339 char **ptr = (
char**)cont->
At(j);
4340 char *pointer = *ptr;
4351 if (rules.empty())
return;
4356 for(
auto rule : rules) {
4357 if( rule->IsRenameRule() || rule->IsAliasRule() )
4362 if ( rule->HasTarget( element->
GetName() ) ) {
4365 if ( rule->GetAttributes()[0] != 0 ) {
4366 TString attr( rule->GetAttributes() );
4368 if (attr.Contains(
"owner")) {
4369 if (attr.Contains(
"notowner")) {
4383 const TObjArray *sources = rule->GetSource();
4384 TIter input(sources);
4386 while((src = input())) {
4389 #if 0 // Don't warn about not activating the rule. If don't warn the user can 4395 rule->AsString(ruleStr);
4396 Warning(
"InsertArtificialElements",
"For class %s in StreamerInfo %d is missing the source data member %s when trying to apply the rule:\n %s",
4404 if (!rule)
continue;
4407 typedef std::vector<TStreamerArtificial*> vec_t;
4410 if (rule->GetTarget()==0) {
4418 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4420 toAdd.push_back(newel);
4422 toAdd.reserve(rule->GetTarget()->GetEntries());
4433 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4435 toAdd.push_back(newel);
4440 for(
Int_t other = 1; other < rule->GetTarget()->GetEntries(); ++other) {
4441 objstr = (
TObjString*)(rule->GetTarget()->At(other));
4443 newName = objstr->
String();
4450 toAdd.push_back(newel);
4457 TIter s_iter(rule->GetSource());
4462 if (loc == -1 || (i+1)>loc) {
4478 for(vec_t::iterator iter = toAdd.begin(); iter != toAdd.end(); ++iter) {
4511 while ((obj = next()))
4514 if (strstr(option,
"full") != 0) {
4520 if (sequenceType.
Length()) {
4522 sequenceType +=
"]";
4524 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4526 sequenceType.
Data());
4530 Bool_t wantOrig = strstr(option,
"incOrig") != 0;
4540 if (sequenceType.
Length() != 0) {
4541 sequenceType +=
',';
4543 sequenceType +=
"optimized";
4545 if (sequenceType.
Length()) {
4547 sequenceType +=
"]";
4549 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4551 sequenceType.
Data());
4552 if (optimized && wantOrig) {
4557 if (sequenceType.
Length()) {
4559 sequenceType +=
"]";
4561 Printf(
" j=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4563 sequenceType.
Data());
4581 char* p = (
char*) obj;
4587 p =
new char[
fSize];
4588 memset(p, 0,
fSize);
4620 char**
r = (
char**) eaddr;
4622 for (
Int_t i = 0; i < len; ++i) {
4635 void**
r = (
void**) eaddr;
4642 const char* title = element->
GetTitle();
4643 const char* bracket1 = strrchr(title,
'(');
4644 const char* bracket2 = strrchr(title,
')');
4645 if (bracket1 && bracket2 && (bracket2 != (bracket1 + 1))) {
4646 Int_t len = bracket2 - (bracket1 + 1);
4647 char* clonesClass =
new char[len+1];
4648 clonesClass[0] =
'\0';
4649 strncat(clonesClass, bracket1 + 1, len);
4650 void**
r = (
void**) eaddr;
4652 delete[] clonesClass;
4655 void**
r = (
void**) eaddr;
4666 if (einfo) einfo->
New(eaddr);
4684 if (strcmp(element->
GetName(),
"This")==0 &&
4704 for (
Int_t i = 0; i < len; ++i, r += size) {
4727 Error(
"NewArray",
"TClass pointer is null!");
4733 char* p = (
char*) ary;
4745 char* dataBegin = (
char*) &r[2];
4758 #define DeleteBasicPointer(addr,element,name) \ 4760 name **f = (name**)(addr); \ 4761 int n = element->GetArrayLength() ? element->GetArrayLength() : 1;\ 4762 for(int j=0;j<n;j++) { \ 4777 char *p = (
char*)obj;
4781 for (
Int_t elenum = nelements - 1; elenum >= 0; --elenum) {
4820 void**
r = (
void**) eaddr;
4821 for (
Int_t j = len - 1; j >= 0; --j) {
4835 void**
r = (
void**) eaddr;
4836 for (
Int_t j = len - 1; j >= 0; --j) {
4844 if (etype ==
kBase) {
4859 if (etype ==
kSTL) {
4863 if (strcmp(ele->
GetName(),
"This")==0) {
4887 char*
r = eaddr + (size * (len - 1));
4888 for (
Int_t j = len - 1; j >= 0; --j, r -= size) {
4910 if (obj == 0)
return;
4912 char* p = (
char*) obj;
4918 if (allocator !=
this) {
4936 if (ary == 0)
return;
4943 char* memBegin = (
char*) &r[-2];
4945 char* p = ((
char*) ary) + ((arrayLen - 1) * size);
4970 printf(
" %-15s = ",name);
4983 const static TClassRef stringClass(
"string");
4984 if (
fClass == stringClass) {
4985 std::string *st = (std::string*)(pointer);
4986 printf(
"%s\n",st->c_str());
4989 printf(
"%s\n",st->
Data());
5002 if (aleng > lenmax) aleng = lenmax;
5013 if (!clones) {printf(
" %-15s = \n",name);
return;}
5014 printf(
" %-15s = ",name);
5016 if (nc > lenmax) nc = lenmax;
5021 if (aleng > lenmax) aleng = lenmax;
5023 for (
Int_t k=0;k < nc;k++) {
5025 char *ladd = pointer+offset;
5028 if (k < nc-1) printf(
", ");
5038 if (!cont) {printf(
" %-15s = \n",name);
return;}
5039 printf(
" %-15s = ",name);
5041 if (nc > lenmax) nc = lenmax;
5046 if (aleng > lenmax) aleng = lenmax;
5048 for (
Int_t k=0;k < nc;k++) {
5049 char *pointer = (
char*)cont->
At(k);
5050 char *ladd = pointer+offset;
5053 if (k < nc-1) printf(
", ");
5061 void TStreamerInfo::Streamer(
TBuffer &R__b)
5071 TNamed::Streamer(R__b);
5090 Int_t nobjects = fElements->GetEntriesFast();
5092 for (
Int_t i = 0; i < nobjects; i++) {
5095 if ( el->IsA() == basic ) {
5115 (*fElements)[i] = rel;
5124 TNamed::Streamer(R__b);
5135 TNamed::Streamer(R__b);
5150 for (
Int_t i = 0; i < nobjects; i++) {
5156 }
else if (el != 0) {
5157 elements.AddLast(el);
5177 static std::atomic<Bool_t> onlyonce(
kFALSE);
5179 if (onlyonce.compare_exchange_strong(expected,
kTRUE)) {
5180 Warning(
"TagFile",
"This function is deprecated, use TBuffer::TagStreamerInfo instead");
5184 if (fNumber < 0 || fNumber >= nindex) {
5185 Error(
"TagFile",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s",
5201 #define DOLOOP for (k = 0, pointer = arr[0]; k < narr; pointer = arr[++k]) 5204 static void PrintCR(
int j,
Int_t aleng,
UInt_t ltype)
5206 if (j == aleng-1) printf(
"\n");
5209 if (j%ltype == ltype-1) printf(
"\n ");
5234 case kInt: {
Int_t *val = (
Int_t* )ladd; printf(
"%d" ,*val);
break;}
5249 case kOffsetL +
kBool: {
Bool_t *val = (
Bool_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%c " ,val[j]); PrintCR(j,aleng,20); }
break;}
5250 case kOffsetL +
kChar: {
Char_t *val = (
Char_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%c " ,val[j]); PrintCR(j,aleng,20); }
break;}
5252 case kOffsetL +
kInt: {
Int_t *val = (
Int_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%d " ,val[j]); PrintCR(j,aleng,10); }
break;}
5253 case kOffsetL +
kLong: {
Long_t *val = (
Long_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%ld ",val[j]); PrintCR(j,aleng, 5); }
break;}
5261 case kOffsetL +
kUInt: {
UInt_t *val = (
UInt_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%u " ,val[j]); PrintCR(j,aleng, 5); }
break;}
5264 case kOffsetL +
kBits: {
UInt_t *val = (
UInt_t* )ladd;
for(j=0;j<aleng;j++) { printf(
"%d " ,val[j]); PrintCR(j,aleng, 5); }
break;}
5267 case kOffsetP +
kBool: {
Bool_t **val = (
Bool_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5268 case kOffsetP +
kChar: {
Char_t **val = (
Char_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5269 case kOffsetP +
kShort: {
Short_t **val = (
Short_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,10); }
break;}
5270 case kOffsetP +
kInt: {
Int_t **val = (
Int_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%d " ,(*val)[j]); PrintCR(j,aleng,10); }
break;}
5271 case kOffsetP +
kLong: {
Long_t **val = (
Long_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%ld ",(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5273 case kOffsetP +
kFloat: {
Float_t **val = (
Float_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%f " ,(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5277 case kOffsetP +
kUChar: {
UChar_t **val = (
UChar_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%u " ,(*val)[j]); PrintCR(j,aleng,20); }
break;}
5279 case kOffsetP +
kUInt: {
UInt_t **val = (
UInt_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%u " ,(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5280 case kOffsetP +
kULong: {
ULong_t **val = (
ULong_t** )ladd;
for(j=0;j<*count;j++) { printf(
"%lu ",(*val)[j]); PrintCR(j,aleng, 5); }
break;}
5287 char **val = (
char**)ladd;
5288 if (*val) printf(
"%s",*val);
5317 printf(
"%s",st->
Data());
5350 printf(
"printing kAny case (%d)",atype);
5364 printf(
"printing kBase case (%d)",atype);
5374 printf(
"printing kStreamer case (%d)",atype);
5389 printf(
"printing kStreamLoop case (%d)",atype);
5406 if (ladd && aElement->
GetClass() == stringClass) {
5407 std::string *st = (std::string*)(ladd);
5408 printf(
"%s",st->c_str());
5413 printf(
"(unknown_type*)0x%lx",(
Long_t)(ladd));
5429 element->
Update(oldcl,newcl);
Bool_t HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
Describe Streamer information for one class version.
Small helper to read a TBuffer containing a TClonesArray into any valid collection.
Int_t GetOffset(const char *) const
Return the offset of the data member as indicated by this StreamerInfo.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * GetName() const
Returns name of object.
virtual void * New(void *obj=0)=0
virtual Bool_t IsTransient() const
Return kTRUE if the element represent an entity that is not written to the disk (transient members...
void SetBufferOffset(Int_t offset=0)
virtual Int_t GetCollectionType() const =0
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
Int_t fClassVersion
Class version identifier.
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method). ...
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
static std::atomic< Int_t > fgCount
Number of TStreamerInfo instances.
const char * GetCountClass() const
static void R__TObjArray_InsertBefore(TObjArray *arr, TObject *newobj, TObject *oldobj)
const char * GetTypeNameBasic() const
Return type name of this element in case the type name is not a standard basic type, return the basic type name known to CINT.
virtual void ClassBegin(const TClass *, Version_t=-1)=0
T GetTypedValue(char *pointer, Int_t i, Int_t j, Int_t len) const
Return value of element i in object at pointer.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual void SetOffset(Int_t offset)
TString GetTypeName()
Get basic type of typedef, e,g.
Version_t fOldVersion
! Version of the TStreamerInfo object read from the file
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container code of cont...
ActionContainer_t fActions
virtual Int_t GetProperties() const
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...
void BuildEmulated(TFile *file)
Create an Emulation TStreamerInfo object.
TStreamerInfoActions::TActionSequence * fWriteMemberWiseVecPtr
! List of write action resulting from the compilation for use in member wise streaming.
TStreamerElement * GetStreamerElement(const char *datamember, Int_t &offset) const
Return the StreamerElement of "datamember" inside our class or any of its base classes.
virtual Bool_t CompareContent(TClass *cl, TVirtualStreamerInfo *info, Bool_t warn, Bool_t complete, TFile *file)=0
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
virtual TClass * GetClass() const =0
Collectable string class.
Equal to TDataType's kchar.
virtual void SetSize(Int_t dsize)
virtual TClass * GetValueClass() const =0
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
All ROOT classes may have RTTI (run time type identification) support added.
TObject * GetParent() const
Return pointer to parent of this buffer.
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.
static TString GetHeaderName(const char *name, const TList *extrainfos, Bool_t includeNested=kFALSE)
Return the header name containing the description of name.
R__EXTERN TVirtualMutex * gInterpreterMutex
TString & ReplaceAll(const TString &s1, const TString &s2)
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
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 GetUnitSize() const
Get the sizeof the underlying type of the data member (i.e.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual void SetName(const char *name)
Set the name of the TNamed.
TArrayC * GetClassIndex() const
TStreamerElement * GetStreamerElementReal(Int_t i, Int_t j) const
Obsolete: this routine is obsolete and should not longer be used.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
void Update(const TClass *oldcl, TClass *newcl)
Update the TClass pointer cached in this object.
static TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual Int_t GetEntries() const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
Buffer base class used for serializing objects.
Bool_t HasInterpreterInfo() const
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
virtual void SetTypeName(const char *name)
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void SetReadFunc(ROOT::TSchemaRule::ReadFuncPtr_t val)
void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)
Recursively mark streamer infos for writing to a file.
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.
void * New(void *obj=0)
An emulated object is created at address obj, if obj is null we allocate memory for the object...
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Int_t GetArrayLength() const
TVirtualStreamerInfo * GetCurrentStreamerInfo()
void ToLower()
Change string to lower-case.
void DestructorImpl(void *p, Bool_t dtorOnly)
Internal part of the destructor.
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 #...
virtual void Clear(const char *opt="")=0
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...
Cache the value in memory than is not part of the object but is accessible via a SchemaRule.
static const char * GetElementCounterStart(const char *dmTitle)
Given a comment/title declaring an array counter, for example: //[fArraySize] array of size fArraySiz...
Int_t fNdata
!number of optimized elements
bool IsSTLBitset(const char *type)
Return true is the name is std::bitset<number> or bitset<number>
virtual void SetArrayDim(Int_t dim)
Set number of array dimensions.
ULong_t * fVirtualInfoLoc
![fNVirtualInfoLoc] Location of the pointer to the TStreamerInfo inside the object (when emulated) ...
TString & Prepend(const char *cs)
Abstract base class for accessing the data-members of a class.
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
TObject * At(Int_t idx) const
Int_t GetArrayDim() const
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...
virtual EDataType GetType() const =0
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE)=0
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...
void GetSequenceType(TString &type) const
Fill type with the string representation of sequence information including 'cached','repeat','write' or 'nodelete'.
virtual void SetMaxIndex(Int_t dim, Int_t max)
set maximum index for array with dimension dim
virtual void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)=0
void Destructor(void *p, Bool_t dtorOnly=kFALSE)
Emulated destructor for this class.
static Proxy_t * GenExplicitProxy(const ::ROOT::TCollectionProxyInfo &info, TClass *cl)
Generate proxy from static functions.
void DeleteArray(void *p, Bool_t dtorOnly=kFALSE)
Destroy an array of emulated objects, with optional delete.
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 < ...
TCompInfo ** fCompFull
![fElements->GetEntries()]
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TClass * GetClass() const
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
if object in a list can be deleted
void ComputeSize()
Compute total size of all persistent elements of the class.
virtual void Init(TVirtualStreamerInfo *obj=0)
Setup the element.
TStreamerInfoActions::TActionSequence * fReadMemberWise
! List of read action resulting from the compilation for use in member wise streaming.
Int_t fSize
!size of the persistent class
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=0
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
virtual Int_t GetClassVersion() const =0
virtual TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)
Generate emulated collection proxy for a given class.
friend class TClonesArray
#define READ_ARRAY(TYPE_t)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
The TNamed class is the base class for all named ROOT classes.
virtual TVirtualCollectionProxy * GenExplicitProxy(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)
Generate proxy from static functions.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual Int_t GetVersionOwner() const =0
std::string GetNameForIO(const std::string &templateInstanceName, TClassEdit::EModType mode=TClassEdit::kNone, bool *hasChanged=nullptr)
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...
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
Int_t GetDelta()
Get offset from "this" to part of base class.
#define DeleteBasicPointer(addr, element, name)
void Clear()
Clear string without changing its capacity.
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
const char * GetCountClass() const
virtual void SetNewClass(TClass *cl)
Int_t fNfulldata
!number of elements
TString & Append(const char *cs)
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE) const
Long_t GetThisOffset() const
TStreamerInfoActions::TActionSequence * fReadObjectWise
! List of read action resulting from the compilation.
TDataType * GetDataType() const
virtual TClassStreamer * GenExplicitClassStreamer(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)
Generate class streamer from static functions.
bool IsStdArray(std::string_view 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 R__WriteMoveConstructorBody(FILE *file, const TString &protoname, TIter &next)
Write down the body of the 'move' constructor.
void SetCountClass(const char *clname)
void RegisterStreamerInfo(TVirtualStreamerInfo *info)
Register the StreamerInfo in the given slot, change the State of the TClass as appropriate.
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
TVirtualStreamerInfo * GetBaseStreamerInfo() const
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...
const TObjArray * GetStreamerInfos() const
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
void GenerateDeclaration(FILE *fp, FILE *sfp, const TList *subClasses, Bool_t top=kTRUE)
Write the Declaration of class.
std::string GetLong64_Name(const char *original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'.
static void AddInclude(FILE *fp, const char *header, Bool_t system, char *inclist)
Add an include statement, if it has not already been added.
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class ...
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...
static T GetTypedValueAux(Int_t type, void *ladd, int k, Int_t len)
Get the value from inside a collection.
virtual void SetStreamer(TMemberStreamer *streamer)
set pointer to Streamer function for this element
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
void InsertArtificialElements(std::vector< const ROOT::TSchemaRule *> &rules)
Insert new members as expressed in the array of TSchemaRule(s).
Int_t GetType(Int_t id) const
static void R__WriteDestructorBody(FILE *file, TIter &next)
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class ...
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Bool_t IsCompiled() const
TClass * fClass
!pointer to class
void SetErrorMessage(const char *msg)
Int_t GetLast() const
Return index of last object in array.
static void R__TObjArray_InsertAt(TObjArray *arr, TObject *obj, Int_t at)
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
TObjArray * fElements
Array of TStreamerElements.
virtual const char * GetInclude() const
UInt_t GenerateIncludes(FILE *fp, char *inclist, const TList *extrainfos)
Add to the header file, the #include need for this class.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
TStreamerInfoActions::TActionSequence * fWriteText
! List of text write action resulting for the compilation, used for JSON.
TClass * GetClass() const
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
R__EXTERN TSystem * gSystem
void BuildOld()
rebuild the TStreamerInfo structure
void Clear(Option_t *)
If opt contains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (usef...
UInt_t GetCheckSum() const
Basic data type descriptor (datatype information is obtained from CINT).
void SetCountClass(const char *clname)
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 fOnFileClassVersion
!Class version identifier as stored on file.
virtual Bool_t HasPointers() const =0
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
TDataMember * GetDataMember() const
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
void IgnoreTObjectStreamer(Bool_t ignore=kTRUE)
When the class kIgnoreTObjectStreamer bit is set, the automatically generated Streamer will not call ...
const TMatches FindRules(const TString &source) const
Return all the rules that are about the given 'source' class.
TMemberStreamer * GetStreamer() const
Return the associate streamer object.
Int_t GetMaxIndex(Int_t i) const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual Bool_t BuildFor(const TClass *cl)
Check if we can build this for foreign class - do we have some rules to do that.
Int_t GetDataMemberOffset(TDataMember *dm, TMemberStreamer *&streamer) const
Compute data member offset.
TStreamerInfoActions::TActionSequence * fReadText
! List of text read action resulting from the compilation, used for JSON.
Int_t GetEntriesFast() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t Size() const
Return size of object of this class.
const TObjArray * GetTarget() const
Get the target data members of this rule (i.e. the in memory data member).
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
The TRealData class manages the effective list of all data members for a given class.
Bool_t CanIgnoreTObjectStreamer()
static void R__WriteConstructorBody(FILE *file, TIter &next)
Int_t GetArrayDim() const
Return number of array dimensions.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
static TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)
Generate emulated collection proxy for a given class.
Long_t GetOffset() const
Get offset from "this".
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace
static constexpr double ms
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
virtual void Init(TVirtualStreamerInfo *obj=0)
Initliaze the element.
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...
Each class (see TClass) has a linked list of its base class(es).
TCompInfo * fComp
![fNslots with less than fElements->GetEntries()*1.5 used] Compiled info
TStreamerInfoActions::TActionSequence * fWriteMemberWise
! List of write action resulting from the compilation for use in member wise streaming.
Bool_t fIsBuilt
true if the StreamerInfo has been optimized
TStreamerElement * fElem
Not Owned.
T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE)=0
const char * GetTrueTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
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.
TString & Remove(Ssiz_t pos)
std::atomic< Bool_t > fIsCompiled
true if the StreamerInfo has been 'built' (i.e. has all the StreamerElements it should have) ...
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.
Version_t GetClassVersion() const
void Build()
Build the I/O data structure for the current class version.
TObject * UncheckedAt(Int_t i) const
Int_t GetSize() const
Return total size of all persistent elements of the class (with offsets).
virtual TObjArray * GetElements() const =0
Int_t fNslots
!total numbrer of slots in fComp.
TStreamerInfoActions::TActionSequence * fReadMemberWiseVecPtr
! List of read action resulting from the compilation for use in member wise streaming.
virtual Bool_t IsaPointer() const
TStreamerInfoActions::TActionSequence * fWriteObjectWise
! List of write action resulting from the compilation.
void RemoveStreamerInfo(Int_t slot)
Remove and delete the StreamerInfo in the given slot.
Long_t GetDataMemberOffset(const char *membername) const
return offset for member name.
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
unsigned long long ULong64_t
virtual Int_t GetSize() const
Returns size of this element in bytes.
void SetNewBaseClass(TClass *cl)
TList * GetListOfRealData() const
Bool_t HasDataMemberInfo() const
const char * GetParent() const
virtual Bool_t HasCounter() const
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
virtual void SetType(Int_t dtype)
Int_t fNVirtualInfoLoc
! Number of virtual info location to update.
virtual void * At(UInt_t idx)=0
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr double s
const char * AsString() const
Return the date & time as a string (ctime() format).
#define R__LOCKGUARD(mutex)
void InspectMember(const T &obj, const char *name, Bool_t isTransient)
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.
void Compile()
loop on the TStreamerElement list regroup members with same type Store predigested information into l...
Bool_t IsPersistent() const
void TagFile(TFile *fFile)
Mark the classindex of the current file as using this TStreamerInfo.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
const TList * GetStreamerInfoCache()
Returns the cached list of StreamerInfos used in this file.
Mother of all ROOT objects.
TObjArray * GetElements() const
void ls(Option_t *option="") const
List the TStreamerElement list and also the precomputed tables if option contains the string "incOrig...
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr)
Int_t IsSTLContainer()
The return type is defined in TDictionary (kVector, kList, etc.)
virtual UInt_t Size() const =0
TClassRef is used to implement a permanent reference to a TClass object.
Int_t GetClassVersion() const
static TString UpdateAssociativeToVector(const char *name)
If we have a map, multimap, set or multiset, plus unordered partners, and the key is a class...
virtual const char * GetTitle() const
Returns title of object.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Int_t GetOnFileClassVersion() const
An array of clone (identical) objects.
Int_t fNumber
!Unique identifier
void BuildCheck(TFile *file=0)
Check if built and consistent with the class dictionary.
virtual ~TStreamerInfo()
TStreamerInfo dtor.
const char * GetTypeName() const
Int_t GetNewType(Int_t id) const
virtual void ClassEnd(const TClass *)=0
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
TClass * GetNewClass() const
Int_t Size() const
Get size of basic typedef'ed type.
Bool_t IsVersioned() const
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
virtual void SetNewType(Int_t dtype)
static TStreamerBasicType * GetElementCounter(const char *countName, TClass *cl)
Get pointer to a TStreamerBasicType in TClass *cl static function.
Int_t GetEntries() const
Return the number of objects in array (i.e.
bool IsUniquePtr(std::string_view name)
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.
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...
TCompInfo ** fCompOpt
![fNdata]
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
const Bool_t kIterBackward
virtual void Compress()
Remove empty slots from array.
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Abstract Interface class describing Streamer information for one class.
virtual const char * GetName() const
Returns name of object.
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...
TClass * GetClass() const
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Bool_t IsaPointer() const
Return true if data member is a pointer.
bool GetStdArrayProperties(const char *typeName, std::string &typeNameBuf, std::array< int, 5 > &maxIndices, int &ndim)
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.
void CopyCollectionProxy(const TVirtualCollectionProxy &)
Copy the argument.
void SetReadRawFunc(ROOT::TSchemaRule::ReadRawFuncPtr_t val)
TRealData * GetRealData(const char *name) const
Return pointer to TRealData element with name "name".
TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
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.
std::atomic< ULong_t > fLiveCount
! Number of outstanding pointer to this StreamerInfo.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
static TClassStreamer * GenExplicitClassStreamer(const ::ROOT::TCollectionProxyInfo &info, TClass *cl)
Generate class streamer from static functions.
TStreamerInfo()
Default ctor.
virtual const char * GetTitle() const
Returns title of object.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
TClass * GetClass() const
static void R__TObjArray_InsertAfter(TObjArray *arr, TObject *newobj, TObject *oldobj)
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
const char * Data() const
Array of chars or bytes (8 bits per element).
EReadWrite
Status bits See TVirtualStreamerInfo::EStatusBits for the values.