41 #include "TClassEdit.h" 88 Int_t last = arr->GetLast();
89 arr->AddAtAndExpand(arr->At(last),last+1);
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;
166 fWriteObjectWise = 0;
167 fWriteMemberWise = 0;
168 fWriteMemberWiseVecPtr = 0;
231 struct TPreventRecursiveBuildGuard {
232 TPreventRecursiveBuildGuard(
TStreamerInfo* info): fInfo(info) {
236 ~TPreventRecursiveBuildGuard() {
267 TPreventRecursiveBuildGuard buildGuard(
this);
293 ROOT::TSchemaRuleSet::TMatches rules;
309 Int_t offset = base->GetDelta();
314 Error(
"Build()",
"Cannot stream virtual base %s of class %s",
318 const char* bname = base->GetName();
319 const char* btitle = base->GetTitle();
321 if (!strcmp(bname,
"string")) {
323 }
else if (base->IsSTLContainer()) {
329 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);
343 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
359 if (!clm->
IsLoaded() && !(isCollection || isString)) {
362 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
377 std::string typeNameBuf;
378 std::string trueTypeNameBuf;
396 const char* dmName = dm->
GetName();
397 const char* dmTitle = dm->
GetTitle();
403 std::array<Int_t, 5> maxIndices;
410 if (TClassEdit::IsUniquePtr(dmFull)) {
413 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
414 dmFull = trueTypeNameBuf.c_str();
415 dmType = typeNameBuf.c_str();
417 if ((isStdArray = TClassEdit::IsStdArray(dmType))){
418 TClassEdit::GetStdArrayProperties(dmType,
422 trueTypeNameBuf = typeNameBuf;
423 while(typeNameBuf.back() ==
'*') typeNameBuf.pop_back();
424 dmFull = dmType = typeNameBuf.c_str();
425 dt =
gROOT->GetType(dmType);
438 const char* rbracket = ::strchr(dmTitle,
']');
439 if (lbracket && rbracket) {
443 Error(
"Build",
"%s, discarding: %s %s, illegal %s\n",
GetName(), dmFull, dmName, dmTitle);
449 if (!dtCounter || !isInteger) {
450 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] (must be Int_t)\n",
GetName(), dmFull, dmName, counterName);
458 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] must be placed before \n",
GetName(), dmFull, dmName, counterName);
468 if (!dmCounter && (strstr(dmFull,
"char*") || strstr(dmFull,
"Char_t*"))) {
470 dsize =
sizeof(
char*);
473 Error(
"Build",
"%s, unknown type: %s %s",
GetName(), dmFull, dmName);
475 }
else if (dmIsPtr && (dtype !=
kCharStar)) {
480 if ((
fName ==
"TString") || (
fName ==
"TClass")) {
483 Error(
"Build",
"%s, discarding: %s %s, no [dimension]\n",
GetName(), dmFull, dmName);
497 static const char* full_string_name =
"basic_string<char,char_traits<char>,allocator<char> >";
498 if (!strcmp(dmType,
"string") || !strcmp(dmType,
"std::string") || !strcmp(dmType, full_string_name)) {
502 if (proxy) element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, *proxy, dmIsPtr);
503 else element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, dmFull, dmIsPtr);
504 if (((
TStreamerSTL*)element)->GetSTLtype() != ROOT::kSTLvector) {
505 auto printErrorMsg = [&](
const char* category)
507 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);
511 printErrorMsg(
"compiled");
517 printErrorMsg(
"interpreted");
526 Error(
"Build",
"%s, unknown type: %s %s\n",
GetName(), dmFull, dmName);
544 Error(
"Build",
"%s: %s has no streamer or dictionary, data member %s will not be saved",
GetName(), dmFull, dmName);
555 Warning(
"Build",
"%s: %s has no streamer or dictionary, data member \"%s\" will not be saved",
GetName(), dmFull, dmName);
567 for (
Int_t i = 0; i < ndim; ++i) {
569 if (isStdArray) maxIndex = maxIndices[i];
589 if ( !wasCompiled && (rules && rules.HasRuleWithSource( element->
GetName(),
kTRUE )) ) {
590 needAllocClass =
kTRUE;
599 && rules && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) )
627 if (needAllocClass) {
697 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
699 if (element->
GetTitle()[0] ==
'<') {
704 if (content[c] ==
'<') ++level;
705 else if (content[c] ==
'>') --level;
716 "Update the collection proxy of the class \"%s\" \n" 717 "\tto be similar to \"%s\".",
722 The class %s had a collection proxy when written but it is not an STL\n \ 723 collection and we did not record the type of the content of the collection.\n \ 724 We will claim the content is a bool (i.e. no data will be read).",
748 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
GetName());
755 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
757 if (element->
GetTitle()[0] ==
'<') {
762 if (content[c] ==
'<') ++level;
763 else if (content[c] ==
'>') --level;
774 "Update the collection proxy of the class \"%s\" \n" 775 "\tto be similar to \"%s\".",
780 The class %s had a collection proxy when written but it is not an STL\n \ 781 collection and we did not record the type of the content of the collection.\n \ 782 We will claim the content is a bool (i.e. no data will be read).",
804 searchOnChecksum =
kFALSE;
810 searchOnChecksum =
kTRUE;
817 searchOnChecksum =
kFALSE;
823 searchOnChecksum =
kTRUE;
833 searchOnChecksum =
kFALSE;
839 searchOnChecksum =
kTRUE;
850 if (!searchOnChecksum) {
856 for (
Int_t i = -1; i < ninfos; ++i) {
873 while ((slot < ninfos) && (array->
UncheckedAt(slot) != 0)) {
919 #ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES 980 for (
Int_t i = 0; i < nel; ++i) {
998 if (oldIsNonVersioned) {
1001 The class %s transitioned from not having a specified class version\n\ 1002 to having a specified class version (the current class version is %d).\n\ 1003 However too many different non-versioned layouts of the class have been\n\ 1004 loaded so far. This prevent the proper reading of objects written with\n\ 1005 the class layout version %d, in particular from the file:\n\ 1007 To work around this issue, load fewer 'old' files in the same ROOT session.",
1011 The class %s transitioned from not having a specified class version\n\ 1012 to having a specified class version (the current class version is %d).\n\ 1013 However too many different non-versioned layouts of the class have been\n\ 1014 loaded so far. This prevent the proper reading of objects written with\n\ 1015 the class layout version %d.\n\ 1016 To work around this issue, load fewer 'old' files in the same ROOT session.",
1023 The StreamerInfo for version %d of class %s read from the file %s\n\ 1024 has a different checksum than the previously loaded StreamerInfo.\n\ 1025 Reading objects of type %s from the file %s \n\ 1026 (and potentially other files) might not work correctly.\n\ 1027 Most likely the version number of the class was not properly\n\ 1028 updated [See ClassDef(%s,%d)].",
1032 The StreamerInfo from %s does not match existing one (%s:%d)\n\ 1033 The existing one has not been used yet and will be discarded.\n\ 1034 Reading the file %s will work properly, however writing object of\n\ 1035 type %s will not work properly. Most likely the version number\n\ 1036 of the class was not properly updated [See ClassDef(%s,%d)].",
1042 The StreamerInfo for version %d of class %s\n\ 1043 has a different checksum than the previously loaded StreamerInfo.\n\ 1044 Reading objects of type %s\n\ 1045 (and potentially other files) might not work correctly.\n\ 1046 Most likely the version number of the class was not properly\n\ 1047 updated [See ClassDef(%s,%d)].",
1051 The StreamerInfo from %s does not match existing one (%s:%d)\n\ 1052 The existing one has not been used yet and will be discarded.\n\ 1053 Reading should work properly, however writing object of\n\ 1054 type %s will not work properly. Most likely the version number\n\ 1055 of the class was not properly updated [See ClassDef(%s,%d)].",
1087 #ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES 1108 #endif // TEST_FOR_BACKWARD_COMPATIBILITY 1115 if (bc->GetClassPointer()->GetCollectionType()) {
1123 The StreamerInfo of class %s read from file %s\n\ 1124 has the same version (=%d) as the active class but a different checksum.\n\ 1125 You should update the version to ClassDef(%s,%d).\n\ 1126 Do not try to write objects with the current class definition,\n\ 1130 The StreamerInfo of class %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\ 1141 Fatal(
"BuildCheck",
"\n\ 1142 The StreamerInfo of unversioned class %s \n\ 1143 has the same version (=%d) as the active class but an old checksum.\n\ 1206 if (!element)
break;
1213 if (ty <=
kULong)
continue;
1217 {
for (
int j=ndata-1;j>=i;j--) {elements->
AddAtAndExpand(elements->
At(j),j+1);}}
1218 elements->
AddAt(bt,i);
1240 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() );
1258 if (oldClass == 0 || newClass == 0)
return kFALSE;
1263 const char *oldname = oldClass->
GetName();
1264 for (
UInt_t i = oldlen, done =
false, nest = 0; (i>0) && !done ; --i) {
1265 switch (oldClass->
GetName()[i-1]) {
1266 case '>' : ++nest;
break;
1267 case '<' :
if (nest==0)
return kFALSE;
1269 case ':' :
if (nest == 0) oldname= &(oldClass->
GetName()[i]); done =
kTRUE;
break;
1272 oldlen = strlen(oldname);
1273 if (!(strlen(newClass->
GetName()) > strlen(oldClass->
GetName()))) {
1277 const char* newEnd = & (newClass->
GetName()[newlen-oldlen]);
1279 if (0 != strcmp(newEnd, oldname)) {
1307 Error(
"ImportStreamerInfo",
"Unable to clone the StreamerInfo for %s.",(*next)->GetName());
1309 info->SetClass(newClass);
1310 Int_t oldv = info->GetClassVersion();
1353 if (oldContent == newContent) {
1354 contentMatch =
kTRUE;
1355 }
else if (newContent) {
1358 if (oldFlatContent == newFlatContent) {
1359 contentMatch =
kTRUE;
1365 contentMatch = (newContent==0);
1369 if ((oldContent==0 && oldProxy->
GetType() == newProxy->
GetType())
1446 TClass *FindAlternate(
TClass *context,
const std::string &i_name, std::string& newName)
1452 std::string
name(i_name);
1454 if (name.compare(0,6,
"const ")==0) {
1460 while(name[name.length()-nstars-1]==
'*') {
1465 name.erase(name.length()-nstars,nstars);
1468 std::string alternate(context->
GetName());
1469 alternate.append(
"::");
1470 alternate.append(name);
1474 newName.append(altcl->
GetName());
1475 newName.append(suffix);
1479 size_t ctxt_cursor = strlen(context->
GetName());
1480 for (
size_t level = 0; ctxt_cursor != 0; --ctxt_cursor) {
1481 switch (context->
GetName()[ctxt_cursor]) {
1482 case '<': --level;
break;
1483 case '>': ++level;
break;
1484 case ':':
if (level == 0) {
1488 alternate.append(context->
GetName(),ctxt_cursor+1);
1489 alternate.append(name);
1492 newName.append(altcl->
GetName());
1493 newName.append(suffix);
1511 if (stlkind == ROOT::kSTLmap || stlkind == ROOT::kSTLmultimap) {
1528 info = old->GetValueClass()->GetStreamerInfo();
1539 if ((firstNewCl && !firstOldCl) || (secondNewCl && !secondOldCl))
1541 std::vector<std::string> inside;
1543 TClassEdit::GetSplit( oldClass->
GetName(), inside, nestedLoc, TClassEdit::kLong64 );
1545 TClass *firstAltCl = firstOldCl;
1546 TClass *secondAltCl = secondOldCl;
1547 std::string firstNewName;
1548 std::string secondNewName;
1549 if (firstNewCl && !firstOldCl) {
1550 firstAltCl = FindAlternate(context, inside[1], firstNewName);
1552 if (secondNewCl && !secondOldCl) {
1553 secondAltCl = FindAlternate(context, inside[2], secondNewName);
1555 if ((firstNewCl && firstAltCl != firstOldCl) ||
1556 (secondNewCl && secondAltCl != secondOldCl) ) {
1559 std::string alternate = inside[0];
1560 alternate.append(
"<");
1561 alternate.append(firstAltCl ? firstNewName : inside[1]);
1562 alternate.append(
",");
1563 alternate.append(secondAltCl? secondNewName : inside[2]);
1567 if (alternate[alternate.length()-1]==
'>') {
1568 alternate.append(
" ");
1570 alternate.append(
">");
1575 }
else if (current->
GetValueClass() && !old->GetValueClass()
1576 && old->GetType() ==
kInt_t) {
1583 std::vector<std::string> inside;
1585 TClassEdit::GetSplit( oldClass->
GetName(), inside, nestedLoc, TClassEdit::kLong64 );
1588 std::string newName;
1589 TClass *altcl = FindAlternate(context, inside[1], newName);
1592 std::string alternate = inside[0];
1593 alternate.append(
"<");
1594 alternate.append(newName);
1598 if (alternate[alternate.length()-1]==
'>') {
1599 alternate.append(
" ");
1601 alternate.append(
">");
1609 struct TBuildOldGuard {
1635 TBuildOldGuard buildOldGuard(
this);
1638 printf(
"\n====>Rebuilding TStreamerInfo for class: %s, version: %d\n",
GetName(),
fClassVersion);
1682 constexpr
size_t kSizeOfPtr =
sizeof(
void*);
1709 ROOT::TSchemaRuleSet::TMatches rules;
1715 Int_t virtualInfoLocAlloc = 0;
1740 #if defined(PROPER_IMPLEMEMANTION_OF_BASE_CLASS_RENAMING) 1761 Error(
"BuildOld",
"Could not find base class: %s for %s and could not find any matching rename rule\n", base->
GetName(),
GetName());
1771 Error(
"BuildOld",
"Could not find base class: %s for %s, renaming rule was found but is malformed\n", base->
GetName(),
GetName());
1781 else if( !baseclass ) {
1784 Warning(
"BuildOld",
"Missing base class: %s skipped", base->
GetName());
1786 baseclass =
new TClass(element->
GetName(), 1, 0, 0, -1, -1);
1787 element->
Update(0, baseclass);
1797 if (baseOffset < 0) {
1809 if (!baserule.empty()) {
1820 element->
Init(
this);
1832 if (infobase) baseclass = infobase->
GetClass();
1838 if (infobase && infobase->
fComp == 0) {
1860 if (baseOffset < 0) {
1865 offset += baseclass->
Size();
1872 Int_t baseOffset = -1;
1880 if (strchr(bc->
GetName(),
'<') || !strcmp(bc->
GetName(),
"string")) {
1881 TString bcName(TClassEdit::ShortType(bc->
GetName(), TClassEdit::kDropStlDefault).c_str());
1882 TString elName(TClassEdit::ShortType(element->
GetTypeName(), TClassEdit::kDropStlDefault).c_str());
1883 if (bcName == elName) {
1898 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());
1911 if (newInfo ==
this) {
1912 baseOffset = offset;
1914 }
else if (newInfo) {
1918 const char *newElName = newElement->
GetName();
1919 if (newElement->IsBase() && (strchr(newElName,
'<') || !strcmp(newElName,
"string")) ) {
1920 TString bcName(TClassEdit::ShortType(newElName, TClassEdit::kDropStlDefault).c_str());
1921 TString elName(TClassEdit::ShortType(element->
GetTypeName(), TClassEdit::kDropStlDefault).c_str());
1922 if (bcName == elName) {
1928 Error(
"BuildOld",
"Could not find STL base class: %s for %s\n", element->
GetName(),
GetName());
1931 baseOffset = newElement->GetOffset();
1932 asize = newElement->GetSize();
1935 if (baseOffset == -1) {
1946 if (baseOffset < 0) {
1952 element->
Init(
this);
1967 std::string typeNameBuf;
1968 const char* dmType =
nullptr;
1970 Bool_t isUniquePtr =
false;
1973 std::array<Int_t, 5> maxIndices;
1984 element->
Init(
this);
1998 element->
Init(
this);
2006 isUniquePtr = dmIsPtr = TClassEdit::IsUniquePtr(dmType);
2007 dmType = typeNameBuf.c_str();
2009 if ((isStdArray = TClassEdit::IsStdArray(dmType))){
2010 TClassEdit::GetStdArrayProperties(dmType,
2014 dmType = typeNameBuf.c_str();
2015 dt =
gROOT->GetType(dmType);
2020 TString dmClassName = TClassEdit::ShortType(dmType,TClassEdit::kDropStlDefault).c_str();
2022 if (dmClassName.
Index(
"const ")==0) dmClassName.
Remove(0,6);
2027 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());
2044 element->
Init(
this);
2063 auto theType = isStdArray ? dt : dm->
GetDataType();
2075 if ((newType == ::
kChar_t) && dmIsPtr && !isArray && !hasCount) {
2077 }
else if (dmIsPtr) {
2079 }
else if (isArray) {
2083 if (newType == -1) {
2090 if (newInfo && (newInfo !=
this)) {
2093 if (newClass == 0) {
2094 newType = newElems ? newElems->
GetType() : -1;
2118 }
else if (element->
GetType() != newType) {
2131 if (oldClass == newClass.
GetClass()) {
2133 }
else if (ClassWasMovedToNamespace(oldClass, newClass.
GetClass())) {
2135 if (0 != (oldv = ImportStreamerInfo(oldClass, newClass.
GetClass()))) {
2136 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);
2144 if (ContainerMatchTClonesArray(newClass.
GetClass())) {
2167 TClass *oldFixedClass = FixCollectionV5(
GetClass(),oldClass,newClass);
2168 if (oldFixedClass && oldFixedClass != oldClass) {
2169 element->
Update(oldClass,oldFixedClass);
2170 oldClass = oldFixedClass;
2173 if (CollectionMatch(oldClass, newClass)) {
2177 if ( (oldkind==ROOT::kSTLmap || oldkind==ROOT::kSTLmultimap) &&
2178 (newkind!=ROOT::kSTLmap && newkind!=ROOT::kSTLmultimap) ) {
2188 switch( element->
GetType() ) {
2204 }
else if ( (newkind==ROOT::kSTLmap || newkind==ROOT::kSTLmultimap) &&
2205 (oldkind!=ROOT::kSTLmap && oldkind!=ROOT::kSTLmultimap) ) {
2214 }
else if (CollectionMatchFloat16(oldClass,newClass)) {
2216 }
else if (CollectionMatchDouble32(oldClass,newClass)) {
2218 }
else if (CollectionMatchLong64(oldClass,newClass)) {
2221 }
else if (CollectionMatchULong64(oldClass,newClass)) {
2234 }
else if(oldClass &&
2251 if (isUniquePtr || strncmp(dm->
GetTitle(),
"->",2)==0) {
2284 if ((!dmIsPtr || newType==
kSTLp) && (isStdArray ? ndim : dm->
GetArrayDim()) > 0) {
2289 if (newInfo && (newInfo !=
this)) {
2292 newType = newElems->
GetType();
2323 if (newType != -1) {
2331 cannotConvert =
kTRUE;
2335 printf(
"%s We have no clue\n", dm->
GetName());
2336 cannotConvert =
kTRUE;
2339 if (newType != -1) {
2343 cannotConvert =
kTRUE;
2347 cannotConvert =
kTRUE;
2351 if (cannotConvert) {
2374 strcmp(element->
GetName(),
"This") == 0 &&
2380 asize =
sizeof(std::vector<int>);
2386 if ((offset % kSizeOfPtr) != 0) {
2387 offset = offset - (offset % kSizeOfPtr) + kSizeOfPtr;
2393 if (!wasCompiled && rules) {
2394 if (rules.HasRuleWithSource( element->
GetName(),
kTRUE ) ) {
2396 if (allocClass == 0) {
2404 allocClass = infoalloc->
GetClass();
2410 && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2433 }
else if (rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2445 }
else if (rules && rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2481 for (iel = 0; iel < narr; ++iel) {
2484 tai[kel++] = element;
2486 arr[jel++] = element;
2489 for (kel = 0; jel < narr;) {
2490 arr[jel++] = tai[kel++];
2497 if (!wasCompiled && allocClass) {
2552 TMemberInfo(
TClass *parent) : fParent(parent) {};
2554 void SetDataType(
Int_t datatype) {
2555 fDataType = datatype;
2561 void SetClassName(
const char *name) {
2562 fClassName = TClassEdit::ResolveTypedef(TClassEdit::ShortType( name, TClassEdit::kDropStlDefault | TClassEdit::kDropStd ).c_str(),
kTRUE);
2564 void SetComment(
const char *title) {
2565 const char *left = strstr(title,
"[");
2567 const char *right = strstr(left,
"]");
2570 fComment.
Append(left,right-left);
2588 if (fName != other.fName)
return kTRUE;
2591 if (fDataType != other.fDataType) {
2592 if ( (fDataType == 4 && other.fDataType == 16)
2593 || (fDataType == 16 && other.fDataType == 4) ) {
2595 }
else if ( (fDataType == 14 && other.fDataType == 17)
2596 || (fDataType == 17 && other.fDataType == 14) ) {
2598 }
else if ( (fDataType == 3 && other.fDataType == 6)
2599 ||(fDataType == 6 && other.fDataType == 3) ){
2608 }
else if (fClassName != other.fClassName) {
2609 if ( (fClassName ==
"long" && (other.fClassName ==
"long long" || other.fClassName ==
"Long64_t"))
2610 || ( (fClassName ==
"long long" || fClassName ==
"Long64_t") && other.fClassName ==
"long") ) {
2612 }
else if ( (fClassName ==
"unsigned long" && (other.fClassName ==
"unsigned long long" || other.fClassName ==
"ULong64_t"))
2613 || ( (fClassName ==
"unsigned long long" || fClassName ==
"ULong64_t") && other.fClassName ==
"unsigned long") ) {
2615 }
else if (TClassEdit::IsSTLCont(fClassName)) {
2616 TString name = TClassEdit::ShortType( fClassName, TClassEdit::kDropStlDefault );
2617 TString othername = TClassEdit::ShortType( other.fClassName, TClassEdit::kDropStlDefault );
2618 if (name != othername) {
2621 if (!CollectionMatch(cl,otherCl)) {
2622 TClass *oldFixedClass = FixCollectionV5(fParent,cl,otherCl);
2623 if (!oldFixedClass || !CollectionMatch(oldFixedClass,otherCl)) {
2632 return fComment != other.fComment;
2654 char* eaddr = ((
char*)obj) + element->
GetOffset();
2673 if (ecl && (
fClass!=ecl )) {
2692 char* eaddr = ((
char*)obj) + element->
GetOffset();
2709 if (newname && newname[0] &&
fName != newname) {
2743 R__ASSERT( (cl==0 || info==0) && (cl!=0 || info!=0) );
2776 if (el && el->
IsBase()) {
2791 if (infoel && infoel->
IsBase()) {
2792 otherClass = infoel->
GetName();
2798 if (TClassEdit::IsSTLCont(localClass)) {
2799 localClass = TClassEdit::ShortType( localClass, TClassEdit::kDropStlDefault );
2800 otherClass = TClassEdit::ShortType( otherClass, TClassEdit::kDropStlDefault );
2803 if (localClass != otherClass) {
2807 "The in-memory layout version %d for class '%s' has a base class (%s) that the on-file layout version %d does not have.",
2809 }
else if (otherClass.
Length()==0) {
2811 "The on-file layout version %d for class '%s' has a base class (%s) that the in-memory layout version %d does not have",
2815 "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'",
2819 if (!complete)
return kFALSE;
2820 result = result &&
kFALSE;
2824 if (!localBase)
continue;
2827 if (!otherBaseClass)
continue;
2830 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2831 " has the same version (=%d) as the active class but a different checksum.\n" 2832 " You should update the version to ClassDef(%s,%d).\n" 2833 " The objects on this file might not be readable because:\n" 2834 " 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).",
2843 if (!localBaseInfo) {
2850 if (!localBaseInfo) {
2852 msg.
Form(
" The StreamerInfo of the base class %s (of class %s) read from %s%s\n" 2853 " refers to a checksum (%x) that can not be found neither in memory nor in the file.\n",
2855 file ?
"file " :
"", file ? file->
GetName() :
"",
2867 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2868 " has the same version (=%d) as the active class but a different checksum.\n" 2869 " You should update the version to ClassDef(%s,%d).\n" 2870 " The objects on this file might not be readable because:\n" 2871 " 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).",
2881 if (!localBase || !otherBase)
continue;
2887 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2888 " has the same version (=%d) as the active class but a different checksum.\n" 2889 " You should update the version to ClassDef(%s,%d).\n" 2890 " The objects on this file might not be readable because:\n" 2891 " 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).",
2901 if (localBaseInfo == otherBaseInfo ||
2907 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n" 2908 " has the same version (=%d) as the active class but a different checksum.\n" 2909 " You should update the version to ClassDef(%s,%d).\n" 2910 " The objects on this file might not be readable because:\n" 2911 " 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).",
2919 if (!result && !complete) {
2928 TMemberInfo other(cl ? cl : info->
GetClass());
2939 local.SetName( el->
GetName() );
2941 local.SetComment( el->
GetTitle() );
2942 local.SetDataType( el->
GetType() );
2950 other.SetName( tdm->
GetName() );
2952 other.SetComment( tdm->
GetTitle() );
2979 other.SetName( infoel->
GetName() );
2981 other.SetComment( infoel->
GetTitle() );
2982 other.SetDataType( infoel->
GetType() );
2991 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" 2994 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
2996 }
else if (other.fName.Length()==0) {
2997 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" 3000 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data());
3002 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" 3007 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data()
3008 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
3011 result = result &&
kFALSE;
3012 if (!complete)
return result;
3036 constexpr
size_t kSizeOfPtr =
sizeof(
void*);
3037 if ((fSize % kSizeOfPtr) != 0) {
3038 fSize = fSize - (fSize % kSizeOfPtr) + kSizeOfPtr;
3074 static TClassRef string_classref(
"string");
3075 if (
fClass == string_classref) {
3134 if (allocator)
return allocator->
GetClass();
3184 for (
int i=0; i<il; i++)
id =
id*3+name[i];
3192 for (
int i=0; i<il; i++)
id =
id*3+name[i];
3202 if (el->
IsBase())
continue;
3217 for (i=0; i<il; i++)
id =
id*3+name[i];
3233 type = TClassEdit::GetLong64_Name(TClassEdit::ResolveTypedef(el->
GetTypeName(),
kTRUE));
3235 if (TClassEdit::IsSTLCont(type)) {
3236 type = TClassEdit::ShortType( type, TClassEdit::kDropStlDefault | TClassEdit::kLong64 );
3239 type.
ReplaceAll(
"ULong64_t",
"unsigned long long");
3244 if (type==
"signed char") type =
"char";
3248 for (i=0; i<il; i++)
id =
id*3+type[i];
3263 const char *right = strstr(left,
"]");
3266 while (left != right) {
3289 fprintf(file,
" %s = 0;\n",element->
GetName());
3291 fprintf(file,
" memset(%s,0,%d);\n",element->
GetName(),element->
GetSize());
3295 fprintf(file,
" %s = 0;\n",element->
GetName());
3310 if (atstart) { fprintf(file,
" : "); atstart =
kFALSE; }
3311 else fprintf(file,
" , ");
3312 fprintf(file,
"%s(const_cast<%s &>( rhs ))\n", element->
GetName(),protoname.
Data());
3315 if (atstart) { fprintf(file,
" : "); atstart =
kFALSE; }
3316 else fprintf(file,
" , ");
3317 fprintf(file,
"%s(const_cast<%s &>( rhs ).%s)\n",element->
GetName(),protoname.
Data(),element->
GetName());
3321 fprintf(file,
"{\n");
3322 fprintf(file,
" // This is NOT a copy constructor. This is actually a move constructor (for stl container's sake).\n");
3323 fprintf(file,
" // Use at your own risk!\n");
3324 fprintf(file,
" (void)rhs; // avoid warning about unused parameter\n");
3332 if (!defMod) { fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3333 const char *ename = element->
GetName();
3334 const char *colon2 = strstr(ename,
"::");
3335 if (colon2) ename = colon2+2;
3337 fprintf(file,
" modrhs.%s = 0;\n",ename);
3339 fprintf(file,
" memset(modrhs.%s,0,%d);\n",ename,element->
GetSize());
3342 const char *ename = element->
GetName();
3345 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3347 fprintf(file,
" modrhs.%s = 0;\n",ename);
3350 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3352 fprintf(file,
" modrhs.%s = 0;\n",ename);
3356 fprintf(file,
" for (Int_t i=0;i<%d;i++) %s[i] = rhs.%s[i];\n",element->
GetArrayLength(),ename,ename);
3358 fprintf(file,
" for (Int_t i=0;i<%d;i++) (&(%s",element->
GetArrayLength(),ename);
3360 fprintf(file,
"[0]");
3362 fprintf(file,
"))[i] = (&(rhs.%s",ename);
3364 fprintf(file,
"[0]");
3366 fprintf(file,
"))[i];\n");
3369 if (!defMod) { fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3370 fprintf(file,
" modrhs.%s = 0;\n",ename);
3373 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3377 std::string method_name =
"clear";
3379 method_name =
"reset";
3381 if (element->IsBase()) {
3382 fprintf(file,
" modrhs.%s();\n", method_name.c_str());
3384 fprintf(file,
" modrhs.%s.%s();\n",ename, method_name.c_str());
3402 const char *ename = element->
GetName();
3403 const char *colon2 = strstr(ename,
"::");
3404 if (colon2) ename = colon2+2;
3407 fprintf(file,
" %s = 0;\n",ename);
3409 fprintf(file,
" memset(%s,0,%d);\n",ename,element->
GetSize());
3413 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3415 fprintf(file,
" for (Int_t i=0;i<%d;i++) delete %s[i]; memset(%s,0,%d);\n",element->
GetArrayLength(),ename,ename,element->
GetSize());
3420 const char *ename = element->
GetName();
3422 fprintf(file,
" %s = 0;\n",ename);
3424 fprintf(file,
" delete [] %s; %s = 0;\n",ename,ename);
3428 const char *ename = element->
GetName();
3430 fprintf(file,
" %s = 0;\n",ename);
3432 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3434 fprintf(file,
" delete [] %s; %s = 0;\n",ename,ename);
3438 const char *ename = element->
GetName();
3439 const char *prefix =
"";
3442 }
else if ( element->
IsBase() ) {
3451 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3457 if (stltype == ROOT::kSTLmap || stltype == ROOT::kSTLmultimap) {
3459 std::vector<std::string> inside;
3461 TClassEdit::GetSplit(enamebasic, inside, nestedLoc, TClassEdit::kLong64);
3462 if (inside[1][inside[1].size()-1]==
'*' || inside[2][inside[2].size()-1]==
'*') {
3463 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3469 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3486 const char *clname =
GetName();
3488 if (strchr(clname,
':')) {
3490 Int_t len = strlen(clname);
3491 const char *
name = clname;
3494 for (
Int_t cur = 0; cur < len; ++cur) {
3495 switch (clname[cur]) {
3502 if (nest == 0) { cur = len;
continue; }
3506 if (nest == 0 && clname[cur+1] ==
':') {
3509 name = clname + cur + 2;
3516 template_protoname.
Append(clname,pr_pos);
3520 const char *where = strstr(clname,
"<");
3521 isTemplate = where != 0;
3523 template_protoname.
Append(clname,where-clname);
3527 if (needGenericTemplate && isTemplate) {
3529 fprintf(fp,
"#ifndef %s_h\n", templateName.
Data());
3530 fprintf(fp,
"#define %s_h\n", templateName.
Data());
3541 if (!element->
IsBase())
continue;
3543 const char *ename = element->
GetName();
3544 if (nbase == 1) fprintf(fp,
" : public %s",ename);
3545 else fprintf(fp,
" , public %s",ename);
3550 if (subClasses && subClasses->
GetEntries()) {
3551 Bool_t needheader =
true;
3553 TIter subnext(subClasses);
3558 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3560 fprintf(fp,
"\npublic:\n");
3561 fprintf(fp,
"// Nested classes forward declaration.\n");
3565 UInt_t sub_numberOfClasses = 0;
3566 UInt_t sub_numberOfNamespaces;
3574 for (
UInt_t i = 0;i < sub_numberOfClasses;++i) {
3575 fprintf(fp,
"}; // end of class.\n");
3577 if (sub_numberOfNamespaces > 0) {
3578 Error(
"GenerateDeclaration",
"Nested classes %s thought to be inside a namespace inside the class %s",subinfo->
GetName(),
GetName());
3585 fprintf(fp,
"\npublic:\n");
3586 fprintf(fp,
"// Nested classes declaration.\n");
3589 if (subClasses && subClasses->
GetEntries()) {
3595 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3602 fprintf(fp,
"\npublic:\n");
3603 fprintf(fp,
"// Data Members.\n");
3616 if (element->
IsBase())
continue;
3617 const char *ename = element->
GetName();
3635 case ROOT::kSTLmultimap:
3637 case ROOT::kSTLmultiset:
3638 case ROOT::kSTLunorderedset:
3639 case ROOT::kSTLunorderedmultiset:
3649 lt = enamebasic.
Length();
3653 if (lt>=ltype) ltype = lt+1;
3655 for (is = 3+lt; is < (3+ltype); ++is) line +=
' ';
3658 if (element->
IsaPointer() && !strchr(line,
'*')) line[2+ltype] =
'*';
3660 if (ld>=ldata) ldata = ld+1;
3661 for (is = 3+ltype+ld; is < (3+ltype+ldata); ++is) line +=
' ';
3665 fprintf(fp,
"%s\n",line.
Data());
3668 if (needGenericTemplate && isTemplate) {
3670 fprintf(fp,
"\n %s() {\n",protoname.Data());
3673 fprintf(fp,
" %s(const %s & rhs )\n",protoname.Data(),protoname.Data());
3676 fprintf(fp,
" virtual ~%s() {\n",protoname.Data());
3678 fprintf(fp,
" }\n\n");
3682 fprintf(fp,
"\n %s();\n",protoname.Data());
3683 fprintf(fp,
" %s(const %s & );\n",protoname.Data(),protoname.Data());
3684 fprintf(fp,
" virtual ~%s();\n\n",protoname.Data());
3688 fprintf(sfp,
"#ifndef %s_cxx\n",guard.Data());
3689 fprintf(sfp,
"#define %s_cxx\n",guard.Data());
3690 fprintf(sfp,
"%s::%s() {\n",
GetName(),protoname.Data());
3694 fprintf(sfp,
"%s::%s(const %s & rhs)\n",
GetName(),protoname.Data(),protoname.Data());
3698 fprintf(sfp,
"%s::~%s() {\n",
GetName(),protoname.Data());
3701 fprintf(sfp,
"#endif // %s_cxx\n\n",guard.Data());
3709 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.Data(),0);
3711 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.Data(),
fClassVersion + 1);
3716 for(
UInt_t i=0;i<numberOfNamespaces;++i) {
3717 fprintf(fp,
"} // namespace\n");
3720 if (needGenericTemplate && isTemplate) {
3721 fprintf(fp,
"#endif // generic template declaration\n");
3730 if (inclist[0]==0) {
3736 const char *clname =
GetName();
3737 if (strchr(clname,
'<')) {
3752 const char *ename = element->
GetName();
3753 const char *colon2 = strstr(ename,
"::");
3754 if (colon2) ename = colon2+2;
3761 if (ltype < lt) ltype = lt;
3762 if (ldata < ld) ldata = ld;
3766 incRiostream =
kTRUE;
3772 if (!include[0])
continue;
3774 Bool_t greater = (include[0]==
'<');
3777 if (strncmp(include,
"include/",8)==0) {
3780 if (strncmp(include,
"include\\",9)==0) {
3783 if (strncmp(element->
GetTypeName(),
"pair<",strlen(
"pair<"))==0) {
3785 }
else if (strncmp(element->
GetTypeName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0) {
3788 TString incName( include, strlen(include)-1 );
3809 if (strncmp(
GetName(),
"pair<",strlen(
"pair<"))==0)
return 0;
3810 if (strncmp(
GetName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0)
return 0;
3821 for(
UInt_t i=len; i>0; --i) {
3823 case '>': ++nest;
if (scope==0) { isTemplate =
kTRUE; }
break;
3824 case '<': --nest;
break;
3826 if (nest==0 &&
GetName()[i-1]==
':') {
3829 cl =
gROOT->GetClass(nsname);
3833 }
else if (cl == 0 && extrainfos != 0) {
3848 if (
gDebug) printf(
"generating code for class %s\n",
GetName());
3854 filename.
Form(
"%s/%s.h",dirname,headername.
Data());
3856 FILE *fp = fopen(filename.
Data(),
"w");
3858 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3863 FILE *allfp = fopen(filename.
Data(),
"a");
3865 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3869 fprintf(allfp,
"#include \"%s.h\"\n", headername.
Data());
3872 char *inclist =
new char[50000];
3877 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3878 fprintf(fp,
"// This class has been generated by TFile::MakeProject\n");
3879 fprintf(fp,
"// (%s by ROOT version %s)\n",td.
AsString(),
gROOT->GetVersion());
3880 fprintf(fp,
"// from the StreamerInfo in file %s\n",
gDirectory->GetFile()->GetName());
3881 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3884 fprintf(fp,
"#ifndef %s_h\n",headername.
Data());
3885 fprintf(fp,
"#define %s_h\n",headername.
Data());
3892 TIter subnext(subClasses);
3901 FILE *sfp = fopen( sourcename.
Data(),
"a" );
3905 Error(
"GenerateHeaderFile",
"Could not open %s for appending",sourcename.
Data());
3909 fprintf(fp,
"#endif\n");
3913 if (sfp) fclose(sfp);
3924 char dmbracket[256];
3938 char *rdmc = (
char*)rdm->
GetName();
3941 if (dm->
IsaPointer() && rdmc[0] ==
'*') rdmc++;
3944 if (strcmp(rdmc,dm->
GetName()) == 0) {
3956 if (strstr(rdm->
GetName(),dmbracket)) {
3970 if (elementName == 0)
return 0;
4032 Int_t base_offset = 0;
4033 Int_t local_offset = 0;
4039 if (!base_cl || !base_element) {
4042 base_offset = base_element->GetOffset();
4045 offset = base_offset + local_offset;
4060 Int_t local_offset = 0;
4069 offset = base_offset + local_offset;
4117 ::Obsolete(
"TStreamerInfo::GetStreamerElementReal",
"v5-34-20",
"v6-00-02");
4119 if (i < 0 || i >=
fNdata)
return 0;
4120 if (j < 0)
return 0;
4125 for (
Int_t ise=0;ise < nelems;ise++) {
4127 if (ise+j >= nelems)
return 0;
4136 template <
typename T>
4158 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 4180 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 4186 #define READ_ARRAY(TYPE_t) \ 4188 Int_t sub_instance, index; \ 4189 Int_t instance = k; \ 4191 index = instance / len; \ 4192 sub_instance = instance % len; \ 4197 TYPE_t **val =(TYPE_t**)(ladd); \ 4198 return T((val[sub_instance])[index]); \ 4216 #if defined(_MSC_VER) && (_MSC_VER <= 1200) 4240 template <
typename T>
4249 if (i < 0)
return 0;
4253 if (atype ==
kSTL) {
4255 if (newClass == 0) {
4267 if (j >= nc)
return 0;
4268 char *element_ptr = (
char*)proxy->
At(j);
4269 return GetTypedValueAux<T>(atype,element_ptr,0,1);
4273 return GetTypedValueAux<T>(atype,ladd,j,len);
4282 template <
typename T>
4289 if (j >= nc)
return 0;
4304 template <
typename T>
4308 if (j >= nc)
return 0;
4310 char *pointer = (
char*)cont->
At(j);
4323 template <
typename T>
4328 if (j >= nc)
return 0;
4330 char **ptr = (
char**)cont->
At(j);
4331 char *pointer = *ptr;
4342 if (rules.empty())
return;
4347 for(
auto rule : rules) {
4348 if( rule->IsRenameRule() || rule->IsAliasRule() )
4353 if ( rule->HasTarget( element->
GetName() ) ) {
4356 if ( rule->GetAttributes()[0] != 0 ) {
4357 TString attr( rule->GetAttributes() );
4359 if (attr.Contains(
"owner")) {
4360 if (attr.Contains(
"notowner")) {
4374 const TObjArray *sources = rule->GetSource();
4375 TIter input(sources);
4377 while((src = input())) {
4380 #if 0 // Don't warn about not activating the rule. If don't warn the user can 4386 rule->AsString(ruleStr);
4387 Warning(
"InsertArtificialElements",
"For class %s in StreamerInfo %d is missing the source data member %s when trying to apply the rule:\n %s",
4395 if (!rule)
continue;
4398 typedef std::vector<TStreamerArtificial*> vec_t;
4401 if (rule->GetTarget()==0) {
4409 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4411 toAdd.push_back(newel);
4413 toAdd.reserve(rule->GetTarget()->GetEntries());
4424 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4426 toAdd.push_back(newel);
4431 for(
Int_t other = 1; other < rule->GetTarget()->GetEntries(); ++other) {
4432 objstr = (
TObjString*)(rule->GetTarget()->At(other));
4434 newName = objstr->
String();
4441 toAdd.push_back(newel);
4448 TIter s_iter(rule->GetSource());
4453 if (loc == -1 || (i+1)>loc) {
4469 for(vec_t::iterator iter = toAdd.begin(); iter != toAdd.end(); ++iter) {
4502 while ((obj = next()))
4505 if (strstr(option,
"full") != 0) {
4511 if (sequenceType.
Length()) {
4513 sequenceType +=
"]";
4515 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4517 sequenceType.
Data());
4521 Bool_t wantOrig = strstr(option,
"incOrig") != 0;
4531 if (sequenceType.
Length() != 0) {
4532 sequenceType +=
',';
4534 sequenceType +=
"optimized";
4536 if (sequenceType.
Length()) {
4538 sequenceType +=
"]";
4540 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4542 sequenceType.
Data());
4543 if (optimized && wantOrig) {
4548 if (sequenceType.
Length()) {
4550 sequenceType +=
"]";
4552 Printf(
" j=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4554 sequenceType.
Data());
4572 char* p = (
char*) obj;
4578 p =
new char[
fSize];
4579 memset(p, 0,
fSize);
4611 char**
r = (
char**) eaddr;
4613 for (
Int_t i = 0; i < len; ++i) {
4626 void**
r = (
void**) eaddr;
4633 const char* title = element->
GetTitle();
4634 const char* bracket1 = strrchr(title,
'(');
4635 const char* bracket2 = strrchr(title,
')');
4636 if (bracket1 && bracket2 && (bracket2 != (bracket1 + 1))) {
4637 Int_t len = bracket2 - (bracket1 + 1);
4638 char* clonesClass =
new char[len+1];
4639 clonesClass[0] =
'\0';
4640 strncat(clonesClass, bracket1 + 1, len);
4641 void**
r = (
void**) eaddr;
4643 delete[] clonesClass;
4646 void**
r = (
void**) eaddr;
4657 if (einfo) einfo->
New(eaddr);
4675 if (strcmp(element->
GetName(),
"This")==0 &&
4695 for (
Int_t i = 0; i < len; ++i, r += size) {
4718 Error(
"NewArray",
"TClass pointer is null!");
4724 char* p = (
char*) ary;
4736 char* dataBegin = (
char*) &r[2];
4749 #define DeleteBasicPointer(addr,element,name) \ 4751 name **f = (name**)(addr); \ 4752 int n = element->GetArrayLength() ? element->GetArrayLength() : 1;\ 4753 for(int j=0;j<n;j++) { \ 4768 char *p = (
char*)obj;
4772 for (
Int_t elenum = nelements - 1; elenum >= 0; --elenum) {
4811 void**
r = (
void**) eaddr;
4812 for (
Int_t j = len - 1; j >= 0; --j) {
4826 void**
r = (
void**) eaddr;
4827 for (
Int_t j = len - 1; j >= 0; --j) {
4835 if (etype ==
kBase) {
4850 if (etype ==
kSTL) {
4854 if (strcmp(ele->
GetName(),
"This")==0) {
4878 char*
r = eaddr + (size * (len - 1));