86 Int_t last = arr->GetLast();
87 arr->AddAtAndExpand(arr->At(last),last+1);
88 for(
Int_t ind = last-1; ind >=
at; --ind) {
89 arr->AddAt( arr->At(ind), ind+1);
97 Int_t offset = objs.size();
100 for(
Int_t ind = last-1; ind >=
at; --ind) {
101 arr->
AddAt( arr->
At(ind), ind+offset);
103 for(
size_t ins = 0; ins < objs.size(); ++ins) {
104 arr->
AddAt(objs[ins], at+ins);
113 while (at<last && arr->At(at) != oldobj) {
125 while (at<last && arr->At(at) != oldobj) {
212 if (!fElements)
return;
222 struct TPreventRecursiveBuildGuard {
223 TPreventRecursiveBuildGuard(
TStreamerInfo* info): fInfo(info) {
227 ~TPreventRecursiveBuildGuard() {
259 TPreventRecursiveBuildGuard buildGuard(
this);
270 fElements->Add(element);
285 ROOT::TSchemaRuleSet::TMatches rules;
301 Int_t offset = base->GetDelta();
306 Error(
"Build()",
"Cannot stream virtual base %s of class %s",
310 const char* bname = base->GetName();
311 const char* btitle = base->GetTitle();
313 if (!strcmp(bname,
"string")) {
315 }
else if (base->IsSTLContainer()) {
321 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);
335 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
351 if (!clm->
IsLoaded() && !(isCollection || isString)) {
354 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(), clm->
GetName());
359 fElements->Add(element);
384 const char* dmName = dm->
GetName();
385 const char* dmTitle = dm->
GetTitle();
399 const char* rbracket = ::strchr(dmTitle,
']');
400 if (lbracket && rbracket) {
404 Error(
"Build",
"%s, discarding: %s %s, illegal %s\n",
GetName(), dmFull, dmName, dmTitle);
410 if (!dtCounter || !isInteger) {
411 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] (must be Int_t)\n",
GetName(), dmFull, dmName, counterName);
419 Error(
"Build",
"%s, discarding: %s %s, illegal [%s] must be placed before \n",
GetName(), dmFull, dmName, counterName);
429 if (!dmCounter && (strstr(dmFull,
"char*") || strstr(dmFull,
"Char_t*"))) {
431 dsize =
sizeof(
char*);
434 Error(
"Build",
"%s, unknown type: %s %s",
GetName(), dmFull, dmName);
436 }
else if (dmIsPtr && (dtype !=
kCharStar)) {
441 if ((fName ==
"TString") || (fName ==
"TClass")) {
444 Error(
"Build",
"%s, discarding: %s %s, no [dimension]\n",
GetName(), dmFull, dmName);
457 static const char* full_string_name =
"basic_string<char,char_traits<char>,allocator<char> >";
458 if (!strcmp(dmType,
"string") || !strcmp(dmType,
"std::string") || !strcmp(dmType, full_string_name)) {
462 if (proxy) element =
new TStreamerSTL(dmName, dmTitle, offset, dmFull, *proxy, dmIsPtr);
467 Error(
"Build",
"The class \"%s\" is compiled and for its the 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(),dmName,element->
GetClassPointer()->
GetName());
473 Error(
"Build",
"The class \"%s\" is interpreted and for its the 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(),dmName,element->
GetClassPointer()->
GetName());
482 Error(
"Build",
"%s, unknown type: %s %s\n",
GetName(), dmFull, dmName);
495 Error(
"Build",
"%s: %s has no streamer or dictionary, data member %s will not be saved",
GetName(), dmFull, dmName);
506 Warning(
"Build",
"%s: %s has no streamer or dictionary, data member \"%s\" will not be saved",
GetName(), dmFull, dmName);
519 for (
Int_t i = 0; i < ndim; ++i) {
537 if ( !wasCompiled && (rules && rules.HasRuleWithSource( element->
GetName(),
kTRUE )) ) {
538 needAllocClass =
kTRUE;
547 && rules && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) )
550 fElements->Add(copy);
559 fElements->Add(element);
569 fElements->Add(element);
575 if (needAllocClass) {
613 fElements->Add( el );
645 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
647 if (element->
GetTitle()[0] ==
'<') {
652 if (content[
c] ==
'<') ++level;
653 else if (content[
c] ==
'>') --level;
664 "Update the collection proxy of the class \"%s\" \n"
665 "\tto be similar to \"%s\".",
670 The class %s had a collection proxy when written but it is not an STL\n \
671 collection and we did not record the type of the content of the collection.\n \
672 We will claim the content is a bool (i.e. no data will be read).",
696 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
GetName());
703 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
705 if (element->
GetTitle()[0] ==
'<') {
710 if (content[
c] ==
'<') ++level;
711 else if (content[
c] ==
'>') --level;
722 "Update the collection proxy of the class \"%s\" \n"
723 "\tto be similar to \"%s\".",
728 The class %s had a collection proxy when written but it is not an STL\n \
729 collection and we did not record the type of the content of the collection.\n \
730 We will claim the content is a bool (i.e. no data will be read).",
752 searchOnChecksum =
kFALSE;
758 searchOnChecksum =
kTRUE;
765 searchOnChecksum =
kFALSE;
771 searchOnChecksum =
kTRUE;
781 searchOnChecksum =
kFALSE;
787 searchOnChecksum =
kTRUE;
792 fClassVersion = array->
GetLast() + 1;
798 if (!searchOnChecksum) {
804 for (
Int_t i = -1; i < ninfos; ++i) {
821 while ((slot < ninfos) && (array->
UncheckedAt(slot) != 0)) {
824 fClassVersion = slot;
867 #ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
924 Int_t nel = fElements->GetEntriesFast();
928 for (
Int_t i = 0; i < nel; ++i) {
946 if (oldIsNonVersioned) {
949 The class %s transitioned from not having a specified class version\n\
950 to having a specified class version (the current class version is %d).\n\
951 However too many different non-versioned layouts of the class have been\n\
952 loaded so far. This prevent the proper reading of objects written with\n\
953 the class layout version %d, in particular from the file:\n\
955 To work around this issue, load fewer 'old' files in the same ROOT session.",
959 The class %s transitioned from not having a specified class version\n\
960 to having a specified class version (the current class version is %d).\n\
961 However too many different non-versioned layouts of the class have been\n\
962 loaded so far. This prevent the proper reading of objects written with\n\
963 the class layout version %d.\n\
964 To work around this issue, load fewer 'old' files in the same ROOT session.",
971 The StreamerInfo for version %d of class %s read from the file %s\n\
972 has a different checksum than the previously loaded StreamerInfo.\n\
973 Reading objects of type %s from the file %s \n\
974 (and potentially other files) might not work correctly.\n\
975 Most likely the version number of the class was not properly\n\
976 updated [See ClassDef(%s,%d)].",
980 The StreamerInfo from %s does not match existing one (%s:%d)\n\
981 The existing one has not been used yet and will be discarded.\n\
982 Reading the file %s will work properly, however writing object of\n\
983 type %s will not work properly. Most likely the version number\n\
984 of the class was not properly updated [See ClassDef(%s,%d)].",
990 The StreamerInfo for version %d of class %s\n\
991 has a different checksum than the previously loaded StreamerInfo.\n\
992 Reading objects of type %s\n\
993 (and potentially other files) might not work correctly.\n\
994 Most likely the version number of the class was not properly\n\
995 updated [See ClassDef(%s,%d)].",
999 The StreamerInfo from %s does not match existing one (%s:%d)\n\
1000 The existing one has not been used yet and will be discarded.\n\
1001 Reading should work properly, however writing object of\n\
1002 type %s will not work properly. Most likely the version number\n\
1003 of the class was not properly updated [See ClassDef(%s,%d)].",
1019 && (fClassVersion != 0)
1035 #ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
1056 #endif // TEST_FOR_BACKWARD_COMPATIBILITY
1063 if (bc->GetClassPointer()->GetCollectionType()) {
1071 The StreamerInfo of class %s read from file %s\n\
1072 has the same version (=%d) as the active class but a different checksum.\n\
1073 You should update the version to ClassDef(%s,%d).\n\
1074 Do not try to write objects with the current class definition,\n\
1078 The StreamerInfo of class %s \n\
1079 has the same version (=%d) as the active class but a different checksum.\n\
1080 You should update the version to ClassDef(%s,%d).\n\
1081 Do not try to write objects with the current class definition,\n\
1082 the files will not be readable.\n",
GetName(), fClassVersion,
GetName(), fClassVersion + 1);
1089 Fatal(
"BuildCheck",
"\n\
1090 The StreamerInfo of unversioned class %s \n\
1091 has the same version (=%d) as the active class but an old checksum.\n\
1092 This should not happen. An assert will follow.\n",
GetName(), fClassVersion);
1107 if ((fClassVersion < -1) || (fClassVersion > 65000)) {
1108 printf(
"ERROR reading TStreamerInfo: %s fClassVersion=%d\n",
GetName(), fClassVersion);
1154 if (!element)
break;
1161 if (ty <=
kULong)
continue;
1165 {
for (
int j=ndata-1;j>=i;j--) {elements->
AddAtAndExpand(elements->
At(j),j+1);}}
1166 elements->
AddAt(bt,i);
1188 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() );
1206 if (oldClass == 0 || newClass == 0)
return kFALSE;
1211 const char *oldname = oldClass->
GetName();
1212 for (
UInt_t i = oldlen, done =
false, nest = 0; (i>0) && !done ; --i) {
1213 switch (oldClass->
GetName()[i-1]) {
1214 case '>' : ++nest;
break;
1215 case '<' :
if (nest==0)
return kFALSE;
1217 case ':' :
if (nest == 0) oldname= &(oldClass->
GetName()[i]); done =
kTRUE;
break;
1220 oldlen = strlen(oldname);
1221 if (!(strlen(newClass->
GetName()) > strlen(oldClass->
GetName()))) {
1225 const char* newEnd = & (newClass->
GetName()[newlen-oldlen]);
1227 if (0 != strcmp(newEnd, oldname)) {
1255 Error(
"ImportStreamerInfo",
"Unable to clone the StreamerInfo for %s.",(*next)->GetName());
1257 info->SetClass(newClass);
1258 Int_t oldv = info->GetClassVersion();
1301 if (oldContent == newContent) {
1302 contentMatch =
kTRUE;
1303 }
else if (newContent) {
1306 if (oldFlatContent == newFlatContent) {
1307 contentMatch =
kTRUE;
1313 contentMatch = (newContent==0);
1317 if ((oldContent==0 && oldProxy->
GetType() == newProxy->
GetType())
1394 TClass *FindAlternate(
TClass *context,
const std::string &i_name, std::string& newName)
1400 std::string
name(i_name);
1402 if (name.compare(0,6,
"const ")==0) {
1408 while(name[name.length()-nstars-1]==
'*') {
1413 name.erase(name.length()-nstars,nstars);
1416 std::string alternate(context->
GetName());
1417 alternate.append(
"::");
1418 alternate.append(name);
1422 newName.append(altcl->
GetName());
1423 newName.append(suffix);
1427 size_t ctxt_cursor = strlen(context->
GetName());
1428 for (
size_t level = 0; ctxt_cursor != 0; --ctxt_cursor) {
1429 switch (context->
GetName()[ctxt_cursor]) {
1430 case '<': --level;
break;
1431 case '>': ++level;
break;
1432 case ':':
if (level == 0) {
1436 alternate.append(context->
GetName(),ctxt_cursor+1);
1437 alternate.append(name);
1440 newName.append(altcl->
GetName());
1441 newName.append(suffix);
1451 bool HasScope(
const std::string &name)
1455 for(
size_t i = 0, level = 0; i<name.length(); ++i) {
1457 case '<': ++level;
break;
1458 case '>': --level;
break;
1459 case ':':
if (level == 0) {
1486 info = old->GetValueClass()->GetStreamerInfo();
1497 if ((firstNewCl && !firstOldCl) || (secondNewCl && !secondOldCl))
1499 std::vector<std::string> inside;
1503 TClass *firstAltCl = firstOldCl;
1504 TClass *secondAltCl = secondOldCl;
1505 std::string firstNewName;
1506 std::string secondNewName;
1507 if (firstNewCl && !HasScope(inside[1])) {
1508 firstAltCl = FindAlternate(context, inside[1], firstNewName);
1510 if (secondNewCl && !HasScope(inside[2])) {
1511 secondAltCl = FindAlternate(context, inside[2], secondNewName);
1513 if ((firstNewCl && firstAltCl != firstOldCl) ||
1514 (secondNewCl && secondAltCl != secondOldCl) ) {
1517 std::string alternate = inside[0];
1518 alternate.append(
"<");
1519 alternate.append(firstAltCl ? firstNewName : inside[1]);
1520 alternate.append(
",");
1521 alternate.append(secondAltCl? secondNewName : inside[2]);
1525 if (alternate[alternate.length()-1]==
'>') {
1526 alternate.append(
" ");
1528 alternate.append(
">");
1533 }
else if (current->
GetValueClass() && !old->GetValueClass()
1534 && old->GetType() ==
kInt_t) {
1541 std::vector<std::string> inside;
1547 if (HasScope(inside[1])) {
1552 std::string newName;
1553 TClass *altcl = FindAlternate(context, inside[1], newName);
1556 std::string alternate = inside[0];
1557 alternate.append(
"<");
1558 alternate.append(newName);
1562 if (alternate[alternate.length()-1]==
'>') {
1563 alternate.append(
" ");
1565 alternate.append(
">");
1573 struct TBuildOldGuard {
1599 TBuildOldGuard buildOldGuard(
this);
1602 printf(
"\n====>Rebuilding TStreamerInfo for class: %s, version: %d\n",
GetName(), fClassVersion);
1646 constexpr
size_t kSizeOfPtr =
sizeof(
void*);
1650 if ((fElements->GetEntries() == 1) && !strcmp(fElements->At(0)->GetName(),
"This")) {
1673 ROOT::TSchemaRuleSet::TMatches rules;
1679 Int_t virtualInfoLocAlloc = 0;
1704 #if defined(PROPER_IMPLEMEMANTION_OF_BASE_CLASS_RENAMING)
1725 Error(
"BuildOld",
"Could not find base class: %s for %s and could not find any matching rename rule\n", base->
GetName(),
GetName());
1735 Error(
"BuildOld",
"Could not find base class: %s for %s, renaming rule was found but is malformed\n", base->
GetName(),
GetName());
1745 else if( !baseclass ) {
1748 Warning(
"BuildOld",
"Missing base class: %s skipped", base->
GetName());
1750 baseclass =
new TClass(element->
GetName(), 1, 0, 0, -1, -1);
1751 element->
Update(0, baseclass);
1761 if (baseOffset < 0) {
1773 if (!baserule.empty()) {
1784 element->
Init(
this);
1796 if (infobase) baseclass = infobase->
GetClass();
1802 if (infobase && infobase->
fComp == 0) {
1824 if (baseOffset < 0) {
1829 offset += baseclass->
Size();
1836 Int_t baseOffset = -1;
1844 if (strchr(bc->
GetName(),
'<') || !strcmp(bc->
GetName(),
"string")) {
1847 if (bcName == elName) {
1862 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());
1875 if (newInfo ==
this) {
1876 baseOffset = offset;
1878 }
else if (newInfo) {
1882 const char *newElName = newElement->
GetName();
1883 if (newElement->IsBase() && (strchr(newElName,
'<') || !strcmp(newElName,
"string")) ) {
1886 if (bcName == elName) {
1892 Error(
"BuildOld",
"Could not find STL base class: %s for %s\n", element->
GetName(),
GetName());
1895 baseOffset = newElement->GetOffset();
1896 asize = newElement->GetSize();
1899 if (baseOffset == -1) {
1910 if (baseOffset < 0) {
1916 element->
Init(
this);
1939 element->
Init(
this);
1953 element->
Init(
this);
1958 if (dmClassName.
Index(
"const ")==0) dmClassName.
Remove(0,6);
1963 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());
1980 element->
Init(
this);
2009 if ((newType == ::
kChar_t) && isPointer && !isArray && !hasCount) {
2011 }
else if (isPointer) {
2013 }
else if (isArray) {
2017 if (newType == -1) {
2024 if (newInfo && (newInfo !=
this)) {
2027 if (newClass == 0) {
2028 newType = newElems ? newElems->
GetType() : -1;
2052 }
else if (element->
GetType() != newType) {
2065 if (oldClass == newClass.
GetClass()) {
2067 }
else if (ClassWasMovedToNamespace(oldClass, newClass.
GetClass())) {
2069 if (0 != (oldv = ImportStreamerInfo(oldClass, newClass.
GetClass()))) {
2070 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);
2078 if (ContainerMatchTClonesArray(newClass.
GetClass())) {
2101 TClass *oldFixedClass = FixCollectionV5(
GetClass(),oldClass,newClass);
2102 if (oldFixedClass && oldFixedClass != oldClass) {
2103 element->
Update(oldClass,oldFixedClass);
2104 oldClass = oldFixedClass;
2107 if (CollectionMatch(oldClass, newClass)) {
2122 switch( element->
GetType() ) {
2148 }
else if (CollectionMatchFloat16(oldClass,newClass)) {
2150 }
else if (CollectionMatchDouble32(oldClass,newClass)) {
2152 }
else if (CollectionMatchLong64(oldClass,newClass)) {
2155 }
else if (CollectionMatchULong64(oldClass,newClass)) {
2168 }
else if(oldClass &&
2185 if (strncmp(dm->
GetTitle(),
"->",2)==0) {
2223 if (newInfo && (newInfo !=
this)) {
2226 newType = newElems->
GetType();
2257 if (newType != -1) {
2265 cannotConvert =
kTRUE;
2269 cannotConvert =
kTRUE;
2272 if (newType != -1) {
2276 cannotConvert =
kTRUE;
2280 cannotConvert =
kTRUE;
2284 if (cannotConvert) {
2307 strcmp(element->
GetName(),
"This") == 0 &&
2313 asize =
sizeof(std::vector<int>);
2319 if ((offset % kSizeOfPtr) != 0) {
2320 offset = offset - (offset % kSizeOfPtr) + kSizeOfPtr;
2326 if (!wasCompiled && rules) {
2327 if (rules.HasRuleWithSource( element->
GetName(),
kTRUE ) ) {
2329 if (allocClass == 0) {
2337 allocClass = infoalloc->
GetClass();
2343 && !rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2366 }
else if (rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2378 }
else if (rules && rules.HasRuleWithTarget( element->
GetName(),
kTRUE ) ) {
2414 for (iel = 0; iel < narr; ++iel) {
2417 tai[kel++] = element;
2419 arr[jel++] = element;
2422 for (kel = 0; jel < narr;) {
2423 arr[jel++] = tai[kel++];
2430 if (!wasCompiled && allocClass) {
2436 fElements->Add( el );
2485 TMemberInfo(
TClass *parent) : fParent(parent) {};
2487 void SetDataType(
Int_t datatype) {
2488 fDataType = datatype;
2491 void SetName(
const char *name) {
2494 void SetClassName(
const char *name) {
2497 void SetComment(
const char *title) {
2498 const char *left = strstr(title,
"[");
2500 const char *right = strstr(left,
"]");
2503 fComment.
Append(left,right-left);
2521 if (fName != other.fName)
return kTRUE;
2524 if (fDataType != other.fDataType) {
2525 if ( (fDataType == 4 && other.fDataType == 16)
2526 || (fDataType == 16 && other.fDataType == 4) ) {
2528 }
else if ( (fDataType == 14 && other.fDataType == 17)
2529 || (fDataType == 17 && other.fDataType == 14) ) {
2531 }
else if ( (fDataType == 3 && other.fDataType == 6)
2532 ||(fDataType == 6 && other.fDataType == 3) ){
2541 }
else if (fClassName != other.fClassName) {
2542 if ( (fClassName ==
"long" && (other.fClassName ==
"long long" || other.fClassName ==
"Long64_t"))
2543 || ( (fClassName ==
"long long" || fClassName ==
"Long64_t") && other.fClassName ==
"long") ) {
2545 }
else if ( (fClassName ==
"unsigned long" && (other.fClassName ==
"unsigned long long" || other.fClassName ==
"ULong64_t"))
2546 || ( (fClassName ==
"unsigned long long" || fClassName ==
"ULong64_t") && other.fClassName ==
"unsigned long") ) {
2551 if (name != othername) {
2554 if (!CollectionMatch(cl,otherCl)) {
2555 TClass *oldFixedClass = FixCollectionV5(fParent,cl,otherCl);
2556 if (!oldFixedClass || !CollectionMatch(oldFixedClass,otherCl)) {
2565 return fComment != other.fComment;
2587 char* eaddr = ((
char*)obj) + element->
GetOffset();
2606 if (ecl && (
fClass!=ecl )) {
2625 char* eaddr = ((
char*)obj) + element->
GetOffset();
2642 if (newname && newname[0] && fName != newname) {
2676 R__ASSERT( (cl==0 || info==0) && (cl!=0 || info!=0) );
2709 if (el && el->
IsBase()) {
2724 if (infoel && infoel->
IsBase()) {
2725 otherClass = infoel->
GetName();
2736 if (localClass != otherClass) {
2740 "The in-memory layout version %d for class '%s' has a base class (%s) that the on-file layout version %d does not have.",
2742 }
else if (otherClass.
Length()==0) {
2744 "The on-file layout version %d for class '%s' has a base class (%s) that the in-memory layout version %d does not have",
2748 "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'",
2752 if (!complete)
return kFALSE;
2753 result = result &&
kFALSE;
2757 if (!localBase)
continue;
2760 if (!otherBaseClass)
continue;
2763 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2764 " has the same version (=%d) as the active class but a different checksum.\n"
2765 " You should update the version to ClassDef(%s,%d).\n"
2766 " The objects on this file might not be readable because:\n"
2767 " 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).",
2776 if (!localBaseInfo) {
2783 if (!localBaseInfo) {
2785 msg.
Form(
" The StreamerInfo of the base class %s (of class %s) read from %s%s\n"
2786 " refers to a checksum (%x) that can not be found neither in memory nor in the file.\n",
2788 file ?
"file " :
"", file ? file->
GetName() :
"",
2800 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2801 " has the same version (=%d) as the active class but a different checksum.\n"
2802 " You should update the version to ClassDef(%s,%d).\n"
2803 " The objects on this file might not be readable because:\n"
2804 " 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).",
2814 if (!localBase || !otherBase)
continue;
2820 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2821 " has the same version (=%d) as the active class but a different checksum.\n"
2822 " You should update the version to ClassDef(%s,%d).\n"
2823 " The objects on this file might not be readable because:\n"
2824 " 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).",
2834 if (localBaseInfo == otherBaseInfo ||
2840 msg.
Form(
" The StreamerInfo of class %s read from %s%s\n"
2841 " has the same version (=%d) as the active class but a different checksum.\n"
2842 " You should update the version to ClassDef(%s,%d).\n"
2843 " The objects on this file might not be readable because:\n"
2844 " 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).",
2852 if (!result && !complete) {
2861 TMemberInfo other(cl ? cl : info->
GetClass());
2872 local.SetName( el->
GetName() );
2874 local.SetComment( el->
GetTitle() );
2875 local.SetDataType( el->
GetType() );
2883 other.SetName( tdm->
GetName() );
2885 other.SetComment( tdm->
GetTitle() );
2912 other.SetName( infoel->
GetName() );
2914 other.SetComment( infoel->
GetTitle() );
2915 other.SetDataType( infoel->
GetType() );
2924 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"
2927 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
2929 }
else if (other.fName.Length()==0) {
2930 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"
2933 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data());
2935 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"
2940 ,local.fClassName.Data(),local.fName.Data(),local.fComment.Data()
2941 ,other.fClassName.Data(),other.fName.Data(),other.fComment.Data());
2944 result = result &&
kFALSE;
2945 if (!complete)
return result;
2969 constexpr
size_t kSizeOfPtr =
sizeof(
void*);
2970 if ((fSize % kSizeOfPtr) != 0) {
2971 fSize = fSize - (fSize % kSizeOfPtr) + kSizeOfPtr;
3007 static TClassRef string_classref(
"string");
3008 if (
fClass == string_classref) {
3016 if (fElements && fElements->GetEntries()==1 && strcmp(
"This",fElements->UncheckedAt(0)->GetName())==0) {
3067 if (allocator)
return allocator->
GetClass();
3117 for (
int i=0; i<il; i++)
id =
id*3+name[i];
3125 for (
int i=0; i<il; i++)
id =
id*3+name[i];
3135 if (el->
IsBase())
continue;
3150 for (i=0; i<il; i++)
id =
id*3+name[i];
3172 type.
ReplaceAll(
"ULong64_t",
"unsigned long long");
3177 if (type==
"signed char") type =
"char";
3181 for (i=0; i<il; i++)
id =
id*3+type[i];
3196 const char *right = strstr(left,
"]");
3199 while (left != right) {
3222 fprintf(file,
" %s = 0;\n",element->
GetName());
3224 fprintf(file,
" memset(%s,0,%d);\n",element->
GetName(),element->
GetSize());
3228 fprintf(file,
" %s = 0;\n",element->
GetName());
3243 if (atstart) { fprintf(file,
" : "); atstart =
kFALSE; }
3244 else fprintf(file,
" , ");
3245 fprintf(file,
"%s(const_cast<%s &>( rhs ))\n", element->
GetName(),protoname.
Data());
3248 if (atstart) { fprintf(file,
" : "); atstart =
kFALSE; }
3249 else fprintf(file,
" , ");
3250 fprintf(file,
"%s(const_cast<%s &>( rhs ).%s)\n",element->
GetName(),protoname.
Data(),element->
GetName());
3254 fprintf(file,
"{\n");
3255 fprintf(file,
" // This is NOT a copy constructor. This is actually a move constructor (for stl container's sake).\n");
3256 fprintf(file,
" // Use at your own risk!\n");
3257 fprintf(file,
" (void)rhs; // avoid warning about unused parameter\n");
3265 if (!defMod) { fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3266 const char *ename = element->
GetName();
3267 const char *colon2 = strstr(ename,
"::");
3268 if (colon2) ename = colon2+2;
3270 fprintf(file,
" modrhs.%s = 0;\n",ename);
3272 fprintf(file,
" memset(modrhs.%s,0,%d);\n",ename,element->
GetSize());
3275 const char *ename = element->
GetName();
3278 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3280 fprintf(file,
" modrhs.%s = 0;\n",ename);
3283 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3285 fprintf(file,
" modrhs.%s = 0;\n",ename);
3289 fprintf(file,
" for (Int_t i=0;i<%d;i++) %s[i] = rhs.%s[i];\n",element->
GetArrayLength(),ename,ename);
3291 fprintf(file,
" for (Int_t i=0;i<%d;i++) (&(%s",element->
GetArrayLength(),ename);
3293 fprintf(file,
"[0]");
3295 fprintf(file,
"))[i] = (&(rhs.%s",ename);
3297 fprintf(file,
"[0]");
3299 fprintf(file,
"))[i];\n");
3302 if (!defMod) { fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE; };
3303 fprintf(file,
" modrhs.%s = 0;\n",ename);
3306 fprintf(file,
" %s &modrhs = const_cast<%s &>( rhs );\n",protoname.
Data(),protoname.
Data()); defMod =
kTRUE;
3310 std::string method_name =
"clear";
3312 method_name =
"reset";
3314 if (element->IsBase()) {
3315 fprintf(file,
" modrhs.%s();\n", method_name.c_str());
3317 fprintf(file,
" modrhs.%s.%s();\n",ename, method_name.c_str());
3335 const char *ename = element->
GetName();
3336 const char *colon2 = strstr(ename,
"::");
3337 if (colon2) ename = colon2+2;
3340 fprintf(file,
" %s = 0;\n",ename);
3342 fprintf(file,
" memset(%s,0,%d);\n",ename,element->
GetSize());
3346 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3348 fprintf(file,
" for (Int_t i=0;i<%d;i++) delete %s[i]; memset(%s,0,%d);\n",element->
GetArrayLength(),ename,ename,element->
GetSize());
3353 const char *ename = element->
GetName();
3355 fprintf(file,
" %s = 0;\n",ename);
3357 fprintf(file,
" delete [] %s; %s = 0;\n",ename,ename);
3361 const char *ename = element->
GetName();
3363 fprintf(file,
" %s = 0;\n",ename);
3365 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3367 fprintf(file,
" delete [] %s; %s = 0;\n",ename,ename);
3371 const char *ename = element->
GetName();
3372 const char *prefix =
"";
3375 }
else if ( element->
IsBase() ) {
3384 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3392 std::vector<std::string> inside;
3395 if (inside[1][inside[1].size()-1]==
'*' || inside[2][inside[2].size()-1]==
'*') {
3396 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,ename,prefix,ename);
3402 fprintf(file,
" delete %s; %s = 0;\n",ename,ename);
3413 if (fClassVersion == -3) {
3417 Bool_t needGenericTemplate = fElements==0 || fElements->GetEntries() == 0;
3419 const char *clname =
GetName();
3421 if (strchr(clname,
':')) {
3423 Int_t len = strlen(clname);
3424 const char *name = clname;
3427 for (
Int_t cur = 0; cur < len; ++cur) {
3428 switch (clname[cur]) {
3435 if (nest == 0) { cur = len;
continue; }
3439 if (nest == 0 && clname[cur+1] ==
':') {
3442 name = clname + cur + 2;
3449 template_protoname.
Append(clname,pr_pos);
3453 const char *where = strstr(clname,
"<");
3454 isTemplate = where != 0;
3456 template_protoname.
Append(clname,where-clname);
3460 if (needGenericTemplate && isTemplate) {
3462 fprintf(fp,
"#ifndef %s_h\n", templateName.
Data());
3463 fprintf(fp,
"#define %s_h\n", templateName.
Data());
3474 if (!element->
IsBase())
continue;
3476 const char *ename = element->
GetName();
3477 if (nbase == 1) fprintf(fp,
" : public %s",ename);
3478 else fprintf(fp,
" , public %s",ename);
3483 if (subClasses && subClasses->
GetEntries()) {
3484 Bool_t needheader =
true;
3486 TIter subnext(subClasses);
3491 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3493 fprintf(fp,
"\npublic:\n");
3494 fprintf(fp,
"// Nested classes forward declaration.\n");
3498 UInt_t sub_numberOfClasses = 0;
3499 UInt_t sub_numberOfNamespaces;
3507 for (
UInt_t i = 0;i < sub_numberOfClasses;++i) {
3508 fprintf(fp,
"}; // end of class.\n");
3510 if (sub_numberOfNamespaces > 0) {
3511 Error(
"GenerateDeclaration",
"Nested classes %s thought to be inside a namespace inside the class %s",subinfo->
GetName(),
GetName());
3518 fprintf(fp,
"\npublic:\n");
3519 fprintf(fp,
"// Nested classes declaration.\n");
3522 if (subClasses && subClasses->
GetEntries()) {
3528 if (subinfo->
GetName()[len+1]==
':' && strstr(subinfo->
GetName()+len+2,
":")==0) {
3535 fprintf(fp,
"\npublic:\n");
3536 fprintf(fp,
"// Data Members.\n");
3549 if (element->
IsBase())
continue;
3550 const char *ename = element->
GetName();
3582 lt = enamebasic.
Length();
3586 if (lt>=ltype) ltype = lt+1;
3588 for (is = 3+lt; is < (3+ltype); ++is) line +=
' ';
3591 if (element->
IsaPointer() && !strchr(line,
'*')) line[2+ltype] =
'*';
3593 if (ld>=ldata) ldata = ld+1;
3594 for (is = 3+ltype+ld; is < (3+ltype+ldata); ++is) line +=
' ';
3598 fprintf(fp,
"%s\n",line.
Data());
3601 if (needGenericTemplate && isTemplate) {
3603 fprintf(fp,
"\n %s() {\n",protoname.
Data());
3606 fprintf(fp,
" %s(const %s & rhs )\n",protoname.
Data(),protoname.
Data());
3609 fprintf(fp,
" virtual ~%s() {\n",protoname.
Data());
3611 fprintf(fp,
" }\n\n");
3615 fprintf(fp,
"\n %s();\n",protoname.
Data());
3616 fprintf(fp,
" %s(const %s & );\n",protoname.
Data(),protoname.
Data());
3617 fprintf(fp,
" virtual ~%s();\n\n",protoname.
Data());
3621 fprintf(sfp,
"#ifndef %s_cxx\n",guard.Data());
3622 fprintf(sfp,
"#define %s_cxx\n",guard.Data());
3623 fprintf(sfp,
"%s::%s() {\n",
GetName(),protoname.
Data());
3627 fprintf(sfp,
"%s::%s(const %s & rhs)\n",
GetName(),protoname.
Data(),protoname.
Data());
3631 fprintf(sfp,
"%s::~%s() {\n",
GetName(),protoname.
Data());
3634 fprintf(sfp,
"#endif // %s_cxx\n\n",guard.Data());
3638 if (fClassVersion > 1 || (cl && cl->
IsTObject()) ) {
3640 if (fClassVersion == 0) {
3642 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.
Data(),0);
3644 fprintf(fp,
" ClassDef(%s,%d); // Generated by MakeProject.\n",protoname.
Data(),fClassVersion + 1);
3649 for(
UInt_t i=0;i<numberOfNamespaces;++i) {
3650 fprintf(fp,
"} // namespace\n");
3653 if (needGenericTemplate && isTemplate) {
3654 fprintf(fp,
"#endif // generic template declaration\n");
3665 const char *clname =
GetName();
3666 if (strchr(clname,
'<')) {
3681 const char *ename = element->
GetName();
3682 const char *colon2 = strstr(ename,
"::");
3683 if (colon2) ename = colon2+2;
3690 if (ltype < lt) ltype = lt;
3691 if (ldata < ld) ldata = ld;
3695 incRiostream =
kTRUE;
3701 if (!include[0])
continue;
3703 Bool_t greater = (include[0]==
'<');
3706 if (strncmp(include,
"include/",8)==0) {
3709 if (strncmp(include,
"include\\",9)==0) {
3712 if (strncmp(element->
GetTypeName(),
"pair<",strlen(
"pair<"))==0) {
3714 }
else if (strncmp(element->
GetTypeName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0) {
3717 TString incName( include, strlen(include)-1 );
3727 if (inclist[0]==0) {
3741 if (strncmp(
GetName(),
"pair<",strlen(
"pair<"))==0)
return 0;
3742 if (strncmp(
GetName(),
"auto_ptr<",strlen(
"auto_ptr<"))==0)
return 0;
3753 for(
UInt_t i=len; i>0; --i) {
3755 case '>': ++nest;
if (scope==0) { isTemplate =
kTRUE; }
break;
3756 case '<': --nest;
break;
3758 if (nest==0 &&
GetName()[i-1]==
':') {
3761 cl =
gROOT->GetClass(nsname);
3765 }
else if (cl == 0 && extrainfos != 0) {
3778 Bool_t needGenericTemplate = isTemplate && (fElements==0 || fElements->GetEntries()==0);
3786 filename.
Form(
"%s/%s.h",dirname,headername.
Data());
3788 FILE *fp = fopen(filename.
Data(),
"w");
3790 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3795 FILE *allfp = fopen(filename.
Data(),
"a");
3797 Error(
"MakeProject",
"Cannot open output file:%s\n",filename.
Data());
3801 fprintf(allfp,
"#include \"%s.h\"\n", headername.
Data());
3804 char *inclist =
new char[50000];
3809 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3810 fprintf(fp,
"// This class has been generated by TFile::MakeProject\n");
3811 fprintf(fp,
"// (%s by ROOT version %s)\n",td.
AsString(),
gROOT->GetVersion());
3812 fprintf(fp,
"// from the StreamerInfo in file %s\n",
gDirectory->GetFile()->GetName());
3813 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
3816 fprintf(fp,
"#ifndef %s_h\n",headername.
Data());
3817 fprintf(fp,
"#define %s_h\n",headername.
Data());
3824 TIter subnext(subClasses);
3833 FILE *sfp = fopen( sourcename.
Data(),
"a" );
3837 Error(
"GenerateHeaderFile",
"Could not open %s for appending",sourcename.
Data());
3841 fprintf(fp,
"#endif\n");
3845 if (sfp) fclose(sfp);
3856 char dmbracket[256];
3857 snprintf(dmbracket,255,
"%s[",dm->
GetName());
3870 char *rdmc = (
char*)rdm->
GetName();
3873 if (dm->
IsaPointer() && rdmc[0] ==
'*') rdmc++;
3876 if (strcmp(rdmc,dm->
GetName()) == 0) {
3888 if (strstr(rdm->
GetName(),dmbracket)) {
3902 if (elementName == 0)
return 0;
3964 Int_t base_offset = 0;
3965 Int_t local_offset = 0;
3971 if (!base_cl || !base_element) {
3974 base_offset = base_element->GetOffset();
3977 offset = base_offset + local_offset;
3992 Int_t local_offset = 0;
4001 offset = base_offset + local_offset;
4049 ::Obsolete(
"TStreamerInfo::GetStreamerElementReal",
"v5-34-20",
"v6-00-02");
4051 if (i < 0 || i >=
fNdata)
return 0;
4052 if (j < 0)
return 0;
4053 if (!fElements)
return 0;
4056 Int_t nelems = fElements->GetEntriesFast();
4057 for (
Int_t ise=0;ise < nelems;ise++) {
4059 if (ise+j >= nelems)
return 0;
4068 template <
typename T>
4090 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
4112 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
4118 #define READ_ARRAY(TYPE_t) \
4120 Int_t sub_instance, index; \
4121 Int_t instance = k; \
4123 index = instance / len; \
4124 sub_instance = instance % len; \
4129 TYPE_t **val =(TYPE_t**)(ladd); \
4130 return T((val[sub_instance])[index]); \
4148 #if defined(_MSC_VER) && (_MSC_VER <= 1200)
4172 template <
typename T>
4181 if (i < 0)
return 0;
4185 if (atype ==
kSTL) {
4187 if (newClass == 0) {
4199 if (j >= nc)
return 0;
4200 char *element_ptr = (
char*)proxy->
At(j);
4201 return GetTypedValueAux<T>(atype,element_ptr,0,1);
4205 return GetTypedValueAux<T>(atype,ladd,j,len);
4214 template <
typename T>
4221 if (j >= nc)
return 0;
4236 template <
typename T>
4240 if (j >= nc)
return 0;
4242 char *pointer = (
char*)cont->
At(j);
4255 template <
typename T>
4260 if (j >= nc)
return 0;
4262 char **ptr = (
char**)cont->
At(j);
4263 char *pointer = *ptr;
4274 if (rules.empty())
return;
4279 for(
auto rule : rules) {
4280 if( rule->IsRenameRule() || rule->IsAliasRule() )
4285 if ( rule->HasTarget( element->
GetName() ) ) {
4288 if ( rule->GetAttributes()[0] != 0 ) {
4291 if (
attr.Contains(
"owner")) {
4292 if (
attr.Contains(
"notowner")) {
4306 const TObjArray *sources = rule->GetSource();
4307 TIter input(sources);
4309 while((src = input())) {
4312 #if 0 // Don't warn about not activating the rule. If don't warn the user can
4318 rule->AsString(ruleStr);
4319 Warning(
"InsertArtificialElements",
"For class %s in StreamerInfo %d is missing the source data member %s when trying to apply the rule:\n %s",
4327 if (!rule)
continue;
4330 typedef std::vector<TStreamerArtificial*> vec_t;
4333 if (rule->GetTarget()==0) {
4341 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4343 toAdd.push_back(newel);
4345 toAdd.reserve(rule->GetTarget()->GetEntries());
4356 newel->
SetReadFunc( rule->GetReadFunctionPointer() );
4358 toAdd.push_back(newel);
4363 for(
Int_t other = 1; other < rule->GetTarget()->GetEntries(); ++other) {
4364 objstr = (
TObjString*)(rule->GetTarget()->At(other));
4366 newName = objstr->
String();
4373 toAdd.push_back(newel);
4380 TIter s_iter(rule->GetSource());
4383 for(
Int_t i = fElements->GetLast(); i >= 0 && (i+1) >= loc; --i) {
4384 if (s->String() == fElements->UncheckedAt(i)->
GetName()) {
4385 if (loc == -1 || (i+1)>loc) {
4393 for(
Int_t i = fElements->GetLast(); i >= 0 && (i+1) >= loc; --i) {
4401 for(vec_t::iterator
iter = toAdd.begin();
iter != toAdd.end(); ++
iter) {
4402 fElements->Add(*
iter);
4434 while ((obj =
next()))
4437 if (strstr(option,
"full") != 0) {
4443 if (sequenceType.
Length()) {
4445 sequenceType +=
"]";
4447 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4449 sequenceType.
Data());
4453 Bool_t wantOrig = strstr(option,
"incOrig") != 0;
4463 if (sequenceType.
Length() != 0) {
4464 sequenceType +=
',';
4466 sequenceType +=
"optimized";
4468 if (sequenceType.
Length()) {
4470 sequenceType +=
"]";
4472 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4474 sequenceType.
Data());
4475 if (optimized && wantOrig) {
4480 if (sequenceType.
Length()) {
4482 sequenceType +=
"]";
4484 Printf(
" j=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
4486 sequenceType.
Data());
4504 char* p = (
char*) obj;
4510 p =
new char[
fSize];
4511 memset(p, 0,
fSize);
4543 char**
r = (
char**) eaddr;
4545 for (
Int_t i = 0; i < len; ++i) {
4558 void**
r = (
void**) eaddr;
4565 const char* title = element->
GetTitle();
4566 const char* bracket1 = strrchr(title,
'(');
4567 const char* bracket2 = strrchr(title,
')');
4568 if (bracket1 && bracket2 && (bracket2 != (bracket1 + 1))) {
4569 Int_t len = bracket2 - (bracket1 + 1);
4570 char* clonesClass =
new char[len+1];
4571 clonesClass[0] =
'\0';
4572 strncat(clonesClass, bracket1 + 1, len);
4573 void**
r = (
void**) eaddr;
4575 delete[] clonesClass;
4578 void**
r = (
void**) eaddr;
4589 if (einfo) einfo->
New(eaddr);
4607 if (strcmp(element->
GetName(),
"This")==0 &&
4627 for (
Int_t i = 0; i < len; ++i, r += size) {
4650 Error(
"NewArray",
"TClass pointer is null!");
4656 char* p = (
char*) ary;
4668 char* dataBegin = (
char*) &r[2];
4681 #define DeleteBasicPointer(addr,element,name) \
4683 name **f = (name**)(addr); \
4684 int n = element->GetArrayLength() ? element->GetArrayLength() : 1;\
4685 for(int j=0;j<n;j++) { \
4700 char *p = (
char*)obj;
4702 Int_t nelements = fElements->GetEntriesFast();
4704 for (
Int_t elenum = nelements - 1; elenum >= 0; --elenum) {
4743 void**
r = (
void**) eaddr;
4744 for (
Int_t j = len - 1; j >= 0; --j) {
4758 void**
r = (
void**) eaddr;
4759 for (
Int_t j = len - 1; j >= 0; --j) {
4767 if (etype ==
kBase) {
4782 if (etype ==
kSTL) {
4786 if (strcmp(ele->
GetName(),
"This")==0) {
4810 char*
r = eaddr + (size * (len - 1));
4811 for (
Int_t j = len - 1; j >= 0; --j, r -= size) {
4833 if (obj == 0)
return;
4835 char* p = (
char*) obj;
4841 if (allocator !=
this) {
4859 if (ary == 0)
return;
4866 char* memBegin = (
char*) &r[-2];
4868 char* p = ((
char*) ary) + ((arrayLen - 1) * size);
4893 printf(
" %-15s = ",name);
4906 const static TClassRef stringClass(
"string");
4907 if (
fClass == stringClass) {
4908 std::string *st = (std::string*)(pointer);
4909 printf(
"%s\n",st->c_str());
4925 if (aleng > lenmax) aleng = lenmax;
4936 if (!clones) {
printf(
" %-15s = \n",name);
return;}
4937 printf(
" %-15s = ",name);
4939 if (nc > lenmax) nc = lenmax;
4944 if (aleng > lenmax) aleng = lenmax;
4946 for (
Int_t k=0;k < nc;k++) {
4948 char *ladd = pointer+offset;
4951 if (k < nc-1)
printf(
", ");
4961 if (!cont) {
printf(
" %-15s = \n",name);
return;}
4962 printf(
" %-15s = ",name);
4964 if (nc > lenmax) nc = lenmax;
4969 if (aleng > lenmax) aleng = lenmax;
4971 for (
Int_t k=0;k < nc;k++) {
4972 char *pointer = (
char*)cont->
At(k);
4973 char *ladd = pointer+offset;
4976 if (k < nc-1)
printf(
", ");
4984 void TStreamerInfo::Streamer(
TBuffer &R__b)
4994 TNamed::Streamer(R__b);
5013 Int_t nobjects = fElements->GetEntriesFast();
5015 for (
Int_t i = 0; i < nobjects; i++) {
5018 if ( el->IsA() == basic ) {
5038 (*fElements)[i] = rel;
5047 TNamed::Streamer(R__b);
5058 TNamed::Streamer(R__b);
5062 R__b << ((fClassVersion > 0) ? fClassVersion : -fClassVersion);
5070 if (has_no_artificial_member) {
5076 Int_t nobjects = fElements->GetEntriesFast();
5079 for (
Int_t i = 0; i < nobjects; i++) {
5082 fElements->RemoveAt( i );
5084 fElements->RemoveAt( i );
5087 fElements->Compress();
5107 static std::atomic<Bool_t> onlyonce(
kFALSE);
5109 if (onlyonce.compare_exchange_strong(expected,
kTRUE)) {
5110 Warning(
"TagFile",
"This function is deprecated, use TBuffer::TagStreamerInfo instead");
5114 if (fNumber < 0 || fNumber >= nindex) {
5115 Error(
"TagFile",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s",
5131 #define DOLOOP for (k = 0, pointer = arr[0]; k < narr; pointer = arr[++k])
5134 static void PrintCR(
int j,
Int_t aleng,
UInt_t ltype)
5136 if (j == aleng-1)
printf(
"\n");
5139 if (j%ltype == ltype-1)
printf(
"\n ");
5217 char **val = (
char**)ladd;
5218 if (*val)
printf(
"%s",*val);
5280 printf(
"printing kAny case (%d)",atype);
5294 printf(
"printing kBase case (%d)",atype);
5304 printf(
"printing kStreamer case (%d)",atype);
5319 printf(
"printing kStreamLoop case (%d)",atype);
5336 if (ladd && aElement->
GetClass() == stringClass) {
5337 std::string *st = (std::string*)(ladd);
5338 printf(
"%s",st->c_str());
5359 element->
Update(oldcl,newcl);
TObject * GetParent() const
Return pointer to parent of this buffer.
Describe Streamer information for one class version.
Small helper to read a TBuffer containing a TClonesArray into any valid collection.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Int_t GetEntries() const
virtual const char * GetTitle() const
Returns title of object.
virtual void * New(void *obj=0)=0
void SetBufferOffset(Int_t offset=0)
virtual Int_t GetCollectionType() const =0
Int_t fClassVersion
Class version identifier.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
static std::atomic< Int_t > fgCount
Number of TStreamerInfo instances.
static void R__TObjArray_InsertBefore(TObjArray *arr, TObject *newobj, TObject *oldobj)
virtual Int_t GetProperties() const
virtual void ClassBegin(const TClass *, Version_t=-1)=0
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
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.
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector,allocator> result: 0 : not stl container code of cont...
ActionContainer_t fActions
T GetTypedValue(char *pointer, Int_t i, Int_t j, Int_t len) const
Return value of element i in object at pointer.
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...
const char * GetTypeName() const
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.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual Bool_t CompareContent(TClass *cl, TVirtualStreamerInfo *info, Bool_t warn, Bool_t complete, TFile *file)=0
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Int_t GetUnitSize() const
Get the sizeof the underlying type of the data member (i.e.
virtual TClass * GetClass() const =0
Collectable string class.
Equal to TDataType's kchar.
virtual void SetSize(Int_t dsize)
Int_t GetLast() const
Return index of last object in array.
virtual TClass * GetValueClass() const =0
All ROOT classes may have RTTI (run time type identification) support added.
int GetSplit(const char *type, std::vector< std::string > &output, int &nestedLoc, EModType mode=TClassEdit::kNone)
Stores in output (after emptying it) the splited 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
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...
TString & ReplaceAll(const TString &s1, const TString &s2)
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
void Update(const TClass *oldcl, TClass *newcl)
Update the TClass pointer cached in this object.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void InsertArtificialElements(std::vector< const ROOT::TSchemaRule * > &rules)
Insert new members as expressed in the array of TSchemaRule(s).
static TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
const char * GetCountClass() const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Buffer base class used for serializing objects.
virtual void SetTypeName(const char *name)
static const char * filename()
Bool_t IsPersistent() const
TClass * GetNewClass() const
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
Eventhough BIT(13) is taken up by TObject (to preserverse forward compatibility)
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
void SetReadFunc(ROOT::TSchemaRule::ReadFuncPtr_t val)
void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)
Recursively mark streamer infos for writing to a file.
virtual Bool_t IsTransient() const
Return kTRUE if the element represent an entity that is not written to the disk (transient members...
void * New(void *obj=0)
An emulated object is created at address obj, if obj is null we allocate memory for the object...
virtual Int_t GetSize() const
Returns size of this element in bytes.
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method). ...
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 #...
TDataType * GetDataType() const
virtual void Clear(const char *opt="")=0
Bool_t IsaPointer() const
Return true if data member is a pointer.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
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.
Type GetType(const std::string &Name)
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
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...
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
bool IsSTLBitset(const char *type)
Return true is the name is std::bitset or bitset
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) ...
Int_t GetEntriesFast() const
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
Int_t GetType(Int_t id) const
virtual EDataType GetType() const =0
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
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.
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
TCompInfo ** fCompFull
![fElements->GetEntries()]
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
Bool_t IsVersioned() 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...
void ComputeSize()
Compute total size of all persistent elements of the class.
TList * GetListOfRealData() const
static void R__TObjArray_InsertAt(TObjArray *arr, std::vector< TStreamerArtificial * > &objs, Int_t at)
TStreamerInfoActions::TActionSequence * fReadMemberWise
! List of read action resulting from the compilation for use in member wise streaming.
const char * Data() const
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Int_t fSize
!size of the persistent class
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=0
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
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...
virtual Int_t GetClassVersion() const =0
ClassImp(TStreamerInfo) static void R__TObjArray_InsertAt(TObjArray *arr
const char * GetTrueTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
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 void Init(TObject *obj=0)
Initliaze the element.
virtual TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
const char * GetCountClass() const
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 Int_t GetVersionOwner() const =0
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
Bool_t IsCompiled() const
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Int_t GetOnFileClassVersion() const
Int_t GetDelta()
Get offset from "this" to part of base class.
#define DeleteBasicPointer(addr, element, name)
std::map< std::string, std::string >::const_iterator iter
void Clear()
Clear string without changing its capacity.
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
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...
virtual void SetNewClass(TClass *cl)
virtual Bool_t IsaPointer() const
Int_t fNfulldata
!number of elements
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...
TString & Append(const char *cs)
std::vector< std::vector< double > > Data
TStreamerInfoActions::TActionSequence * fReadObjectWise
! List of read action resulting from the compilation.
virtual TClassStreamer * GenExplicitClassStreamer(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)
Generate class streamer from static functions.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
TClass * GetClass() const
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.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
UInt_t fCheckSum
Checksum of original class.
virtual const char * GetInclude() const
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'.
void Error(const char *location, const char *msgfmt,...)
Int_t GetClassVersion() const
Int_t GetArrayDim() const
static void AddInclude(FILE *fp, const char *header, Bool_t system, char *inclist)
Add an include statement, if it has not already been added.
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class ...
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
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
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE) const
static void R__WriteDestructorBody(FILE *file, TIter &next)
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 < ...
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
TObject * UncheckedAt(Int_t i) const
virtual void Update(const TClass *oldClass, TClass *newClass)
function called by the TClass constructor when replacing an emulated class by the real class ...
TRealData * GetRealData(const char *name) const
Return pointer to TRealData element with name "name".
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
virtual void Delete(Option_t *option="")
Delete this object.
TClass * fClass
!pointer to class
void SetErrorMessage(const char *msg)
Bool_t HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
Int_t GetOffset(const char *) const
Return the offset of the data member as indicated by this StreamerInfo.
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
TObjArray * fElements
Array of TStreamerElements.
UInt_t GenerateIncludes(FILE *fp, char *inclist, const TList *extrainfos)
Add to the header file, the #include need for this class.
void ls(Option_t *option="") const
List the TStreamerElement list and also the precomputed tables if option contains the string "incOrig...
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
TObjArray * GetElements() const
Long_t GetOffset() const
Get offset from "this".
R__EXTERN TSystem * gSystem
void BuildOld()
rebuild the TStreamerInfo structure
void Clear(Option_t *)
If opt cointains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (use...
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
TClass * GetClass() const
Basic data type descriptor (datatype information is obtained from CINT).
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.
void SetCountClass(const char *clname)
Int_t GetMaxIndex(Int_t i) const
Int_t fOnFileClassVersion
!Class version identifier as stored on file.
virtual Bool_t HasPointers() const =0
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 ...
UInt_t GetCheckSum() const
Bool_t HasInterpreterInfo() 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.
Bool_t TestBit(UInt_t f) const
Int_t GetDataMemberOffset(TDataMember *dm, TMemberStreamer *&streamer) const
Compute data member offset.
The TRealData class manages the effective list of all data members for a given class.
Bool_t CanIgnoreTObjectStreamer()
virtual const char * GetName() const
Returns name of object.
static void R__WriteConstructorBody(FILE *file, TIter &next)
TSubString Strip(EStripType s=kTrailing, char c= ' ') const
Return a substring of self stripped at beginning and/or end.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
Version_t GetClassVersion() const
static TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)
Generate emulated collection proxy for a given class.
TClass * fClass
Not Owned.
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
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
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.
TStreamerElement * fElem
Not Owned.
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE)=0
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 IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
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.
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
TStreamerElement * GetStreamerElementReal(Int_t i, Int_t j) const
Obsolete: this routine is obsolete and should not longer be used.
void Build()
Build the I/O data structure for the current class version.
virtual Int_t GetSize() const
TStreamerElement * GetStreamerElement(const char *datamember, Int_t &offset) const
Return the StreamerElement of "datamember" inside our class or any of its base classes.
T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
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 char * GetParent() const
virtual const char * GetName() const
Returns name of object.
virtual TObjArray * GetElements() const =0
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
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.
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.
Int_t GetNewType(Int_t id) const
unsigned long long ULong64_t
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void SetNewBaseClass(TClass *cl)
const TObjArray * GetTarget() const
Get the target data members of this rule (i.e. the in memory data member).
virtual void SetType(Int_t dtype)
Int_t fNVirtualInfoLoc
! Number of virtual info location to update.
virtual void * At(UInt_t idx)=0
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
#define R__LOCKGUARD(mutex)
void InspectMember(const T &obj, const char *name, Bool_t isTransient)
Long_t GetDataMemberOffset(const char *membername) const
return offset for member name.
Int_t GetEntries() const
Return the number of objects in array (i.e.
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.
const TMatches FindRules(const TString &source) const
Return all the rules that are about the given 'source' class.
void Compile()
loop on the TStreamerElement list regroup members with same type Store predigested information into l...
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
void TagFile(TFile *fFile)
Mark the classindex of the current file as using this TStreamerInfo.
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
const TList * GetStreamerInfoCache()
Returns the cached list of StreamerInfos used in this file.
TClass * GetClass() const
Mother of all ROOT objects.
Int_t Size() const
Get size of basic typedef'ed type.
virtual void Init(TObject *obj=0)
Setup the element.
Int_t GetArrayDim() const
Return number of array dimensions.
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr)
Int_t GetSize() const
Return total size of all persistent elements of the class (with offsets).
Int_t IsSTLContainer()
The return type is defined in TDictionary (kVector, kList, etc.)
TMemberStreamer * GetStreamer() const
Return the associate streamer object.
TClass * GetClass() const
virtual UInt_t Size() const =0
TClassRef is used to implement a permanent reference to a TClass object.
static TString UpdateAssociativeToVector(const char *name)
If we have a map, multimap, set or multiset, plus unordered partners, and the key is a class...
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.
void GetSequenceType(TString &type) const
Fill type with the string representation of sequence information including 'cached','repeat','write' or 'nodelete'.
virtual ~TStreamerInfo()
TStreamerInfo dtor.
virtual void ClassEnd(const TClass *)=0
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) 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.
virtual Bool_t HasCounter() const
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
ClassImp(TSlaveInfo) Int_t TSlaveInfo const TSlaveInfo * si
Used to sort slaveinfos by ordinal.
TVirtualStreamerInfo * GetBaseStreamerInfo() const
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
const TObjArray * GetStreamerInfos() const
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
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
Bool_t HasDataMemberInfo() const
TObject * At(Int_t idx) const
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
virtual void Init(TObject *obj=0)
Setup the element.
const Bool_t kIterBackward
TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual void Compress()
Remove empty slots from array.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Abstract Interface class describing Streamer information for one class.
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual const char * GetName() const
Returns name of object.
Long_t GetThisOffset() const
virtual const char * GetTitle() const
Returns title of object.
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
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.
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)
Int_t Size() const
Return size of object of this class.
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.
TArrayC * GetClassIndex() const
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.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
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...
Int_t GetArrayLength() const
static void R__TObjArray_InsertAfter(TObjArray *arr, TObject *newobj, TObject *oldobj)
Array of chars or bytes (8 bits per element).
EReadWrite
EReadWrite Enumerator Enum Constant Description kBase Base class element kOffsetL Fixed size array k...
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.