93 arr->AddAtAndExpand(
arr->At(last),last+1);
256 struct ArrayCookieLayout {
258 std::size_t cookieSize;
259 std::size_t headerSize;
261 explicit ArrayCookieLayout(
const TClass *cl)
264 headerSize(AlignUp(cookieSize, align))
270 struct TPreventRecursiveBuildGuard {
297 for (
Int_t i = 0; i < ndim; ++i) {
327 (
isStdArray ? ndim > 0 : s->GetDimensions()[0])) {
347 while (*
dims ==
'[') {
353 if (res * 10 < res) {
388 Error(
"UpdateFromRule",
389 "For %s::%s the number of array elements in the rule (%d) does not match the number in the "
390 "StreamerElement (%d)",
424 if (
proxy->GetValueClass()) {
425 title.
Form(
"<%s%s> Used to call the proper TStreamerInfo case",
proxy->GetValueClass()->GetName(),
proxy->HasPointers() ?
"*" :
"");
439 Warning(
"Build",
"Due to some major, backward-incompatible improvements planned for ROOT::RVec, direct I/O of "
440 "ROOT::RVec objects will break between v6.24 and v6.26. Please use std::vectors instead. See "
441 "the release notes of v6.24 for more information.");
452 ROOT::TSchemaRuleSet::TMatches
rules;
478 Error(
"Build()",
"Cannot stream virtual base %s of class %s",
482 const char* bname = base->
GetName();
485 if (!
strcmp(bname,
"string")) {
492 if (!
element->GetClassPointer()->IsLoaded()) {
494 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);
508 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(),
clm->GetName());
527 Warning(
"Build",
"%s: base class %s has no streamer or dictionary it will not be saved",
GetName(),
clm->GetName());
648 dsize =
sizeof(
char*);
659 if ((
fName ==
"TString") || (
fName ==
"TClass")) {
684 "Discarding %s %s::%s because the underlying type (%s) for the enum %s is larger than 4 bytes "
685 "and may result in data loss.",
694 static const char*
full_string_name =
"basic_string<char,char_traits<char>,allocator<char> >";
708 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);
711 if (!
element->GetClassPointer()->IsLoaded()) {
741 if (
clm->IsTObject()) {
746 Error(
"Build",
"%s: %s has no streamer or dictionary, data member %s will not be saved",
751 }
else if (
clm->IsTObject()) {
758 Warning(
"Build",
"%s: %s has no streamer or dictionary, data member \"%s\" will not be saved",
771 for (
Int_t i = 0; i < ndim; ++i) {
936 if (
element->GetTitle()[0] ==
'<') {
942 else if (
content[
c] ==
'>') --level;
953 "Update the collection proxy of the class \"%s\" \n"
954 "\tto be similar to \"%s\".",
959 The class %s had a collection proxy when written but it is not an STL\n \
960 collection and we did not record the type of the content of the collection.\n \
961 We will claim the content is a bool (i.e. no data will be read).",
995 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
GetName());
1004 if (
element->GetTitle()[0] ==
'<') {
1010 else if (
content[
c] ==
'>') --level;
1021 "Update the collection proxy of the class \"%s\" \n"
1022 "\tto be similar to \"%s\".",
1027 The class %s had a collection proxy when written but it is not an STL\n \
1028 collection and we did not record the type of the content of the collection.\n \
1029 We will claim the content is a bool (i.e. no data will be read).",
1108 if (
fCheckSum ==
info->GetCheckSum() && (
info->GetOnFileClassVersion()==1 ||
info->GetOnFileClassVersion()==0)) {
1166#ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
1220 if (
info->IsBuilt()) {
1234 e2->SetTitle(
e1->GetTitle());
1248 The class %s transitioned from not having a specified class version\n\
1249 to having a specified class version (the current class version is %d).\n\
1250 However too many different non-versioned layouts of the class have been\n\
1251 loaded so far. This prevent the proper reading of objects written with\n\
1252 the class layout version %d, in particular from the file:\n\
1254 To work around this issue, load fewer 'old' files in the same ROOT session.",
1258 The class %s transitioned from not having a specified class version\n\
1259 to having a specified class version (the current class version is %d).\n\
1260 However too many different non-versioned layouts of the class have been\n\
1261 loaded so far. This prevent the proper reading of objects written with\n\
1262 the class layout version %d.\n\
1263 To work around this issue, load fewer 'old' files in the same ROOT session.",
1270 The StreamerInfo for version %d of class %s read from the file %s\n\
1271 has a different checksum than the previously loaded StreamerInfo.\n\
1272 Reading objects of type %s from the file %s \n\
1273 (and potentially other files) might not work correctly.\n\
1274 Most likely the version number of the class was not properly\n\
1275 updated [See ClassDef(%s,%d)].",
1279 The StreamerInfo from %s does not match existing one (%s:%d)\n\
1280 The existing one has not been used yet and will be discarded.\n\
1281 Reading the file %s will work properly, however writing object of\n\
1282 type %s will not work properly. Most likely the version number\n\
1283 of the class was not properly updated [See ClassDef(%s,%d)].",
1289 The StreamerInfo for version %d of class %s\n\
1290 has a different checksum than the previously loaded StreamerInfo.\n\
1291 Reading objects of type %s\n\
1292 (and potentially other files) might not work correctly.\n\
1293 Most likely the version number of the class was not properly\n\
1294 updated [See ClassDef(%s,%d)].",
1298 The StreamerInfo does not match existing one (%s:%d)\n\
1299 The existing one has not been used yet and will be discarded.\n\
1300 Reading should work properly, however writing object of\n\
1301 type %s will not work properly. Most likely the version number\n\
1302 of the class was not properly updated [See ClassDef(%s,%d)].",
1334#ifdef TEST_FOR_BACKWARD_COMPATIBILITY_ABSTRACT_CLASSES
1362 if (
bc->GetClassPointer()->GetCollectionType()) {
1370 The StreamerInfo of class %s read from file %s\n\
1371 has the same version (=%d) as the active class but a different checksum.\n\
1372 You should update the version to ClassDef(%s,%d).\n\
1373 Do not try to write objects with the current class definition,\n\
1377 The StreamerInfo of class %s \n\
1378 has the same version (=%d) as the active class but a different checksum.\n\
1379 You should update the version to ClassDef(%s,%d).\n\
1380 Do not try to write objects with the current class definition,\n\
1388 Fatal(
"BuildCheck",
"\n\
1389 The StreamerInfo of unversioned class %s \n\
1390 has the same version (=%d) as the active class but an old checksum.\n\
1491 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() );
1516 switch (
oldClass->GetName()[i-1]) {
1517 case '>' : ++
nest;
break;
1558 Error(
"ImportStreamerInfo",
"Unable to clone the StreamerInfo for %s.",(*next)->GetName());
1586 return newClass->GetCollectionProxy()
1587 &&
newClass->GetCollectionProxy()->GetValueClass()
1588 && !
newClass->GetCollectionProxy()->HasPointers();
1705 if (
name.compare(0,6,
"const ")==0) {
1733 case '<': --level;
break;
1734 case '>': ++level;
break;
1735 case ':':
if (level == 0) {
1773 if (
info->GetElements()->GetEntriesFast() != 2) {
1797 std::vector<std::string> inside;
1853 std::vector<std::string> inside;
1879 struct TBuildOldGuard {
1977 ROOT::TSchemaRuleSet::TMatches
rules;
2008#if defined(PROPER_IMPLEMEMANTION_OF_BASE_CLASS_RENAMING)
2031 Error(
"BuildOld",
"Could not find base class: %s for %s and could not find any matching rename rule\n", base->
GetName(),
GetName());
2041 Error(
"BuildOld",
"Could not find base class: %s for %s, renaming rule was found but is malformed\n", base->
GetName(),
GetName());
2054 Warning(
"BuildOld",
"Missing base class: %s skipped", base->
GetName());
2132 auto align =
baseclass->GetClassAlignment();
2137 Error(
"TStreamerInfo::BuildOld",
"Cannot determine alignment for base class %s for element %s",
2140 align =
alignof(std::max_align_t);
2176 }
else if (
bc->GetClassPointer()->GetCollectionProxy()
2177 && !
bc->GetClassPointer()->IsLoaded()
2178 &&
bc->GetClassPointer()->GetCollectionProxy()->GetCollectionType() !=
ROOT::kSTLvector) {
2179 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());
2186 asize =
bc->GetClassPointer()->Size();
2209 Error(
"BuildOld",
"Could not find STL base class: %s for %s\n",
element->GetName(),
GetName());
2232 auto align =
element->GetAlignment();
2237 Error(
"TStreamerInfo::BuildOld",
"Cannot determine alignment for base class %s for element %s",
2240 align =
alignof(std::max_align_t);
2264 const char*
dmType =
nullptr;
2326 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());
2341 if (
rd &&
rd->GetDataMember()) {
2342 element->SetOffset(
rd->GetThisOffset());
2344 dm =
rd->GetDataMember();
2357 if (pattern && pattern !=
this && pattern->IsBuilt()) {
2365 Error(
"BuildCheck",
"Reading RVecs that were written directly to file before ROOT v6.24 is not "
2366 "supported, the program will likely crash.");
2376 auto align =
element->GetAlignment();
2381 Error(
"TStreamerInfo::BuildOld",
"Cannot determine alignment for type %s for element %s",
2384 align =
alignof(std::max_align_t);
2467 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);
2519 switch(
element->GetType() ) {
2557 }
else if (
newClass->GetSchemaRules()->HasRuleWithSourceClass(
oldClass->GetName() )) {
2570 newClass->GetSchemaRules()->HasRuleWithSourceClass(
oldClass->GetName() ) ) {
2588 }
else if (
newClass->GetCollectionProxy()) {
2596 }
else if (
newClass->GetCollectionProxy()) {
2603 if (
newClass->GetCollectionProxy()) {
2611 }
else if (
newClass->IsTObject()) {
2713 asize =
sizeof(std::vector<int>);
2721 const std::size_t align =
element->GetAlignment();
2921 TMemberInfo(
TClass *parent) : fParent(parent) {};
2930 void SetClassName(
const char *
name) {
2933 void SetComment(
const char *title) {
2934 const char *left =
strstr(title,
"[");
2936 const char *right =
strstr(left,
"]");
2939 fComment.
Append(left,right-left);
2960 if (fDataType !=
other.fDataType) {
2961 if ( (fDataType == 4 &&
other.fDataType == 16)
2962 || (fDataType == 16 &&
other.fDataType == 4) ) {
2964 }
else if ( (fDataType == 14 &&
other.fDataType == 17)
2965 || (fDataType == 17 &&
other.fDataType == 14) ) {
2967 }
else if ( (fDataType == 3 &&
other.fDataType == 6)
2968 ||(fDataType == 6 &&
other.fDataType == 3) ){
2977 }
else if (fClassName !=
other.fClassName) {
2978 if ( (fClassName ==
"long" && (
other.fClassName ==
"long long" ||
other.fClassName ==
"Long64_t"))
2979 || ( (fClassName ==
"long long" || fClassName ==
"Long64_t") &&
other.fClassName ==
"long") ) {
2981 }
else if ( (fClassName ==
"unsigned long" && (
other.fClassName ==
"unsigned long long" ||
other.fClassName ==
"ULong64_t"))
2982 || ( (fClassName ==
"unsigned long long" || fClassName ==
"ULong64_t") &&
other.fClassName ==
"unsigned long") ) {
3001 return fComment !=
other.fComment;
3027 }
else if (
element->IsaPointer()) {
3147 if (
el &&
el->IsBase()) {
3178 "The in-memory layout version %d for class '%s' has a base class (%s) that the on-file layout version %d does not have.",
3182 "The on-file layout version %d for class '%s' has a base class (%s) that the in-memory layout version %d does not have",
3186 "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'",
3201 msg.Form(
" The StreamerInfo of class %s read from %s%s\n"
3202 " has the same version (=%d) as the active class but a different checksum.\n"
3203 " You should update the version to ClassDef(%s,%d).\n"
3204 " The objects on this file might not be readable because:\n"
3205 " 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).",
3223 msg.Form(
" The StreamerInfo of the base class %s (of class %s) read from %s%s\n"
3224 " refers to a checksum (%x) that can not be found neither in memory nor in the file.\n",
3226 file ?
"file " :
"", file ? file->
GetName() :
"",
3238 msg.Form(
" The StreamerInfo of class %s read from %s%s\n"
3239 " has the same version (=%d) as the active class but a different checksum.\n"
3240 " You should update the version to ClassDef(%s,%d).\n"
3241 " The objects on this file might not be readable because:\n"
3242 " 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).",
3258 msg.Form(
" The StreamerInfo of class %s read from %s%s\n"
3259 " has the same version (=%d) as the active class but a different checksum.\n"
3260 " You should update the version to ClassDef(%s,%d).\n"
3261 " The objects on this file might not be readable because:\n"
3262 " 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).",
3278 msg.Form(
" The StreamerInfo of class %s read from %s%s\n"
3279 " has the same version (=%d) as the active class but a different checksum.\n"
3280 " You should update the version to ClassDef(%s,%d).\n"
3281 " The objects on this file might not be readable because:\n"
3282 " 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).",
3299 TMemberInfo
other(cl ? cl :
info->GetClass());
3308 local.SetName(
el->GetName() );
3309 local.SetClassName(
el->GetTypeName() );
3310 local.SetComment(
el->GetTitle() );
3311 local.SetDataType(
el->GetType() );
3320 other.SetClassName(
tdm->GetTrueTypeName() );
3321 other.SetComment(
tdm->GetTitle() );
3322 if (
tdm->GetDataType()) {
3324 if (
tdm->IsaPointer()) {
3331 if (
tdm->GetArrayDim()) {
3334 other.SetDataType(
tdm->GetDataType()->GetType() );
3360 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"
3365 }
else if (
other.fName.Length()==0) {
3366 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"
3371 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"
3427 Error(
"ComputeSize",
"No information on the alignment of class %s, using default alignment of %d bytes",
3480 si->ForceWriteInfo(file,
force);
3515 if (
element->IsTransient())
continue;
3537 if (allocator)
return allocator->
GetClass();
3587 for (
int i=0; i<
il; i++)
id =
id*3+
name[i];
3599 for (
int i=0; i<
il; i++)
id =
id*3+
name[i];
3610 if (
el->IsBase())
continue;
3615 if (
el->GetType()==3 &&
gROOT->GetType(
el->GetTypeName())==0) {
3625 for (i=0; i<
il; i++)
id =
id*3+
name[i];
3639 type =
el->GetTypeName();
3647 type.ReplaceAll(
"ULong64_t",
"unsigned long long");
3648 type.ReplaceAll(
"Long64_t",
"long long");
3649 type.ReplaceAll(
"signed char",
"char");
3650 type.ReplaceAll(
"<signed char",
"<char");
3651 type.ReplaceAll(
",signed char",
",char");
3652 if (
type==
"signed char")
type =
"char";
3656 for (i=0; i<
il; i++)
id =
id*3+
type[i];
3658 int dim =
el->GetArrayDim();
3660 for (i=0;i<dim;i++)
id =
id*3+
el->GetMaxIndex(i);
3671 const char *right =
strstr(left,
"]");
3674 while (left != right) {
3696 if(
element->GetArrayLength() <= 1) {
3744 if(
element->GetArrayLength() <= 1) {
3761 }
else if (
element->GetArrayLength() > 1) {
3763 if (
element->GetArrayDim() == 1) {
3765 }
else if (
element->GetArrayDim() >= 2) {
3766 fprintf(file,
" for (Int_t i=0;i<%d;i++) reinterpret_cast<%s *>(%s",
element->GetArrayLength(),
element->GetTypeName(),
ename);
3767 fprintf(file,
")[i] = reinterpret_cast<%s const *>(rhs.%s)[i];\n",
element->GetTypeName(),
ename);
3806 if (
element->GetArrayLength() <= 1) {
3818 fprintf(file,
" // This is NOT a copy constructor. This is actually a move constructor (for stl container's sake).\n");
3819 fprintf(file,
" // Use at your own risk!\n");
3820 fprintf(file,
" (void)rhs; // avoid warning about unused parameter\n");
3831 fprintf(file,
" // This is NOT a copy operator=. This is actually a move operator= (for stl container's sake).\n");
3832 fprintf(file,
" // Use at your own risk!\n");
3833 fprintf(file,
" (void)rhs; // avoid warning about unused parameter\n");
3841 if (
element->GetArrayLength() <= 1) {
3853 fprintf(file,
" return *this;\n");
3871 if(
element->GetArrayLength() <= 1) {
3877 if(
element->GetArrayLength() <= 1) {
3896 }
else if (
element->HasCounter()) {
3904 const char *prefix =
"";
3907 }
else if (
element->IsBase() ) {
3915 if (
proxy->HasPointers()) {
3916 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,
ename,prefix,
ename);
3924 std::vector<std::string> inside;
3927 if ((!inside[1].empty() && inside[1][inside[1].
size()-1]==
'*')
3928 || (!inside[2].empty() && inside[2][inside[2].
size()-1]==
'*')) {
3929 fprintf(file,
" std::for_each( (%s %s).rbegin(), (%s %s).rend(), DeleteObjectFunctor() );\n",prefix,
ename,prefix,
ename);
4007 if (!
element->IsBase())
continue;
4027 fprintf(fp,
"// Nested classes forward declaration.\n");
4033 if (
subinfo->GetClassVersion() == -3) {
4041 fprintf(fp,
"}; // end of class.\n");
4044 Error(
"GenerateDeclaration",
"Nested classes %s thought to be inside a namespace inside the class %s",
subinfo->GetName(),
GetName());
4052 fprintf(fp,
"// Nested classes declaration.\n");
4069 fprintf(fp,
"// Data Members.\n");
4082 if (
element->IsBase())
continue;
4113 }
else if (
strncmp(
enamebasic.Data(),
"auto_ptr<", std::char_traits<char>::length(
"auto_ptr<")) == 0) {
4123 for (is = 3+
lt; is < (3+
ltype); ++is)
line +=
' ';
4199 fprintf(fp,
"} // namespace\n");
4203 fprintf(fp,
"#endif // generic template declaration\n");
4267 }
else if (
strncmp(
element->GetTypeName(),
"auto_ptr<",std::char_traits<char>::length(
"auto_ptr<"))==0) {
4292 if (
strncmp(
GetName(),
"auto_ptr<",std::char_traits<char>::length(
"auto_ptr<"))==0)
return 0;
4306 case '<': --
nest;
break;
4340 Error(
"MakeProject",
"Cannot open output file:%s\n",
filename.Data());
4347 Error(
"MakeProject",
"Cannot open output file:%s\n",
filename.Data());
4354 char *
inclist =
new char[50000];
4359 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
4360 fprintf(fp,
"// This class has been generated by TFile::MakeProject\n");
4361 fprintf(fp,
"// (%s by ROOT version %s)\n",
td.AsString(),
gROOT->GetVersion());
4362 fprintf(fp,
"// from the StreamerInfo in file %s\n",
gDirectory->GetFile()->GetName());
4363 fprintf(fp,
"//////////////////////////////////////////////////////////\n");
4386 Error(
"GenerateHeaderFile",
"Could not open %s for appending",
sourcename.Data());
4419 char *
rdmc = (
char*)
rdm->GetName();
4424 if (
rdm->GetDataMember() != dm)
continue;
4431 if (
rdm->IsObject()) {
4598 ::Obsolete(
"TStreamerInfo::GetStreamerElementReal",
"v5-34-20",
"v6-00-02");
4601 if (
j < 0)
return 0;
4617template <
typename T>
4639#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4661#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4667#define READ_ARRAY(TYPE_t) \
4669 Int_t sub_instance, index; \
4670 Int_t instance = k; \
4672 index = instance / len; \
4673 sub_instance = instance % len; \
4678 TYPE_t **val =(TYPE_t**)(ladd); \
4679 return T((val[sub_instance])[index]); \
4697#if defined(_MSC_VER) && (_MSC_VER <= 1200)
4721template <
typename T>
4730 if (i < 0)
return 0;
4748 if (
j >= nc)
return 0;
4763template <
typename T>
4770 if (
j >= nc)
return 0;
4772 char *pointer = (
char*)
clones->UncheckedAt(
j);
4785template <
typename T>
4789 if (
j >= nc)
return 0;
4791 char *pointer = (
char*)
cont->At(
j);
4804template <
typename T>
4809 if (
j >= nc)
return 0;
4811 char **ptr = (
char**)
cont->At(
j);
4812 char *pointer = *ptr;
4823 if (
rules.empty())
return;
4829 if(
rule->IsRenameRule() ||
rule->IsAliasRule() )
4837 if (
rule->GetAttributes()[0] != 0 ) {
4840 if (
attr.Contains(
"owner")) {
4841 if (
attr.Contains(
"notowner")) {
4854 if (
r->GetAttributes()[0] != 0) {
4857 return attr.Contains(
"canignore");
4874 Warning(
"InsertArtificialElements",
4875 "For class %s in StreamerInfo %d is missing the source data member `%s` when trying to "
4888 const char *dim =
src->GetDimensions();
4894 classmsg =
"and the memory TClass is \"";
4895 classmsg += cl ? cl->GetName() :
"nullptr";
4896 classmsg +=
"\" while the rule needed \"";
4900 Error(
"InsertArtificialElements",
4901 "For class %s in StreamerInfo %d a rule has conflicting type for the source \"%s %s%s\",\n"
4902 " The TStreamerElement has memory type %d (needed %d) %s:\n %s",
4912 if (!
rule)
continue;
4915 std::vector<TStreamerArtificial*>
toAdd;
4917 if (
rule->GetTarget()==0) {
4925 newel->SetReadFunc(
rule->GetReadFunctionPointer() );
4926 newel->SetReadRawFunc(
rule->GetReadRawFunctionPointer() );
4929 toAdd.reserve(
rule->GetTarget()->GetEntriesFast());
4938 newel->SetReadFunc(
rule->GetReadFunctionPointer() );
4939 newel->SetReadRawFunc(
rule->GetReadRawFunctionPointer() );
4965 if (
loc == -1 || (i+1)>
loc) {
5015 while ((obj = next()))
5030 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
5055 Printf(
" i=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
5067 Printf(
" j=%2d, %-15s type=%3d, offset=%3d, len=%d, method=%ld%s",
5087 char*
p = (
char*) obj;
5134 char**
r = (
char**)
eaddr;
5149 void**
r = (
void**)
eaddr;
5156 const char* title =
element->GetTitle();
5164 void**
r = (
void**)
eaddr;
5169 void**
r = (
void**)
eaddr;
5199 !
cle->GetCollectionProxy()) {
5203 if (
cle->GetCollectionProxy())
5204 cle->GetCollectionProxy()->New(
eaddr);
5243 Error(
"NewArray",
"TClass pointer is null!");
5249 char*
p = (
char*)
ary;
5281#define DeleteBasicPointer(addr,element,name) \
5283 name **f = (name**)(addr); \
5284 int n = element->GetArrayLength() ? element->GetArrayLength() : 1;\
5285 for(int j=0;j<n;j++) { \
5300 char *
p = (
char*)obj;
5311 etype =
ele->GetType();
5334 cle =
ele->GetClassPointer();
5344 void**
r = (
void**)
eaddr;
5347 cle->Destructor(
r[
j]);
5359 void**
r = (
void**)
eaddr;
5362 cle->Destructor(
r[
j]);
5368 if (etype ==
kBase) {
5383 if (etype ==
kSTL) {
5396 cle->GetCollectionProxy()->Clear();
5440 if (obj == 0)
return;
5442 char*
p = (
char*) obj;
5448 if (allocator !=
this) {
5466 if (
ary == 0)
return;
5520 std::string *
st = (std::string*)(pointer);
5558 for (
Int_t k=0;k < nc;k++) {
5559 char *pointer = (
char*)
clones->UncheckedAt(k);
5563 if (k < nc-1)
printf(
", ");
5583 for (
Int_t k=0;k < nc;k++) {
5584 char *pointer = (
char*)
cont->At(k);
5588 if (k < nc-1)
printf(
", ");
5611 if (
R__b.IsReading()) {
5617 R__b.ClassMember(
"TNamed");
5620 R__b.ClassMember(
"fCheckSum",
"UInt_t");
5622 R__b.ClassMember(
"fClassVersion",
"Int_t");
5625 R__b.ClassMember(
"fElements",
"TObjArray*");
5633 if (
R__b.GetParent() &&
R__b.GetVersionOwner() < 50000)
5643 switch (
el->GetType()) {
5662 (*fElements)[i] =
rel;
5681 R__b.ClassMember(
"TNamed");
5683 R__b.ClassMember(
"fCheckSum",
"UInt_t");
5685 R__b.ClassMember(
"fClassVersion",
"Int_t");
5692 R__b.ClassMember(
"fElements",
"TObjArray*");
5703 }
else if (
el != 0) {
5727 Warning(
"TagFile",
"This function is deprecated, use TBuffer::TagStreamerInfo instead");
5732 Error(
"TagFile",
"StreamerInfo: %s number: %d out of range[0,%d] in file: %s",
5748#define DOLOOP for (k = 0, pointer = arr[0]; k < narr; pointer = arr[++k])
5834 char **val = (
char**)
ladd;
5835 if (*val)
printf(
"%s",*val);
5842 printf(
"(%s*)%zx",
el ?
el->GetClass()->GetName() :
"unknown_type",(size_t)(*obj));
5850 printf(
"(%s*)%zx",
el ?
el->GetClass()->GetName() :
"unknown_type",(size_t)(*obj));
5882 printf(
"(%s*)0x%zx",
el ?
el->GetClass()->GetName() :
"unknown_type",(size_t)(*obj));
5890 printf(
"(%s*)0x%zx",
el ?
el->GetClass()->GetName() :
"unknown_type",(size_t)(*obj));
5954 std::string *
st = (std::string*)(
ladd);
5960 printf(
"(unknown_type*)0x%zx",(
size_t)(
ladd));
6043 const char *
dmTitle =
"Emulation";
6045 size_t align =
alignof(std::max_align_t);
6050 if (
dt &&
dt->GetType() > 0 ) {
6056 align =
dt->GetAlignOf();
6062 Error(
"Pair Emulation Building",
"%s is not yet supported in pair emulation",
6072 static const char *
full_string_name =
"basic_string<char,char_traits<char>,allocator<char> >";
6089 el->SetSize(
sizeof(
int));
6098 if (
clm->IsTObject()) {
6106 align = std::max(align,
clm->GetClassAlignment());
6109 if (
clm->IsTObject()) {
6132 const char *
msg =
"problematic";
6137 msg =
"not specified";
6141 Error(
"GenerateInfoForPair",
6142 "Called with inconsistent offset and size. For \"std::pair<%s,%s>\" the requested offset is %ld but the size is %s (%ld)",
6183 return cl->GetStreamerInfo();
6203 const static int pairlen = std::char_traits<char>::length(
"pair<");
6206 Error(
"GenerateInfoForPair",
"The class name passed is not a pair: %s",
pairclassname.c_str());
6210 std::vector<std::string> inside;
6215 Error(
"GenerateInfoForPair",
"Could not find the pair arguments in %s",
pairclassname.c_str());
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
short Version_t
Class version identifier (short)
char Char_t
Character 1 byte (char)
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
float Float_t
Float 4 bytes (float)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
long double LongDouble_t
Long Double (not portable)
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char)
const Bool_t kIterBackward
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Bool_t operator!=(const TDatime &d1, const TDatime &d2)
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Int_t gErrorIgnoreLevel
errors with level below this value will be ignored. Default is kUnset.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TVirtualMutex * gInterpreterMutex
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
static void R__WriteMoveConstructorBody(FILE *file, const TString &protoname, TIter &next)
Write down the body of the 'move' constructor.
static void R__TObjArray_InsertAt(TObjArray *arr, TObject *obj, Int_t at)
static void R__TObjArray_InsertAfter(TObjArray *arr, TObject *newobj, TObject *oldobj)
static bool R__IsUniquePtr(TStreamerElement *element)
Return true if the element is auto_ptr or unique_ptr.
#define READ_ARRAY(TYPE_t)
static void R__WriteConstructorBody(FILE *file, TIter &next)
#define DeleteBasicPointer(addr, element, name)
static constexpr int str_length(const char *str)
static TStreamerElement * R__CreateEmulatedElement(const char *dmName, const std::string &dmFull, Int_t offset, bool silent, bool needAlign)
static void R__WriteMoveBodyPointersArrays(FILE *file, const TString &protoname, TIter &next)
Write down the pointers and arrays part of the body of the 'move' constructor.
static void R__TObjArray_InsertBefore(TObjArray *arr, TObject *newobj, TObject *oldobj)
static void R__WriteOddOperatorEqualBody(FILE *file, const TString &protoname, TIter &next)
Write down the body of the 'move' constructor.
static void R__WriteDestructorBody(FILE *file, TIter &next)
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
Int_t GetPointerLevel() const
const char * GetUnderlyingTypeName() const
const char * GetDimensions() const
Array of chars or bytes (8 bits per element).
Each class (see TClass) has a linked list of its base class(es).
Int_t GetDelta()
Get offset from "this" to part of base class.
ROOT::ESTLType IsSTLContainer()
Return which type (if any) of STL container the data member is.
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
const char * GetTitle() const override
Get base class description (comment).
Buffer base class used for serializing objects.
TClassRef is used to implement a permanent reference to a TClass object.
static DictFuncPtr_t GetDict(const char *cname)
Given the class name returns the Dictionary() function of a class (uses hash of name).
TClass instances represent classes, structs and namespaces in the ROOT type system.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
Bool_t IsSyntheticPair() const
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
void RemoveStreamerInfo(Int_t slot)
Remove and delete the StreamerInfo in the given slot.
Bool_t HasDataMemberInfo() const
void CopyCollectionProxy(const TVirtualCollectionProxy &)
Replaces the collection proxy for this class.
Bool_t fIsSyntheticPair
Indicates whether this class represents a pair and was not created from a dictionary nor interpreter ...
void RegisterStreamerInfo(TVirtualStreamerInfo *info)
Register the StreamerInfo in the given slot, change the State of the TClass as appropriate.
TVirtualStreamerInfo * GetCurrentStreamerInfo()
size_t GetClassAlignment() const
Return the alignment requirement (in bytes) for objects of this class.
void IgnoreTObjectStreamer(Bool_t ignore=kTRUE)
When the class kIgnoreTObjectStreamer bit is set, the automatically generated Streamer will not call ...
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
Longptr_t GetDataMemberOffset(const char *membername) const
return offset for member name.
Bool_t MatchLegacyCheckSum(UInt_t checksum) const
Return true if the checksum passed as argument is one of the checksum value produced by the older che...
Bool_t HasInterpreterInfo() const
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfRealData() const
Int_t Size() const
Return size of object of this class.
Bool_t CanIgnoreTObjectStreamer()
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
const TObjArray * GetStreamerInfos() const
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method).
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
Int_t GetBaseClassOffset(const TClass *toBase, void *address=nullptr, bool isDerivedObject=true)
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Int_t GetClassSize() const
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Bool_t IsVersioned() const
void SetClassSize(Int_t sizof)
Version_t GetClassVersion() const
TRealData * GetRealData(const char *name) const
Return pointer to TRealData element with name "name".
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
An array of clone (identical) objects.
static TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)
Generate emulated collection proxy for a given class.
static TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)
Generate emulated class streamer for a given collection class.
static Proxy_t * GenExplicitProxy(const ::ROOT::TCollectionProxyInfo &info, TClass *cl)
Generate proxy from static functions.
static TClassStreamer * GenExplicitClassStreamer(const ::ROOT::TCollectionProxyInfo &info, TClass *cl)
Generate class streamer from static functions.
virtual Int_t GetEntries() const
Small helper to read a TBuffer containing a TClonesArray into any valid collection.
All ROOT classes may have RTTI (run time type identification) support added.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
const char * GetTrueTypeName() const
Get the desugared type name of this data member, including const and volatile qualifiers.
Bool_t IsPersistent() const
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
Int_t GetArrayDim() const
Return number of array dimensions.
Bool_t IsEnum() const
Return true if data member is an enum.
Int_t GetUnitSize() const
Get the sizeof the underlying type of the data member (i.e.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Int_t IsSTLContainer()
The return type is defined in TDictionary (kVector, kList, etc.)
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
Longptr_t GetOffset() const
Get offset from "this".
const char * GetTypeName() const
Get the decayed type name of this data member, removing const and volatile qualifiers,...
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
const char * GetFullTypeName() const
Get the concrete type name of this data member, including const and volatile qualifiers.
Basic data type descriptor (datatype information is obtained from CINT).
TString GetTypeName()
Get basic type of typedef, e,g.: "class TDirectory*" -> "TDirectory".
static TDataType * GetDataType(EDataType type)
Given a EDataType type, get the TDataType* that represents it.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
static TEnum * GetEnum(const std::type_info &ti, ESearchAction sa=kALoadAndInterpLookup)
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
const TList * GetStreamerInfoCache()
Returns the cached list of StreamerInfos used in this file.
TArrayC * GetClassIndex() const
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
static TString GetHeaderName(const char *name, const TList *extrainfos, Bool_t includeNested=kFALSE)
Return the header name containing the description of name.
static UInt_t GenerateForwardDeclaration(FILE *fp, const char *clname, char *inclist, Bool_t implementEmptyClass, Bool_t needGenericTemplate, const TList *extrainfos)
Insert a (complete) forward declaration for the class 'clname'.
static void AddInclude(FILE *fp, const char *header, Bool_t system, char *inclist)
Add an include statement, if it has not already been added.
static UInt_t GenerateIncludeForTemplate(FILE *fp, const char *clname, char *inclist, Bool_t forward, const TList *extrainfos)
Add to the header file, the #include needed for the argument of this template.
static void GeneratePostDeclaration(FILE *fp, const TVirtualStreamerInfo *info, char *inclist)
Add to the header file anything that need to appear after the class declaration (this includes some #...
static UInt_t GenerateClassPrefix(FILE *fp, const char *clname, Bool_t top, TString &protoname, UInt_t *numberOfClasses, Int_t implementEmptyClass=kFALSE, Bool_t needGenericTemplate=kFALSE)
Write the start of the class (forward) declaration.
static TString UpdateAssociativeToVector(const char *name)
Abstract base class for accessing the data-members of a class.
The TNamed class is the base class for all named ROOT classes.
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
const char * GetName() const override
Returns name of object.
void Streamer(TBuffer &) override
Stream an object of class TObject.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Int_t GetEntriesFast() const
void AddAt(TObject *obj, Int_t idx) override
Add object at position ids.
TObject * Last() const override
Return the object in the last filled slot. Returns 0 if no entries.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
void AddLast(TObject *obj) override
Add object in the next empty slot in the array.
TObject * UncheckedAt(Int_t i) const
Bool_t IsEmpty() const override
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
Int_t GetLast() const override
Return index of last object in array.
void Add(TObject *obj) override
Collectable string class.
Mother of all ROOT objects.
friend class TClonesArray
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
@ kNoContextMenu
if object does not want context menu
@ kCanDelete
if object in a list can be deleted
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void Obsolete(const char *method, const char *asOfVers, const char *removedFromVers) const
Use this method to declare a method obsolete.
The TRealData class manages the effective list of all data members for a given class.
const char * GetName() const override
Returns name of object.
void SetNewBaseClass(TClass *cl)
TVirtualStreamerInfo * GetBaseStreamerInfo() const
TClass * GetClassPointer() const override
Returns a pointer to the TClass of this element.
Describe one element (data member) to be Streamed.
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element and updates fClassObject.
TClass * GetNewClass() const
Int_t GetArrayLength() const
TClass * GetClass() const
virtual std::size_t GetAlignment() const
Returns the alignment of this element in bytes.
ActionContainer_t fActions
void Update(const TClass *oldcl, TClass *newcl)
Update the TClass pointer cached in this object.
TClass * fClass
Not Owned.
TStreamerElement * fElem
Not Owned.
Describes a persistent version of a class.
Int_t fNVirtualInfoLoc
! Number of virtual info location to update.
Int_t fOnFileClassVersion
!Class version identifier as stored on file.
Int_t GetSize() const override
Return total size of all persistent elements of the class (with offsets).
Int_t GetClassVersion() const override
void Destructor(void *p, Bool_t dtorOnly=kFALSE) override
Emulated destructor for this class.
TVirtualStreamerInfo * GenerateInfoForPair(const std::string &pairclassname, bool silent, size_t hint_pair_offset, size_t hint_pair_size) override
Generate the TClass and TStreamerInfo for the requested pair.
TClassStreamer * GenExplicitClassStreamer(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl) override
Generate class streamer from static functions.
TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent) override
Generate emulated collection proxy for a given class.
Int_t fNfulldata
!number of elements
TCompInfo * fComp
![fNslots with less than fElements->GetEntries()*1.5 used] Compiled info
TVirtualCollectionProxy * GenExplicitProxy(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl) override
Generate proxy from static functions.
T GetTypedValue(char *pointer, Int_t i, Int_t j, Int_t len) const
Return value of element i in object at pointer.
TStreamerInfoActions::TActionSequence * fWriteMemberWiseVecPtr
! List of write action resulting from the compilation for use in member wise streaming.
TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent) override
Generate emulated class streamer for a given collection class.
Int_t GenerateHeaderFile(const char *dirname, const TList *subClasses=nullptr, const TList *extrainfos=nullptr) override
Generate header file for the class described by this TStreamerInfo the function is called by TFile::M...
TStreamerInfoActions::TActionSequence * fReadText
! List of text read action resulting from the compilation, used for JSON.
void ls(Option_t *option="") const override
List the TStreamerElement list and also the precomputed tables if option contains the string "incOrig...
TCompInfo ** fCompFull
![fElements->GetEntries()]
TObjArray * fElements
Array of TStreamerElements.
void InsertArtificialElements(std::vector< const ROOT::TSchemaRule * > &rules)
Insert new members as expressed in the array of TSchemaRule(s).
Int_t GetOnFileClassVersion() const override
Int_t GetOffset(const char *) const override
Return the offset of the data member as indicated by this StreamerInfo.
void PrintValue(const char *name, char *pointer, Int_t i, Int_t len, Int_t lenmax=1000) const
print value of element i in object at pointer The function may be called in two ways: -method1 len < ...
Int_t GetDataMemberOffset(TDataMember *dm, TMemberStreamer *&streamer) const
Compute data member offset.
TObject * Clone(const char *newname="") const override
Make a clone of an object using the Streamer facility.
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 pointer to STL container and eventually element k i...
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 an STL container and eventually element k in a sub-ar...
void BuildEmulated(TFile *file) override
Create an Emulation TStreamerInfo object.
void DeleteArray(void *p, Bool_t dtorOnly=kFALSE) override
Destroy an array of emulated objects, with optional delete.
Bool_t BuildFor(const TClass *cl) override
Check if we can build this for foreign class - do we have some rules to do that.
void Build(Bool_t isTransient=kFALSE) override
Build the I/O data structure for the current class version.
void BuildOld() override
rebuild the TStreamerInfo structure
TStreamerInfoActions::TActionSequence * fReadMemberWise
! List of read action resulting from the compilation for use in member wise streaming.
Int_t fClassVersion
Class version identifier.
Int_t fNdata
!number of optimized elements
void * New(void *obj=nullptr) override
An emulated object is created at address obj, if obj is null we allocate memory for the object.
TStreamerInfo()
Status bits See TVirtualStreamerInfo::EStatusBits for the values.
TStreamerInfoActions::TActionSequence * fReadMemberWiseVecPtr
! List of read action resulting from the compilation for use in member wise streaming.
TStreamerInfoActions::TActionSequence * fReadObjectWise
! List of read action resulting from the compilation.
TClass * GetActualClass(const void *obj) const override
Assuming that obj points to (the part of) an object that is of the type described by this streamerInf...
TStreamerElement * GetStreamerElementReal(Int_t i, Int_t j) const
Obsolete: this routine is obsolete and should not longer be used.
TClass * IsA() const override
TClass * fClass
!pointer to class
Bool_t MatchLegacyCheckSum(UInt_t checksum) const
Return true if the checksum passed as argument is one of the checksum value produced by the older che...
~TStreamerInfo() override
TStreamerInfo dtor.
TCompInfo ** fCompOpt
![fNdata]
void TagFile(TFile *fFile) override
Mark the classindex of the current file as using this TStreamerInfo.
Int_t GetNewType(Int_t id) const
void SetClass(TClass *cl) override
Replace the TClass this streamerInfo is pointing to (belongs to)
UInt_t fCheckSum
Checksum of original class.
void Streamer(TBuffer &) override
Stream an object of class TStreamerInfo.
Int_t GetSizeElements() const
Return total size of all persistent elements of the class use GetSize if you want to get the real siz...
TClass * GetClass() const override
static std::atomic< Int_t > fgCount
Number of TStreamerInfo instances.
T GetTypedValueClones(TClonesArray *clones, Int_t i, Int_t j, Int_t k, Int_t eoffset) const
UInt_t GenerateIncludes(FILE *fp, char *inclist, const TList *extrainfos)
Add to the header file, the #include need for this class.
void ComputeSize()
Compute total size of all persistent elements of the class.
Int_t fNumber
!Unique identifier
void PrintValueSTL(const char *name, TVirtualCollectionProxy *cont, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in an STL container.
TStreamerInfoActions::TActionSequence * fWriteObjectWise
! List of write action resulting from the compilation.
void CallShowMembers(const void *obj, TMemberInspector &insp, Bool_t isTransient) const override
Emulated a call ShowMembers() on the obj of this class type, passing insp and parent.
void Clear(Option_t *="") override
If opt contains 'built', reset this StreamerInfo as if Build or BuildOld was never called on it (usef...
TObjArray * GetElements() const override
Int_t fSize
!size of the persistent class
static T GetTypedValueAux(Int_t type, void *ladd, int k, Int_t len)
Get the value from inside a collection.
void GenerateDeclaration(FILE *fp, FILE *sfp, const TList *subClasses, Bool_t top=kTRUE)
Write the Declaration of class.
static void PrintValueAux(char *ladd, Int_t atype, TStreamerElement *aElement, Int_t aleng, Int_t *count)
print value of element in object at pointer, type atype, leng aleng or *count The function may be cal...
void * NewArray(Long_t nElements, void *ary=nullptr) override
An array of emulated objects is created at address ary, if ary is null, we allocate memory for the ar...
TStreamerElement * GetStreamerElement(const char *datamember, Int_t &offset) const override
Return the StreamerElement of "datamember" inside our class or any of its base classes.
UInt_t GetCheckSum() const override
void Compile() override
loop on the TStreamerElement list regroup members with same type Store predigested information into l...
void BuildCheck(TFile *file=nullptr, Bool_t load=kTRUE) override
Check if built and consistent with the class dictionary.
Bool_t CompareContent(TClass *cl, TVirtualStreamerInfo *info, Bool_t warn, Bool_t complete, TFile *file) override
Return True if the current StreamerInfo in cl or info is equivalent to this TStreamerInfo.
TStreamerInfoActions::TActionSequence * fWriteMemberWise
! List of write action resulting from the compilation for use in member wise streaming.
Int_t fNslots
!total number of slots in fComp.
void ForceWriteInfo(TFile *file, Bool_t force=kFALSE) override
Recursively mark streamer infos for writing to a file.
Version_t fOldVersion
! Version of the TStreamerInfo object read from the file
void DestructorImpl(void *p, Bool_t dtorOnly)
Internal part of the destructor.
TStreamerInfoActions::TActionSequence * fWriteText
! List of text write action resulting for the compilation, used for JSON.
ULong_t * fVirtualInfoLoc
![fNVirtualInfoLoc] Location of the pointer to the TStreamerInfo inside the object (when emulated)
void Update(const TClass *oldClass, TClass *newClass) override
function called by the TClass constructor when replacing an emulated class by the real class
size_t fAlignment
!alignment of the memory representation of the class
void PrintValueClones(const char *name, TClonesArray *clones, Int_t i, Int_t eoffset, Int_t lenmax=1000) const
Print value of element i in a TClonesArray.
void ToLower()
Change string to lower-case.
void Clear()
Clear string without changing its capacity.
const char * Data() const
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
RAII helper class that ensures that PushProxy() / PopProxy() are called when entering / leaving a C++...
Defines a common interface to inspect/change the contents of an object that represents a collection.
virtual EDataType GetType() const =0
If the value type is a fundamental data type, return its type (see enumeration EDataType).
@ kCustomAlloc
The collection has a custom allocator.
virtual TClass * GetValueClass() const =0
If the value type is a user-defined class, return a pointer to the TClass representing the value type...
virtual Int_t GetCollectionType() const =0
Return the type of the proxied collection (see enumeration TClassEdit::ESTLType)
Abstract Interface class describing Streamer information for one class.
Bool_t fIsBuilt
! true if the StreamerInfo has been 'built' (i.e. has all the StreamerElements it should have)
Bool_t IsCompiled() const
std::atomic< Bool_t > fIsCompiled
! true if the StreamerInfo has been compiled (i.e. fully built, ready to use for streaming).
static const char * GetElementCounterStart(const char *dmTitle)
Given a comment/title declaring an array counter, for example:
EReadWrite
EReadWrite Enumerator.
@ kUChar
Equal to TDataType's kchar.
@ kUnsupportedConversion
Type corresponding to a 'missing' data member (with kMissing offset)
@ kNeedObjectForVirtualBaseClass
static TStreamerBasicType * GetElementCounter(const char *countName, TClass *cl)
Get pointer to a TStreamerBasicType in TClass *cl static function.
virtual TObjArray * GetElements() const =0
constexpr T AlignUp(T value, T align) noexcept
Round value up to the next multiple of align.
constexpr bool IsValidAlignment(std::size_t align) noexcept
Return true if align is a valid C++ alignment value: strictly positive and a power of two.
void ResetClassVersion(TClass *, const char *, Short_t)
Global function to update the version number.
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
bool IsStdArray(std::string_view name)
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace
bool IsStdPair(std::string_view name)
std::string GetLong64_Name(const char *original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'.
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container code of cont...
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
bool GetStdArrayProperties(const char *typeName, std::string &typeNameBuf, std::array< int, 5 > &maxIndices, int &ndim)
std::string GetNameForIO(const std::string &templateInstanceName, TClassEdit::EModType mode=TClassEdit::kNone, bool *hasChanged=nullptr)
int GetSplit(const char *type, std::vector< std::string > &output, int &nestedLoc, EModType mode=TClassEdit::kNone)
Stores in output (after emptying it) the split type.
bool IsSTLBitset(const char *type)
Return true is the name is std::bitset<number> or bitset<number>