100#define RTLD_DEFAULT ((void *)::GetModuleHandle(NULL))
101#define dlsym(library, function_name) ::GetProcAddress((HMODULE)library, function_name)
126 class TMmallocDescTemp {
130 TMmallocDescTemp(
void *value = 0) :
157 auto strLen = strlen(
name);
158 if (strLen == 0)
return;
160 const char* endCharPtr = strchr(
name,
'<');
161 endCharPtr = !endCharPtr ? &
name[strLen] : endCharPtr;
163 const char* beginCharPtr = endCharPtr;
164 while (beginCharPtr!=
name){
165 if (*beginCharPtr==
':'){
171 beginCharPtr = beginCharPtr!=endCharPtr ? beginCharPtr :
name;
172 std::string
s(beginCharPtr, endCharPtr);
174 printf(
"TDeclNameRegistry::AddQualifiedName Adding key %s for class/namespace %s\n",
s.c_str(),
name);
176 fClassNamesSet.insert(
s);
186 found = fClassNamesSet.find(
name) != fClassNamesSet.end();
195 if (fVerbLevel > 1) {
196 printf(
"TDeclNameRegistry Destructor. List of %lu names:\n",
197 (
long unsigned int)fClassNamesSet.size());
198 for (
auto const & key: fClassNamesSet) {
199 printf(
" - %s\n", key.c_str());
231 ObjRepoValue(
const TClass *what,
Version_t version) : fClass(what),fVersion(version) {}
256 std::pair<RepoCont_t::iterator, Bool_t> tmp =
gObjectVersionRepository.insert(RepoCont_t::value_type>(location, RepoCont_t::mapped_type(what,version)));
258 Warning(where,
"Reregistering an object of class '%s' version %d at address %p", what->
GetName(), version, p);
262 Warning(where,
"Failed to reregister an object of class '%s' version %d at address %p", what->
GetName(), version, location);
275 RepoCont_t::iterator tmp = cur++;
276 if ((tmp->first == location) && (tmp->second.fVersion == what->
GetClassVersion())) {
292 size_t objsize = what->
Size();
293 long delta = (
char*)newadd - (
char*)oldadd;
297 RepoCont_t::iterator tmp = cur++;
298 if (oldadd <= tmp->
first && tmp->first < ( ((
char*)oldadd) + objsize) ) {
301 gObjectVersionRepository.insert(RepoCont_t::value_type(((
char*)tmp->first)+delta, RepoCont_t::mapped_type(tmp->second.fClass,tmp->second.fVersion)));
314#define R__USE_STD_MAP
315 class TMapTypeToTClass {
316#if defined R__USE_STD_MAP
320 typedef std::map<std::string,TClass*>
IdMap_t;
321 typedef IdMap_t::key_type key_type;
322 typedef IdMap_t::const_iterator const_iterator;
323 typedef IdMap_t::size_type size_type;
326 typedef TClass* mapped_type;
328 typedef IdMap_t::mapped_type mapped_type;
335 void Add(
const key_type &key, mapped_type &obj)
340 mapped_type
Find(
const key_type &key)
const
343 IdMap_t::const_iterator iter = fMap.find(key);
345 if (iter != fMap.end()) cl = iter->second;
348 void Remove(
const key_type &key) {
357#ifdef R__COMPLETE_MEM_TERMINATION
366 void Add(
const char *key,
TClass *&obj) {
368 fMap.Add(realkey, obj);
371 const TPair *
a = (
const TPair *)fMap.FindObject(key);
375 void Remove(
const char *key) {
377 TObject *actual = fMap.Remove(&realkey);
383 class TMapDeclIdToTClass {
386 typedef multimap<TDictionary::DeclId_t, TClass*>
DeclIdMap_t;
387 typedef DeclIdMap_t::key_type key_type;
388 typedef DeclIdMap_t::mapped_type mapped_type;
389 typedef DeclIdMap_t::const_iterator const_iterator;
390 typedef std::pair <const_iterator, const_iterator> equal_range;
391 typedef DeclIdMap_t::size_type size_type;
397 void Add(
const key_type &key, mapped_type obj)
400 std::pair<const key_type, mapped_type> pair = make_pair(key, obj);
403 size_type CountElementsWithKey(
const key_type &key)
405 return fMap.count(key);
407 equal_range
Find(
const key_type &key)
const
410 return fMap.equal_range(key);
412 void Remove(
const key_type &key) {
421#ifdef R__COMPLETE_MEM_TERMINATION
423 return &gIdMapObject;
432#ifdef R__COMPLETE_MEM_TERMINATION
434 return &gDeclIdMapObject;
449 gROOT->GetListOfClasses()->Add(cl);
463 if (!cl || !
id)
return;
475 gROOT->GetListOfClasses()->Remove(oldcl);
507 TDumpMembers(
bool noAddr): fNoAddr(noAddr) { }
524void TDumpMembers::Inspect(
TClass *cl,
const char *pname,
const char *mname,
const void *add,
Bool_t )
526 const Int_t kvalue = 30;
528 const Int_t ktitle = 50;
530 const Int_t ktitle = 42;
532 const Int_t kline = 1024;
540 const char *memberName;
541 const char *memberFullTypeName;
542 const char *memberTitle;
547 if (member->GetDataType()) {
548 memberDataType = (
EDataType)member->GetDataType()->GetType();
550 memberName = member->GetName();
551 memberFullTypeName = member->GetFullTypeName();
552 memberTitle = member->GetTitle();
553 isapointer = member->IsaPointer();
554 isbasic = member->IsBasic();
561 const char *cursor = mname;
562 while ( (*cursor)==
'*' ) ++cursor;
563 TString elname( cursor );
564 Ssiz_t pos = elname.Index(
"[");
565 if ( pos !=
kNPOS ) {
566 elname.Remove( pos );
569 if (!element)
return;
574 memberName = element->
GetName();
577 membertype =
gROOT->GetType(memberFullTypeName);
579 isbasic = membertype !=0;
586 if (strcmp(memberName,
"fDatime") == 0 && memberDataType ==
kUInt_t) {
590 if (strcmp(memberName,
"fBits") == 0 && memberDataType ==
kUInt_t) {
595 static TClassRef stdClass(
"std::string");
596 Bool_t isStdString = (dataClass == stdClass);
599 for (i = 0;i < kline; i++)
line[i] =
' ';
605 char *pointer = (
char*)add;
606 char **ppointer = (
char**)(pointer);
609 char **p3pointer = (
char**)(*ppointer);
616 }
else if (membertype) {
618 i = strlen(*ppointer);
619 if (kvalue+i > kline) i=kline-1-kvalue;
621 for (
Int_t j = 0; j < i; j++) {
622 if (!std::isprint((*ppointer)[j])) {
628 strncpy(
line + kvalue, *ppointer, i);
636 }
else if (!strcmp(memberFullTypeName,
"char*") ||
637 !strcmp(memberFullTypeName,
"const char*")) {
638 i = strlen(*ppointer);
639 if (kvalue+i >= kline) i=kline-1-kvalue;
641 for (
Int_t j = 0; j < i; j++) {
642 if (!std::isprint((*ppointer)[j])) {
648 strncpy(
line + kvalue, *ppointer, std::min( i, kline - kvalue));
658 }
else if (membertype) {
660 cdatime = (
UInt_t*)pointer;
662 snprintf(&
line[kvalue],kline-kvalue,
"%d/%d",cdate,ctime);
670 std::string *str = (std::string*)pointer;
672 }
else if (isTString) {
673 TString *str = (TString*)pointer;
682 if (isdate ==
kFALSE && strcmp(memberFullTypeName,
"char*") && strcmp(memberFullTypeName,
"const char*")) {
683 i = strlen(&
line[0]);
line[i] =
' ';
684 assert(250 > ktitle);
685 strlcpy(&
line[ktitle],memberTitle,250-ktitle+1);
707 void *fRealDataObject;
711 TBuildRealData(
void *obj,
TClass *cl) {
713 fRealDataObject = obj;
724void TBuildRealData::Inspect(
TClass* cl,
const char* pname,
const char* mname,
const void* add,
Bool_t isTransient)
736 isTransientMember =
kTRUE;
740 TString rname( pname );
743 if (cl != fRealDataClass) {
744 if (!fRealDataClass->InheritsFrom(cl)) {
745 Ssiz_t dot = rname.Index(
'.');
750 if (!fRealDataClass->GetDataMember(rname)) {
765 if (!fRealDataClass->GetBaseDataMember(rname)) {
780 fRealDataClass->GetListOfRealData()->Add(rd);
790 fRealDataClass->GetListOfRealData()->Add(rd);
835 void* addrForRecursion = 0;
836 if (GetObjectValidity() == kValidObjectGiven)
837 addrForRecursion =
const_cast<void*
>(add);
844 fRealDataClass->GetListOfRealData()->Add(rd);
861 fBrowser =
b; fCount = 0; }
862 virtual ~TAutoInspector() { }
865 virtual Bool_t IsTreatingNonAccessibleTypes() {
return kFALSE;}
871void TAutoInspector::Inspect(
TClass *cl,
const char *tit,
const char *
name,
872 const void *addr,
Bool_t )
874 if(tit && strchr(tit,
'.')) return ;
875 if (fCount && !fBrowser)
return;
882 int ln = strcspn(
name,
"[ ");
883 TString iname(
name,ln);
886 if (!classInfo)
return;
895 mname.ReplaceAll(
"*",
"");
896 if ((found = (iname==mname)))
break;
908 if (mname ==
"G__virtualinfo")
return;
910 int size =
sizeof(
void*);
930 for(
int i=0; i<nmax; i++) {
932 char *ptr = (
char*)addr + i*size;
939 if (!fBrowser)
return;
947 bwname = actualClass->
GetName();
953 bwname.Length()==0 ||
954 strcmp(bwname.Data(),actualClass->
GetName())==0) {
956 int l = strcspn(bwname.Data(),
"[ ");
957 if (
l<bwname.Length() && bwname[
l]==
'[') {
958 char cbuf[13];
snprintf(cbuf,13,
"[%02d]",i);
959 ts.Replace(0,999,bwname,
l);
961 bwname = (
const char*)ts;
967 fBrowser->Add(obj,clm,bwname);
974 fBrowser->Add( obj, clm, bwname );
980 int sz = proxy->
Size();
982 char fmt[] = {
"#%09d"};
983 fmt[3] =
'0'+(int)
log10(
double(sz))+1;
985 for (
int ii=0;ii<sz;ii++) {
986 void *p = proxy->
At(ii);
998 fBrowser->Add( p, actualCl, ts );
1037 TMmallocDescTemp setreset;
1054 fStreamerInfo(0), fConversionStreamerInfo(0), fRealData(0),
1055 fBase(0), fData(0), fEnums(0), fFuncTemplate(0), fMethod(0), fAllPubData(0),
1056 fAllPubMethod(0), fClassMenuList(0),
1057 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1058 fInstanceCount(0), fOnHeap(0),
1059 fCheckSum(0), fCollectionProxy(0), fClassVersion(0), fClassInfo(0),
1060 fTypeInfo(0), fShowMembers(0),
1061 fStreamer(0), fIsA(0), fGlobalIsA(0), fIsAMethod(0),
1062 fMerge(0), fResetAfterMerge(0), fNew(0), fNewArray(0), fDelete(0), fDeleteArray(0),
1063 fDestructor(0), fDirAutoAdd(0), fStreamerFunc(0), fConvStreamerFunc(0), fSizeof(-1),
1064 fCanSplit(-1), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1065 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1067 fCurrentInfo(0), fLastReadInfo(0), fRefProxy(0),
1068 fSchemaRules(0), fStreamerImpl(&
TClass::StreamerDefault)
1073 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1076 TMmallocDescTemp setreset;
1083 ::Fatal(
"TClass::TClass",
"gInterpreter not initialized");
1087 ::Warning(
"TClass::TClass",
"no dictionary for class %s is available",
name);
1101 fStreamerInfo(0), fConversionStreamerInfo(0), fRealData(0),
1102 fBase(0), fData(0), fEnums(0), fFuncTemplate(0), fMethod(0), fAllPubData(0),
1103 fAllPubMethod(0), fClassMenuList(0),
1104 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1105 fInstanceCount(0), fOnHeap(0),
1106 fCheckSum(0), fCollectionProxy(0), fClassVersion(0), fClassInfo(0),
1107 fTypeInfo(0), fShowMembers(0),
1108 fStreamer(0), fIsA(0), fGlobalIsA(0), fIsAMethod(0),
1109 fMerge(0), fResetAfterMerge(0), fNew(0), fNewArray(0), fDelete(0), fDeleteArray(0),
1110 fDestructor(0), fDirAutoAdd(0), fStreamerFunc(0), fConvStreamerFunc(0), fSizeof(-1),
1111 fCanSplit(-1), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1112 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1114 fCurrentInfo(0), fLastReadInfo(0), fRefProxy(0),
1115 fSchemaRules(0), fStreamerImpl(&
TClass::StreamerDefault)
1118 Init(
name, cversion, 0, 0, 0, 0, -1, -1, 0, silent);
1128 fStreamerInfo(0), fConversionStreamerInfo(0), fRealData(0),
1129 fBase(0), fData(0), fEnums(0), fFuncTemplate(0), fMethod(0), fAllPubData(0),
1130 fAllPubMethod(0), fClassMenuList(0),
1131 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1132 fInstanceCount(0), fOnHeap(0),
1133 fCheckSum(0), fCollectionProxy(0), fClassVersion(0), fClassInfo(0),
1134 fTypeInfo(0), fShowMembers(0),
1135 fStreamer(0), fIsA(0), fGlobalIsA(0), fIsAMethod(0),
1136 fMerge(0), fResetAfterMerge(0), fNew(0), fNewArray(0), fDelete(0), fDeleteArray(0),
1137 fDestructor(0), fDirAutoAdd(0), fStreamerFunc(0), fConvStreamerFunc(0), fSizeof(-1),
1138 fCanSplit(-1), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1139 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1141 fCurrentInfo(0), fLastReadInfo(0), fRefProxy(0),
1142 fSchemaRules(0), fStreamerImpl(&
TClass::StreamerDefault)
1154 "A TClass entry cannot be initialized in a state different from kForwardDeclared or kEmulated.");
1155 Init(
name, cversion, 0, 0, 0, 0, -1, -1, 0, silent);
1172 fStreamerInfo(0), fConversionStreamerInfo(0), fRealData(0),
1173 fBase(0), fData(0), fEnums(0), fFuncTemplate(0), fMethod(0), fAllPubData(0),
1174 fAllPubMethod(0), fClassMenuList(0),
1175 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1176 fInstanceCount(0), fOnHeap(0),
1177 fCheckSum(0), fCollectionProxy(0), fClassVersion(0), fClassInfo(0),
1178 fTypeInfo(0), fShowMembers(0),
1179 fStreamer(0), fIsA(0), fGlobalIsA(0), fIsAMethod(0),
1180 fMerge(0), fResetAfterMerge(0), fNew(0), fNewArray(0), fDelete(0), fDeleteArray(0),
1181 fDestructor(0), fDirAutoAdd(0), fStreamerFunc(0), fConvStreamerFunc(0), fSizeof(-1),
1182 fCanSplit(-1), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1183 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1185 fCurrentInfo(0), fLastReadInfo(0), fRefProxy(0),
1186 fSchemaRules(0), fStreamerImpl(&
TClass::StreamerDefault)
1191 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1197 ::Fatal(
"TClass::TClass",
"gInterpreter not initialized");
1199 if (!classInfo || !
gInterpreter->ClassInfo_IsValid(classInfo)) {
1206 Init(
fName, cversion, 0, 0, dfil, ifil, dl, il, classInfo, silent);
1222 fStreamerInfo(0), fConversionStreamerInfo(0), fRealData(0),
1223 fBase(0), fData(0), fEnums(0), fFuncTemplate(0), fMethod(0), fAllPubData(0),
1224 fAllPubMethod(0), fClassMenuList(0),
1225 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1226 fInstanceCount(0), fOnHeap(0),
1227 fCheckSum(0), fCollectionProxy(0), fClassVersion(0), fClassInfo(0),
1228 fTypeInfo(0), fShowMembers(0),
1229 fStreamer(0), fIsA(0), fGlobalIsA(0), fIsAMethod(0),
1230 fMerge(0), fResetAfterMerge(0), fNew(0), fNewArray(0), fDelete(0), fDeleteArray(0),
1231 fDestructor(0), fDirAutoAdd(0), fStreamerFunc(0), fConvStreamerFunc(0), fSizeof(-1),
1232 fCanSplit(-1), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1233 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1235 fCurrentInfo(0), fLastReadInfo(0), fRefProxy(0),
1236 fSchemaRules(0), fStreamerImpl(&
TClass::StreamerDefault)
1239 Init(
name,cversion, 0, 0, dfil, ifil, dl, il, 0, silent);
1248 const char *dfil,
const char *ifil,
Int_t dl,
Int_t il,
1252 fStreamerInfo(0), fConversionStreamerInfo(0), fRealData(0),
1253 fBase(0), fData(0), fEnums(0), fFuncTemplate(0), fMethod(0), fAllPubData(0),
1256 fDeclFileName(
""), fImplFileName(
""), fDeclFileLine(0), fImplFileLine(0),
1257 fInstanceCount(0), fOnHeap(0),
1258 fCheckSum(0), fCollectionProxy(0), fClassVersion(0), fClassInfo(0),
1259 fTypeInfo(0), fShowMembers(0),
1260 fStreamer(0), fIsA(0), fGlobalIsA(0), fIsAMethod(0),
1261 fMerge(0), fResetAfterMerge(0), fNew(0), fNewArray(0), fDelete(0), fDeleteArray(0),
1262 fDestructor(0), fDirAutoAdd(0), fStreamerFunc(0), fConvStreamerFunc(0), fSizeof(-1),
1263 fCanSplit(-1), fProperty(0), fClassProperty(0), fHasRootPcmInfo(
kFALSE), fCanLoadClassInfo(
kFALSE),
1264 fIsOffsetStreamerSet(
kFALSE), fVersionUsed(
kFALSE), fRuntimeProperties(0), fOffsetStreamer(0), fStreamerType(
TClass::
kDefault),
1265 fState(kHasTClassInit),
1266 fCurrentInfo(0), fLastReadInfo(0), fRefProxy(0),
1267 fSchemaRules(0), fStreamerImpl(&
TClass::StreamerDefault)
1271 Init(
name, cversion, &info, isa, dfil, ifil, dl, il, 0, silent);
1289 info->
Clear(
"build");
1305 const char *dfil,
const char *ifil,
Int_t dl,
Int_t il,
1306 ClassInfo_t *givenInfo,
1310 ::Fatal(
"TClass::TClass",
"ROOT system not initialized");
1312 ::Error(
"TClass::Init",
"The name parameter is invalid (null or empty)");
1346 TClass **persistentRef = 0;
1364 info->
Clear(
"build");
1383 ::Fatal(
"TClass::Init",
"gInterpreter not initialized");
1386 bool invalid = !
gInterpreter->ClassInfo_IsValid(givenInfo);
1387 bool notloaded = !
gInterpreter->ClassInfo_IsLoaded(givenInfo);
1388 auto property =
gInterpreter->ClassInfo_Property(givenInfo);
1390 if (invalid || (notloaded && (property &
kIsNamespace)) ||
1453 ::Error(
"TClass::Init",
"no interpreter information for class %s is available even though it has a TClass "
1454 "initialization routine.",
1460 ::Warning(
"TClass::Init",
"no dictionary for class %s is available",
fName.Data());
1471 TString resolvedThis;
1472 if (!givenInfo && strchr (
name,
'<')) {
1484 if (resolvedThis !=
name) {
1508 if (resolvedThis !=
fName) {
1509 oldcl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(resolvedThis);
1510 if (oldcl && oldcl !=
this) {
1517 if (resolvedThis != htmp->String())
continue;
1518 oldcl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(htmp->fOrigName);
1519 if (oldcl && oldcl !=
this) {
1537 if (persistentRef) {
1544 if ( isStl || !strncmp(
GetName(),
"stdext::hash_",13) || !strncmp(
GetName(),
"__gnu_cxx::hash_",16) ) {
1555 }
else if (!silent) {
1556 Warning(
"Init",
"Collection proxy for %s was not properly initialized!",
GetName());
1562 }
else if (!strncmp(
GetName(),
"std::pair<",10) || !strncmp(
GetName(),
"pair<",5) ) {
1582 if (resolvedThis == htmp->String() && htmp->fOrigName ==
GetName()) {
1649 std::map<std::string, TObjArray*>::iterator it;
1650 std::map<std::string, TObjArray*>::iterator end = (*fConversionStreamerInfo).end();
1651 for( it = (*fConversionStreamerInfo).begin(); it != end; ++it ) {
1661 Int_t ReadRulesContent(FILE *
f)
1673 while ((
c = fgetc(
f)) != EOF) {
1679 if (rule.Length() > 0) {
1731 static const char *suffix =
"class.rules";
1732 TString sname = suffix;
1737 FILE *
f = fopen(sname,
"r");
1739 res = ReadRulesContent(
f);
1742 ::Error(
"TClass::ReadRules()",
"Cannot find rules file %s", sname.Data());
1755 if (!filename || !filename[0]) {
1756 ::Error(
"TClass::ReadRules",
"no file name specified");
1760 FILE *
f = fopen(filename,
"r");
1762 ::Error(
"TClass::ReadRules",
"Failed to open %s\n",filename);
1765 Int_t count = ReadRulesContent(
f);
1818 ::Warning(
"TClass::AddRule",
"The rule for class: \"%s\": version, \"%s\" and data members: \"%s\" has been skipped because it conflicts with one of the other rules (%s).",
1879 TAutoInspector insp(
b);
1880 obj->ShowMembers(insp);
1901 }
else if (actual !=
this) {
1902 return actual->
Browse(obj,
b);
1908 TAutoInspector insp(
b);
1951 isTransient =
kTRUE;
1956 TMmallocDescTemp setreset;
1967 static TClassRef clRefString(
"std::string");
1968 if (clRefString ==
this) {
1977 && strncmp(
GetName(),
"pair<", 5) != 0) {
1978 Error(
"BuildRealData",
"Inspection for %s not supported!",
GetName());
1984 TBuildRealData brd(pointer,
this);
1990 if ( isTransient ) {
1998 Error(
"BuildRealData",
"Cannot find any ShowMembers function for %s!",
GetName());
2013 c->BuildRealData(0, isTransient);
2033 Error(
"BuildEmulatedRealData",
"Missing StreamerInfo for %s",
GetName());
2099 TMmallocDescTemp setreset;
2126 if (strcmp(
GetName(),
"string") == 0) {
2134 gInterpreter->InspectMembers(insp, obj,
this, isTransient);
2138 sinfo->CallShowMembers(obj, insp, isTransient);
2153 return gInterpreter->InspectMembers(insp, obj,
this, isTransient);
2217 }
else if (!
c->CanSplitBaseAllow()) {
2261 static TClassRef stdStringClass(
"std::string");
2326 if (new_name == 0 || new_name[0]==
'\0' ||
fName == new_name) {
2327 Error(
"Clone",
"The name of the class must be changed when cloning a TClass object.");
2357 copy->
fName = new_name;
2412 if (!padsav || !opt.Contains(
"same")) {
2415 gROOT->ProcessLine(
"new TCanvas(\"R__class\",\"class\",20,20,1000,750);");
2421 if (
gPad)
gPad->DrawClassObject(
this,option);
2423 if (padsav) padsav->
cd();
2464 if (
sizeof(
this) == 4)
2467 Printf(
"==> Dumping object at: 0x%016lx, name=%s, class=%s\n",prObj,tobj->
GetName(),
GetName());
2470 if (
sizeof(
this) == 4)
2471 Printf(
"==> Dumping object at: 0x%08lx, class=%s\n",prObj,
GetName());
2473 Printf(
"==> Dumping object at: 0x%016lx, class=%s\n",prObj,
GetName());
2476 TDumpMembers dm(noAddr);
2478 Info(
"Dump",
"No ShowMembers function, dumping disabled");
2488 static const UInt_t maxsize = 255;
2489 static char name[maxsize+2];
2493 for (
UInt_t i = 0; i < nch && icur < maxsize; ++i, ++icur) {
2494 if (
text[i] ==
'\"' ||
text[i] ==
'[' ||
text[i] ==
'~' ||
2497 text[i] ==
'?' ||
text[i] ==
'>') {
2527 if (
object==0)
return (
TClass*)
this;
2529 return (*
fIsA)(object);
2540 return realTObject->IsA();
2557 return (*
fIsA)(object);
2575 if (strcmp(
GetName(), classname) == 0)
return this;
2594 if (cl ==
this)
return this;
2606 if (cl ==
c)
return c;
2607 c1 =
c->GetBaseClass(cl);
2625 if (cl ==
this)
return 0;
2627 if (!
fBase.load()) {
2634 if (!sinfo)
return -1;
2640 for(
Int_t i=0; i<size; i++) {
2646 if (!baseclass)
return -1;
2648 if (subOffset == -2)
return -2;
2649 if (subOffset != -1)
return offset+subOffset;
2650 offset += baseclass->
Size();
2654 if (!baseclass)
return -1;
2656 if (subOffset == -2)
return -2;
2657 if (subOffset != -1)
return offset+subOffset;
2658 offset += baseclass->
Size();
2661 Error(
"GetBaseClassOffsetRecurse",
"Unexpected element type for base class: %s\n",element->IsA()->
GetName());
2673 if (
fBase.load() == 0)
2676 lnk =
fBase.load()->FirstLink();
2692 off =
c->GetBaseClassOffsetRecurse(cl);
2693 if (off == -2)
return -2;
2712 if (
this == toBase)
return 0;
2728 if(derived && base) {
2750 if (dm)
return this;
2758 TClass *cdm =
c->GetBaseDataMember(datamember);
2759 if (cdm)
return cdm;
2770 struct TClassLocalStorage {
2771 TClassLocalStorage() : fCollectionProxy(0), fStreamer(0) {};
2776 static TClassLocalStorage *GetStorage(
const TClass *cl)
2782 if (*thread_ptr==0) *thread_ptr =
new TExMap();
2789 local = (
ULong_t)
new TClassLocalStorage();
2792 return (TClassLocalStorage*)local;
2820 TClassLocalStorage *local = TClassLocalStorage::GetStorage(
this);
2823 return local->fCollectionProxy;
2834 TClassLocalStorage *local = TClassLocalStorage::GetStorage(
this);
2836 if (local->fStreamer==0) {
2838 const std::type_info &orig = (
typeid(*fStreamer) );
2839 if (!local->fStreamer) {
2840 Warning(
"GetStreamer",
"For %s, the TClassStreamer (%s) passed's call to Generate failed!",
GetName(),orig.name());
2842 const std::type_info © = (
typeid(*local->fStreamer) );
2843 if (strcmp(orig.name(),copy.name())!=0) {
2844 Warning(
"GetStreamer",
"For %s, the TClassStreamer passed does not properly implement the Generate method (%s vs %s)\n",
GetName(),orig.name(),copy.name());
2848 return local->fStreamer;
2889 if (strstr(
name,
"(anonymous)"))
return 0;
2890 if (strncmp(
name,
"class ",6)==0)
name += 6;
2891 if (strncmp(
name,
"struct ",7)==0)
name += 7;
2893 if (!
gROOT->GetListOfClasses())
return 0;
2939 if (!cl && !load)
return 0;
2941 TClass *loadedcl = (dict)();
2951 std::string normalizedName;
2959 if (normalizedName !=
name) {
2960 cl = (
TClass*)
gROOT->GetListOfClasses()->FindObject(normalizedName.c_str());
2971 normalizedName = cl->
GetName();
2972 checkTable = load && (normalizedName !=
name);
2975 if (!load)
return 0;
3001 if (
TDataType* theDataType =
gROOT->GetType(normalizedName.c_str())){
3003 auto underlyingTypeName = theDataType->GetTypeName();
3006 if (underlyingTypeDict){
3007 loadedcl = underlyingTypeDict();
3013 if (loadedcl)
return loadedcl;
3017 if (loadedcl)
return loadedcl;
3030 std::string::size_type posLess = normalizedName.find(
'<');
3031 if (posLess != std::string::npos) {
3038 printf(
"TClass::GetClass: Header Parsing - The representation of %s was not found in the type system. A lookup in the interpreter is about to be tried: this can cause parsing. This can be avoided selecting %s in the linkdef/selection file.\n",normalizedName.c_str(), normalizedName.c_str());
3040 if (normalizedName.length()) {
3050 auto ci =
gInterpreter->ClassInfo_Factory(normalizedName.c_str());
3052 auto method =
gInterpreter->MethodInfo_Factory(funcDecl);
3053 typedef void (*tcling_callfunc_Wrapper_t)(
void *, int,
void **,
void *);
3054 auto funcPtr = (tcling_callfunc_Wrapper_t)
gInterpreter->MethodInfo_InterfaceMethod(method);
3058 funcPtr(0, 0,
nullptr, &res);
3070 std::string alternative;
3071 gInterpreter->GetInterpreterTypeName(normalizedName.c_str(), alternative,
kTRUE);
3072 const char *altname = alternative.c_str();
3073 if (strncmp(altname,
"std::", 5) == 0) {
3078 if (altname != normalizedName && strcmp(altname,
name) != 0) {
3105 if (!
gROOT->GetListOfClasses())
3113 if (cl && cl->
IsLoaded())
return cl;
3120 cl =
GetIdMap()->Find(typeinfo.name());
3139 if (!load)
return 0;
3149 TIter next(
gROOT->GetListOfClassGenerators());
3161 if (!autoload_old) {
3193 if (!
gROOT->GetListOfClasses())
return 0;
3214 if (!load)
return 0;
3217 if (cl) loadedcl =
gROOT->LoadClass(cl->
GetName(),silent);
3218 else loadedcl =
gROOT->LoadClass(
name,silent);
3220 if (loadedcl)
return loadedcl;
3245 if (!
gROOT->GetListOfClasses())
return 0;
3249 DeclIdMap_t::equal_range iter = map->Find(
id);
3250 if (iter.first == iter.second)
return false;
3251 std::vector<TClass*>::iterator vectIt = classes.begin();
3252 for (DeclIdMap_t::const_iterator it = iter.first; it != iter.second; ++it)
3253 vectIt = classes.insert(vectIt, it->second);
3281 || datamember == 0)
return 0;
3284 const char *start_name = datamember;
3285 while (*start_name ==
'*') ++start_name;
3290 if (
const char *
s = strchr(start_name,
'[')){
3292 TString
name(start_name,len);
3310 if (strchr(
name,
'[')==0) {
3352 std::string givenName(
name);
3355 std::string::size_type firstBracket = givenName.find_first_of(
"[");
3356 if (firstBracket != std::string::npos) {
3358 std::string nameNoDim(givenName.substr(0, firstBracket));
3362 std::string objName(obj->
GetName());
3363 std::string::size_type pos = objName.find_first_of(
"[");
3365 if (pos != std::string::npos) {
3367 if (objName == nameNoDim) {
3376 std::ostringstream ptrname;
3377 ptrname <<
"*" << givenName;
3384 std::string::size_type firstDot = givenName.find_first_of(
".");
3385 if (firstDot == std::string::npos) {
3396 std::string::size_type lastDot = givenName.find_last_of(
".");
3397 std::ostringstream starname;
3398 starname << givenName.substr(0, lastDot) <<
".*" << givenName.substr(lastDot + 1);
3406 std::string firstDotName(givenName.substr(firstDot + 1));
3420 std::string::size_type firstDotBracket = firstDotName.find_first_of(
"[");
3421 if (firstDotBracket != std::string::npos) {
3423 std::string nameNoDim(firstDotName.substr(0, firstDotBracket));
3427 std::string objName(obj->
GetName());
3428 std::string::size_type pos = objName.find_first_of(
"[");
3430 if (pos != std::string::npos) {
3432 if (objName == nameNoDim) {
3445 ptrname <<
"*" << firstDotName;
3461 std::string::size_type bracket = starname.str().find_first_of(
"[");
3462 if (bracket == std::string::npos) {
3507 if (!
fBase.load()) {
3532 Fatal(
"GetListOfBases",
"gInterpreter not initialized");
3535 if (!
fBase.load()) {
3561 auto temp =
fEnums.load();
3563 if (requestListLoading) {
3578 if (!requestListLoading) {
3585 static bool fromRootCling = dlsym(RTLD_DEFAULT,
"usedToIdentifyRootClingByDlSym");
3670 if (
gDebug>0)
Info(
"GetListOfMethods",
"Header Parsing - Asking for all the methods of class %s: this can involve parsing.",
GetName());
3703 if (
gDebug>0)
Info(
"GetListOfAllPublicMethods",
"Header Parsing - Asking for all the methods of class %s: this can involve parsing.",
GetName());
3733 while ((baseClass = (
TBaseClass *) nextBase())) {
3741 while ((method = (
TMethod*)next())) {
3747 if (
m &&
m->GetNargs() == method->
GetNargs())
3772 return cl->IsLoaded();
3800 TIter nextMemb(ldm);
3831 for (
int i = 0; i < 2; i++) {
3847 if (
this == sCIString)
return;
3859 auto checkDicts = [&](
const string &clName){
3866 if (cl && !cl->HasDictionary()) {
3867 cl->GetMissingDictionariesWithRecursionCheck(result, visited, recurse);
3871 const auto &elements = splitType.
fElements;
3872 const auto &templName = elements[0];
3875 if (templName ==
"pair") {
3883 if (templName ==
"unique_ptr" || templName ==
"array") {
3884 checkDicts(elements[1]);
3891 if (templName ==
"tuple") {
3894 const auto nTemplArgs = elements.size() - 1;
3896 for (
auto iTemplArg = 1U; iTemplArg < nTemplArgs; ++iTemplArg) {
3897 checkDicts(elements[iTemplArg]);
3946 if (
this == sCIString)
return;
3950 if (strncmp(
fName,
"pair<", 5) == 0) {
4005 while ((acl = (
TClass*)nextClass())) {
4006 if (acl == newcl)
continue;
4011 info->
Update(
this, newcl);
4015 TIter delIter( &tobedeleted );
4016 while ((acl = (
TClass*)delIter())) {
4029 Warning(
"ResetClassInfo(Long_t tagnum)",
"Call to deprecated interface (does nothing)");
4080 (*fMethod).Unload();
4114 if (options==0 || options[0]==0)
return;
4116 if (strstr(options,
"streamerinfo")!=0) {
4120 std::map<std::string, TObjArray*>::iterator it;
4121 std::map<std::string, TObjArray*>::iterator end = (*fConversionStreamerInfo).end();
4122 for( it = (*fConversionStreamerInfo).begin(); it != end; ++it ) {
4123 it->second->ls(options);
4150 TIter next(methodList);
4152 while ((method = (
TMethod*) next())) {
4154 if (classPtr != method->
GetClass()) {
4162 TIter nextarg(margsList);
4163 while ((methodArg = (
TMethodArg*)nextarg())) {
4166 if (sig.Length()!=0) sig.Remove(0,1);
4213 if(
fMethod.compare_exchange_strong(expected, temp.get()) ) {
4249 m =
c->GetMethodAllAny(method);
4271 Fatal(
"GetMethod",
"gInterpreter not initialized");
4277 if (!decl)
return 0;
4284 "\nDid not find matching TMethod <%s> with \"%s\" %sfor %s",
4285 method,params,objectIsConst ?
"const " :
"",
GetName());
4295 return static_cast<TMethod *
>(method);
4299 if (
TFunction* method = base->FindClassOrBaseMethodWithId(declId))
4300 return static_cast<TMethod *
>(method);
4317 Fatal(
"GetMethodWithPrototype",
"gInterpreter not initialized");
4321 objectIsConst, mode);
4323 if (!decl)
return 0;
4326 Error(
"GetMethodWithPrototype",
4327 "\nDid not find matching TMethod <%s> with \"%s\" %sfor %s",
4328 method,
proto,objectIsConst ?
"const " :
"",
GetName());
4343 if (faddr == (
Long_t)
m->InterfaceMethod())
4362 Fatal(
"GetClassMethod",
"gInterpreter not initialized");
4368 if (!decl)
return 0;
4388 Fatal(
"GetClassMethodWithPrototype",
"gInterpreter not initialized");
4395 if (!decl)
return 0;
4487 Error(
"GetStreamerInfo",
"class: %s, attempting to access a wrong version: %d",
GetName(), version);
4506 TMmallocDescTemp setreset;
4560 newname +=
"@@emulated";
4585 for (
Int_t i = -1; sinfo == 0 && i < ninfos; ++i)
4598 Error(
"GetStreamerInfoAbstractEmulated",
"could not create TVirtualStreamerInfo");
4623 newname +=
"@@emulated";
4638 if (!sinfo && (checksum !=
fCheckSum)) {
4648 for (
Int_t i = -1; sinfo == 0 && i < ninfos; ++i)
4661 Error(
"GetStreamerInfoAbstractEmulated",
"could not create TVirtualStreamerInfo");
4708 Error(
"IgnoreTObjectStreamer",
"Must be called before the creation of StreamerInfo");
4734 if (cl ==
this)
return kTRUE;
4744 if (!clbase)
return kFALSE;
4763 if (cl ==
this)
return obj;
4770 return (
void*)((
Long_t)obj+off);
4772 return (
void*)((
Long_t)obj-off);
4838 Error(
"New",
"cannot create object of class %s",
GetName());
4854 Error(
"New",
"cannot create object of class %s",
GetName());
4865 Error(
"New",
"cannot create object of class %s",
GetName());
4886 if (!sinfo && !quiet) {
4905 Error(
"New",
"Failed to construct class '%s' using streamer info",
GetName());
4908 Fatal(
"New",
"This cannot happen!");
4932 Error(
"New with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
4947 Error(
"New with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
4975 Error(
"New with placement",
"Cannot construct class '%s' version %d at address %p, no streamer info available!",
GetName(),
fClassVersion, arena);
4980 p = sinfo->
New(arena);
4994 Error(
"New with placement",
"This cannot happen!");
5081 Error(
"NewArray",
"This cannot happen!");
5105 Error(
"NewArray with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
5120 Error(
"NewArray with placement",
"cannot create object of class %s version %d at address %p",
GetName(),
fClassVersion, arena);
5148 Error(
"NewArray with placement",
"Cannot construct class '%s' version %d at address %p, no streamer info available!",
GetName(),
fClassVersion, arena);
5153 p = sinfo->
NewArray(nElements, arena);
5172 Error(
"NewArray with placement",
"This cannot happen!");
5184 if (obj == 0)
return;
5191 }
else if ((!dtorOnly) &&
fDelete) {
5223 std::multiset<Version_t> knownVersions;
5236 knownVersions.insert(ver);
5244 if (!inRepo || verFound) {
5251 Error(
"Destructor",
"No streamer info available for class '%s' version %d at address %p, cannot destruct emulated object!",
GetName(),
fClassVersion, p);
5257 Error(
"Destructor",
"Doing Dump() ...");
5272 Error(
"Destructor2",
"No streamer info available for class '%s' version %d, cannot destruct object at addr: %p",
GetName(), objVer, p);
5279 Error(
"Destructor2",
"Doing Dump() ...");
5287 if (inRepo && verFound && p) {
5291 Error(
"Destructor",
"This cannot happen! (class %s)",
GetName());
5301 if (ary == 0)
return;
5308 Error(
"DeleteArray",
"Destructor only is not supported!");
5337 std::multiset<Version_t> knownVersions;
5348 knownVersions.insert(ver);
5356 if (!inRepo || verFound) {
5363 Error(
"DeleteArray",
"No streamer info available for class '%s' version %d at address %p, cannot destruct object!",
GetName(),
fClassVersion, ary);
5369 Error(
"DeleteArray",
"Doing Dump() ...");
5378 Error(
"DeleteArray",
"Loaded class version %d is not registered for addr %p",
fClassVersion, p);
5387 Error(
"DeleteArray",
"No streamer info available for class '%s' version %d at address %p, cannot destruct object!",
GetName(), objVer, ary);
5394 Error(
"DeleteArray",
"Doing Dump() ...");
5405 if (inRepo && verFound && p) {
5409 Error(
"DeleteArray",
"This cannot happen! (class '%s')",
GetName());
5480 char *
s =
new char[maxsize];
5484 b.ReadString(
s, maxsize);
5485 while (strlen(
s) == (maxsize - 1)) {
5487 b.SetBufferOffset(pos);
5488 maxsize = 2*maxsize;
5490 s =
new char[maxsize];
5491 b.ReadString(
s, maxsize);
5496 ::Error(
"TClass::Load",
"dictionary of class %s not found",
s);
5520 if (result)
return result;
5568 TIter next(
gROOT->GetListOfClassGenerators());
5595 bool autoParse = !
gInterpreter->IsAutoParsingSuspended();
5609 ::Error(
"TClass::LoadClassInfo",
"no interpreter information for class %s is available"
5610 " even though it has a TClass initialization routine.",
5633 const char *dfil,
const char *ifil,
5638 TMmallocDescTemp setreset;
5639 return new TClass(cname,
id, info, isa, dfil, ifil, dl, il);
5647 const char *dfil,
const char *ifil,
5652 TMmallocDescTemp setreset;
5653 return new TClass(cname,
id, dfil, ifil, dl, il);
5757 The class %s transitioned from not having a specified class version\n\
5758 to having a specified class version (the current class version is %d).\n\
5759 However too many different non-versioned layouts of the class have\n\
5760 already been loaded so far. To work around this problem you can\n\
5761 load fewer 'old' file in the same ROOT session or load the C++ library\n\
5762 describing the class %s before opening the files or increase the version\n\
5763 number of the class for example ClassDef(%s,%d).\n\
5764 Do not try to write objects with the current class definition,\n\
5765 the files might not be readable.\n",
5769 The StreamerInfo version %d for the class %s which was read\n\
5770 from a file previously opened has the same version as the active class\n\
5771 but a different checksum. You should update the version to ClassDef(%s,%d).\n\
5772 Do not try to write objects with the current class definition,\n\
5773 the files will not be readable.\n"
5818 TMmallocDescTemp setreset;
6033 Fatal(
"SetUnloaded",
"The TClass for %s is being unloaded when in state %d\n",
6058 (*fMethod).Unload();
6067 if (fState <= kForwardDeclared && fStreamerInfo->GetEntries() != 0) {
6160 //info is empty. Let's build the default Streamer descriptor
6162 char *temp = new char[10000];
6166 //add list of base classes
6167 TIter nextb(GetListOfBases());
6169 while ((base = (TBaseClass*) nextb())) {
6170 snprintf(local,100,"%s;",base->GetName());
6171 strlcat(temp,local,10000);
6174 //add list of data members and types
6175 TIter nextd(GetListOfDataMembers());
6176 while ((dm = (TDataMember *) nextd())) {
6177 if (dm->IsEnum()) continue;
6178 if (!dm->IsPersistent()) continue;
6179 Long_t property = dm->Property();
6180 if (property & kIsStatic) continue;
6181 TClass *acl = TClass::GetClass(dm->GetTypeName(),update);
6184 if (acl->GetClassVersion() == 0) continue;
6187 // dm->GetArrayIndex() returns an empty string if it does not
6189 const char * index = dm->GetArrayIndex();
6190 if (strlen(index)==0)
6191 snprintf(local,100,"%s %s;",dm->GetFullTypeName(),dm->GetName());
6193 snprintf(local,100,"%s %s[%s];",dm->GetFullTypeName(),dm->GetName(),index);
6194 strlcat(temp,local,10000);
6196 //fStreamerInfo = temp;
6285 for (
int i=0; i<il; i++)
id =
id*3+
name[i];
6294 TIter nextBase(tlb);
6303 for (
int i=0; i<il; i++)
id =
id*3+
name[i];
6306 Error(
"GetCheckSum",
"Calculating the checksum for (%s) requires the base class (%s) meta information to be available!",
6315 TList *tlm = ((
TClass*)
this)->GetListOfDataMembers();
6317 TIter nextMemb(tlm);
6333 for (i=0; i<il; i++)
id =
id*3+
name[i];
6345 type.ReplaceAll(
"ULong64_t",
"unsigned long long");
6346 type.ReplaceAll(
"Long64_t",
"long long");
6347 type.ReplaceAll(
"<signed char",
"<char");
6348 type.ReplaceAll(
",signed char",
",char");
6349 if (
type==
"signed char")
type =
"char";
6361 for (i=0; i<il; i++)
id =
id*3+
type[i];
6365 for (
int ii=0;ii<dim;ii++)
id =
id*3+tdm->
GetMaxIndex(ii);
6372 left = strstr(tdm->
GetTitle(),
"[");
6374 const char *right = strstr(left,
"]");
6377 while (left != right) {
6469 return b.ReadClassBuffer(
this,pointer,version,start,count);
6478 return b.ReadClassBuffer(
this,pointer);
6490 b.WriteClassBuffer(
this,pointer);
6503 streamer->
Stream(
b,
object,onfile_class);
6535 if (
b.IsReading()) {
6536 b.ReadClassEmulated(pThis,
object, onfile_class);
6538 b.WriteClassBuffer(pThis,
object);
6569 if (
b.IsReading()) {
6570 b.ReadClassBuffer(pThis,
object, onfile_class);
6574 b.WriteClassBuffer(pThis,
object);
6593 pThis->
Fatal(
"StreamerDefault",
"fStreamerImpl not properly initialized (%d)", pThis->
fStreamerType);
6755 for (
Int_t i=-1;i<ninfos;++i) {
6777 for (
Int_t i=-1;i<ninfos;i++) {
6781 if (!info)
continue;
6822 std::map<std::string, TObjArray*>::iterator it;
6825 it = (*fConversionStreamerInfo).find( cl->
GetName() );
6827 if( it != (*fConversionStreamerInfo).end() ) {
6831 if( arr && version > -1 && version < arr->GetSize() && arr->
At( version ) )
6843 if( version >= -1 && version < clSI->GetSize() )
6881 (*fConversionStreamerInfo)[cl->
GetName()] = arr;
6920 std::map<std::string, TObjArray*>::iterator it;
6924 it = (*fConversionStreamerInfo).find( cl->
GetName() );
6926 if( it != (*fConversionStreamerInfo).end() ) {
6975 (*fConversionStreamerInfo)[cl->
GetName()] = arr;
6994 Error(
"RegisterStreamerInfo",
6995 "Register StreamerInfo for %s on non-empty slot (%d).",
7035 static const char *handVerified[] = {
7036 "TEnvRec",
"TDataType",
"TObjArray",
"TList",
"THashList",
7037 "TClass",
"TCling",
"TInterpreter",
"TMethod",
"ROOT::Internal::TCheckHashRecursiveRemoveConsistency",
7038 "TCheckHashRecursiveRemoveConsistency",
"TGWindow",
7039 "TDirectory",
"TDirectoryFile",
"TObject",
"TH1",
7040 "TQClass",
"TGlobal" };
7042 if (cname && cname[0]) {
7043 for (
auto cursor : handVerified) {
7044 if (strcmp(cname, cursor) == 0)
TClass *(* DictFuncPtr_t)()
void(* MemberStreamerFunc_t)(TBuffer &, void *, Int_t)
TClass *(* IsAGlobalFunc_t)(const TClass *, const void *obj)
void(* ClassStreamerFunc_t)(TBuffer &, void *)
void(* ClassConvStreamerFunc_t)(TBuffer &, void *, const TClass *)
R__EXTERN TClassTable * gClassTable
TVirtualMutex * gInterpreterMutex
static TVirtualMutex * gOVRMutex
static void UnregisterAddressInRepository(const char *, void *location, const TClass *what)
static void RegisterAddressInRepository(const char *, void *location, const TClass *what)
TClass::ENewType & TClass__GetCallingNew()
std::multimap< void *, ObjRepoValue > RepoCont_t
static RepoCont_t gObjectVersionRepository
static void MoveAddressInRepository(const char *, void *oldadd, void *newadd, const TClass *what)
ROOT::TMapDeclIdToTClass DeclIdMap_t
ROOT::TMapTypeToTClass IdMap_t
const Bool_t kIterBackward
R__EXTERN TInterpreter * gCling
R__EXTERN TVirtualMutex * gROOTMutex
typedef void((*Func_t)())
R__EXTERN TSystem * gSystem
R__EXTERN void **(* gThreadTsd)(void *, Int_t)
#define R__LOCKGUARD2(mutex)
#define R__LOCKGUARD(mutex)
#define R__WRITE_LOCKGUARD(mutex)
#define R__READ_LOCKGUARD(mutex)
Bool_t AddRule(TSchemaRule *rule, EConsistencyCheck checkConsistency=kCheckAll, TString *errmsg=0)
The consistency check always fails if the TClass object was not set! if checkConsistency is: kNoCheck...
void SetClass(TClass *cls)
Set the TClass associated with this rule set.
static bool Check(TClass &classRef)
A spin mutex-as-code-guard class.
Bool_t SetFromRule(const char *rule)
Set the content fot this object from the rule See TClass::AddRule for details on the syntax.
const char * GetTargetString() const
Get the target data members of this rule as a simple string (i.e. the in memory data member).
const char * GetVersion() const
Get the version string.
const char * GetTargetClass() const
Get the targte class of this rule (i.e. the in memory class).
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.
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
Objects following this interface can be passed onto the TROOT object to implement a user customized w...
virtual TClass * GetClass(const char *classname, Bool_t load)=0
TClassRef is used to implement a permanent reference to a TClass object.
virtual void Stream(TBuffer &b, void *objp, const TClass *onfileClass)
virtual TClassStreamer * Generate() const
ClassStreamerFunc_t fStreamer
static DictFuncPtr_t GetDict(const char *cname)
Given the class name returns the Dictionary() function of a class (uses hash of name).
static TProtoClass * GetProtoNorm(const char *cname)
Given the class normalized name returns the TClassProto object for the class.
static DictFuncPtr_t GetDictNorm(const char *cname)
Given the normalized class name returns the Dictionary() function of a class (uses hash of name).
~InsertTClassInRegistryRAII()
InsertTClassInRegistryRAII(TClass::EState &state, const char *name, TDeclNameRegistry &emuRegistry)
Bool_t HasDeclName(const char *name) const
void AddQualifiedName(const char *name)
Extract this part of the name.
TDeclNameRegistry(Int_t verbLevel=0)
TDeclNameRegistry class constructor.
std::atomic_flag fSpinLock
TNameMapNode(const char *typedf, const char *orig)
The ROOT global object gROOT contains a list of all defined classes.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
ShowMembersFunc_t fShowMembers
TDataMember * GetDataMember(const char *datamember) const
Return pointer to datamember object with name "datamember".
void ForceReload(TClass *oldcl)
we found at least one equivalent.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
ROOT::DelArrFunc_t fDeleteArray
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
TClassStreamer * fStreamer
void SetDirectoryAutoAdd(ROOT::DirAutoAdd_t dirAutoAddFunc)
Install a new wrapper around the directory auto add function.
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
void * NewArray(Long_t nElements, ENewType defConstructor=kClassNew) const
Return a pointer to a newly allocated array of objects of this class.
static TDeclNameRegistry fNoInfoOrEmuOrFwdDeclNameRegistry
TListOfFunctionTemplates * fFuncTemplate
ClassStreamerFunc_t fStreamerFunc
void AdoptReferenceProxy(TVirtualRefProxy *proxy)
Adopt the Reference proxy pointer to indicate that this class represents a reference.
TVirtualStreamerInfo * DetermineCurrentStreamerInfo()
Determine and set pointer to current TVirtualStreamerInfo.
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
void AdoptMemberStreamer(const char *name, TMemberStreamer *strm)
Adopt the TMemberStreamer pointer to by p and use it to Stream non basic member name.
void ResetInstanceCount()
ClassStreamerFunc_t GetStreamerFunc() const
Get a wrapper/accessor function around this class custom streamer (member function).
void RemoveStreamerInfo(Int_t slot)
Remove and delete the StreamerInfo in the given slot.
void SetCanSplit(Int_t splitmode)
Set the splitability of this class:
TObject * Clone(const char *newname="") const
Create a Clone of this TClass object using a different name but using the same 'dictionary'.
TVirtualStreamerInfo * GetStreamerInfoAbstractEmulated(Int_t version=0) const
For the case where the requestor class is emulated and this class is abstract, returns a pointer to t...
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
void SetMerge(ROOT::MergeFunc_t mergeFunc)
Install a new wrapper around 'Merge'.
ConvSIMap_t fConversionStreamerInfo
ROOT::DirAutoAdd_t fDirAutoAdd
Bool_t HasDataMemberInfo() const
TVirtualRefProxy * fRefProxy
cached streamer info used in the last read.
TList * GetMenuList() const
Return the list of menu items associated with the class.
ROOT::MergeFunc_t fMerge
saved info to call a IsA member function
TMethod * GetMethod(const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Find the best method (if there is one) matching the parameters.
virtual void Browse(TBrowser *b)
This method is called by a browser to get the class information.
static TClass * Load(TBuffer &b)
Load class description from I/O buffer and return class object.
EState fState
cached of the streaming method to use
ROOT::DesFunc_t GetDestructor() const
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
void CopyCollectionProxy(const TVirtualCollectionProxy &)
Copy the argument.
Int_t fStreamerType
saved info to call Streamer
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
std::atomic< TList * > fBase
Bool_t HasDictionary() const
Check whether a class has a dictionary or not.
Long_t GetDataMemberOffset(const char *membername) const
return offset for member name.
const TList * GetListOfAllPublicMethods(Bool_t load=kTRUE)
Returns a list of all public methods of this class and its base classes.
TMethod * GetClassMethod(Long_t faddr)
Look for a method in this class that has the interface function address faddr.
TList * GetListOfAllPublicDataMembers(Bool_t load=kTRUE)
Returns a list of all public data members of this class and its base classes.
void BuildEmulatedRealData(const char *name, Long_t offset, TClass *cl)
Build the list of real data for an emulated class.
static void AddClassToDeclIdMap(TDictionary::DeclId_t id, TClass *cl)
static: Add a TClass* to the map of classes.
virtual ~TClass()
TClass dtor. Deletes all list that might have been created.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
std::atomic< TVirtualStreamerInfo * > fCurrentInfo
Current 'state' of the class (Emulated,Interpreted,Loaded)
TList * GetListOfFunctionTemplates(Bool_t load=kTRUE)
Return list containing the TEnums of a class.
void * DynamicCast(const TClass *base, void *obj, Bool_t up=kTRUE)
Cast obj of this class type up to baseclass cl if up is true.
const char * fImplFileName
void RegisterStreamerInfo(TVirtualStreamerInfo *info)
Register the StreamerInfo in the given slot, change the State of the TClass as appropriate.
std::atomic< UInt_t > fCheckSum
std::atomic< TListOfFunctions * > fMethod
static void RemoveClassDeclId(TDictionary::DeclId_t id)
void SetNewArray(ROOT::NewArrFunc_t newArrayFunc)
Install a new wrapper around 'new []'.
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.
const char * fDeclFileName
void SetCollectionProxy(const ROOT::Detail::TCollectionProxyInfo &)
Create the collection proxy object (and the streamer object) from using the information in the TColle...
static Bool_t HasDictionarySelection(const char *clname)
Check whether a class has a dictionary or ROOT can load one.
void AdoptSchemaRules(ROOT::Detail::TSchemaRuleSet *rules)
Adopt a new set of Data Model Evolution rules.
static void StreamerInstrumented(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of instrumented class with a library.
TVirtualStreamerInfo * SetStreamerInfo(Int_t version, const char *info="")
Info is a string describing the names and types of attributes written by the class Streamer function.
static std::atomic< Int_t > fgClassCount
TVirtualStreamerInfo * GetCurrentStreamerInfo()
ROOT::DirAutoAdd_t GetDirectoryAutoAdd() const
void AddImplFile(const char *filename, int line)
TCollection * GetListOfMethodOverloads(const char *name) const
Return the collection of functions named "name".
std::atomic< TListOfEnums * > fEnums
static Bool_t HasNoInfoOrEmuOrFwdDeclaredDecl(const char *)
TList * GetListOfEnums(Bool_t load=kTRUE)
Return a list containing the TEnums of a class.
Bool_t IsStartingWithTObject() const
Returns true if this class inherits from TObject and if the start of the TObject parts is at the very...
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
Int_t GetNmethods()
Return the number of methods of this class Note that in case the list of methods is not yet created,...
std::atomic< Bool_t > fIsOffsetStreamerSet
Indicates whether the ClassInfo is supposed to be available.
void IgnoreTObjectStreamer(Bool_t ignore=kTRUE)
When the class kIgnoreTObjectStreamer bit is set, the automatically generated Streamer will not call ...
TClassStreamer * GetStreamer() const
Return the Streamer Class allowing streaming (if any).
static IdMap_t * GetIdMap()
void SetDelete(ROOT::DelFunc_t deleteFunc)
Install a new wrapper around 'delete'.
static Int_t AutoBrowse(TObject *obj, TBrowser *browser)
Browse external object inherited from TObject.
ROOT::NewFunc_t GetNew() const
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
Int_t GetNdata()
Return the number of data members of this class Note that in case the list of data members is not yet...
void SetDestructor(ROOT::DesFunc_t destructorFunc)
Install a new wrapper around the destructor.
Bool_t HasDefaultConstructor() const
virtual void PostLoadCheck()
Do the initialization that can only be done after the CINT dictionary has been fully populated and ca...
void LoadClassInfo() const
Try to load the ClassInfo if available.
void SetResetAfterMerge(ROOT::ResetAfterMergeFunc_t resetFunc)
Install a new wrapper around 'ResetAfterMerge'.
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...
TViewPubFunctions * fAllPubMethod
Bool_t HasInterpreterInfo() const
static void AddClass(TClass *cl)
static: Add a class to the list and map of classes.
void GetMissingDictionariesForBaseClasses(TCollection &result, TCollection &visited, bool recurse)
Verify the base classes always.
ROOT::Detail::TSchemaRuleSet * fSchemaRules
Pointer to reference proxy if this class represents a reference.
std::atomic< Long_t > fProperty
Indicates whether this class can be split or not.
static void StreamerDefault(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Default streaming in cases where either we have no way to know what to do or if Property() has not ye...
void SetUnloaded()
Call this method to indicate that the shared library containing this class's code has been removed (u...
ROOT::DelArrFunc_t GetDeleteArray() const
Bool_t HasInterpreterInfoInMemory() const
ClassConvStreamerFunc_t fConvStreamerFunc
void SetRuntimeProperties()
Internal routine to set calculate the class properties that can only be known at run-time,...
static TClass * LoadClass(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
const std::type_info * GetTypeInfo() const
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
void Move(void *arenaFrom, void *arenaTo) const
Register the fact that an object was moved from the memory location 'arenaFrom' to the memory locatio...
static DeclIdMap_t * GetDeclIdMap()
Short_t GetDeclFileLine() const
void SetStreamerFunc(ClassStreamerFunc_t strm)
Set a wrapper/accessor function around this class custom streamer.
const char * GetImplFileName() const
TList * GetListOfRealData() const
Int_t Size() const
Return size of object of this class.
void SetCurrentStreamerInfo(TVirtualStreamerInfo *info)
Set pointer to current TVirtualStreamerInfo.
static DictFuncPtr_t GetDict(const char *cname)
Return a pointer to the dictionary loading function generated by rootcint.
ROOT::NewArrFunc_t GetNewArray() const
static void StreamerTObjectEmulated(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of TObjects when we do not have the library defining the class.
ROOT::ResetAfterMergeFunc_t GetResetAfterMerge() const
TMethod * GetClassMethodWithPrototype(const char *name, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
Bool_t CanIgnoreTObjectStreamer()
void SetGlobalIsA(IsAGlobalFunc_t)
This function installs a global IsA function for this class.
void GetMissingDictionariesForMembers(TCollection &result, TCollection &visited, bool recurse)
Verify the Data Members.
TObjArray * fStreamerInfo
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
TVirtualCollectionProxy * fCollectionProxy
static ENewType IsCallingNew()
Static method returning the defConstructor flag passed to TClass::New().
void ls(Option_t *opt="") const
The ls function lists the contents of a class on stdout.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
void Store(TBuffer &b) const
Store class description on I/O buffer.
void InterpretedShowMembers(void *obj, TMemberInspector &insp, Bool_t isTransient)
Do a ShowMembers() traversal of all members and base classes' members using the reflection informatio...
static THashTable * fgClassTypedefHash
void Init(const char *name, Version_t cversion, const std::type_info *info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il, ClassInfo_t *classInfo, Bool_t silent)
Initialize a TClass object.
static void StreamerStreamerInfo(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of where we should directly use the StreamerInfo.
const TObjArray * GetStreamerInfos() const
void SetClassVersion(Version_t version)
Private function.
char * EscapeChars(const char *text) const
Introduce an escape character (@) in front of a special chars.
const std::type_info * fTypeInfo
std::atomic< TVirtualStreamerInfo * > fLastReadInfo
cached current streamer info.
static void StreamerTObject(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of TObjects.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
static Bool_t AddRule(const char *rule)
Add a schema evolution customization rule.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
static void RemoveClass(TClass *cl)
static: Remove a class from the list and map of classes
Bool_t HasLocalHashMember() const
void DeleteArray(void *ary, Bool_t dtorOnly=kFALSE)
Explicitly call operator delete[] for an array.
ClassConvStreamerFunc_t GetConvStreamerFunc() const
Get a wrapper/accessor function around this class custom conversion streamer (member function).
Bool_t IsForeign() const
Return kTRUE is the class is Foreign (the class does not have a Streamer method).
ClassInfo_t * GetClassInfo() const
TViewPubDataMembers * fAllPubData
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
void Dump() const
Dump contents of object on stdout.
Bool_t HasConsistentHashMember()
Return 'true' if we can guarantee that if this class (or any class in this class inheritance hierarch...
void AdoptStreamer(TClassStreamer *strm)
Adopt a TClassStreamer object.
TClass * GetBaseDataMember(const char *datamember)
Return pointer to (base) class that contains datamember.
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
Long_t fOffsetStreamer
Properties that can only be evaluated at run-time.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
void ResetCaches()
To clean out all caches.
std::atomic< Bool_t > fVersionUsed
saved remember if fOffsetStreamer has been set.
Long_t ClassProperty() const
Return the C++ property of this class, eg.
void SetStreamerImpl()
Internal routine to set fStreamerImpl based on the value of fStreamerType.
const char * GetSharedLibs()
Get the list of shared libraries containing the code for class cls.
void CalculateStreamerOffset() const
Calculate the offset between an object of this class to its base class TObject.
void GetMissingDictionariesForPairElements(TCollection &result, TCollection &visited, bool recurse)
void ReplaceWith(TClass *newcl) const
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
void SetNew(ROOT::NewFunc_t newFunc)
Install a new wrapper around 'new'.
void Draw(Option_t *option="")
Draw detailed class inheritance structure.
std::atomic< TMethodCall * > fIsAMethod
static Int_t ReadRules()
Read the class.rules files from the default location:.
Bool_t CanSplitBaseAllow()
Pointer to the function implementing streaming for this class.
std::atomic< StreamerImpl_t > fStreamerImpl
void SetContextMenuTitle(const char *title)
Change (i.e. set) the title of the TNamed.
void SetMemberStreamer(const char *name, MemberStreamerFunc_t strm)
Install a new member streamer (p will be copied).
std::atomic< TClass ** > fPersistentRef
IsAGlobalFunc_t fGlobalIsA
pointer to the class's IsA proxy.
TVirtualStreamerInfo * GetConversionStreamerInfo(const char *onfile_classname, Int_t version) const
Return a Conversion StreamerInfo from the class 'classname' for version number 'version' to this clas...
Short_t GetImplFileLine() const
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
std::atomic< UChar_t > fRuntimeProperties
TVirtualStreamerInfo * FindConversionStreamerInfo(const char *onfile_classname, UInt_t checksum) const
Return a Conversion StreamerInfo from the class 'classname' for the layout represented by 'checksum' ...
Int_t GetBaseClassOffsetRecurse(const TClass *toBase)
Return data member offset to the base class "cl".
ROOT::DelFunc_t GetDelete() const
static TClass * LoadClassDefault(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
void SetClassSize(Int_t sizof)
TMethod * FindClassOrBaseMethodWithId(DeclId_t faddr)
Find a method with decl id in this class or its bases.
static void StreamerExternal(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
There is special streamer for the class.
Long_t fClassProperty
Property.
TString fContextMenuTitle
static void StreamerTObjectInitialized(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of TObjects when fIsOffsetStreamerSet is known to have been set.
static void ConvStreamerInstrumented(const TClass *pThis, void *object, TBuffer &b, const TClass *onfile_class)
Case of instrumented class with a library.
TListOfDataMembers * fData
std::atomic< Bool_t > fCanLoadClassInfo
Whether info was loaded from a root pcm.
void SetConvStreamerFunc(ClassConvStreamerFunc_t strm)
Set a wrapper/accessor function around this class custom conversion streamer.
TVirtualStreamerInfo * FindStreamerInfo(TObjArray *arr, UInt_t checksum) const
Find the TVirtualStreamerInfo in the StreamerInfos corresponding to checksum.
void GetMissingDictionaries(THashTable &result, bool recurse=false)
Get the classes that have a missing dictionary starting from this one.
void MakeCustomMenuList()
Makes a customizable version of the popup menu list, i.e.
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...
TMethod * GetMethodAny(const char *method)
Return pointer to method without looking at parameters.
TVirtualIsAProxy * GetIsAProxy() const
Return the proxy implementing the IsA functionality.
Version_t GetClassVersion() const
ROOT::MergeFunc_t GetMerge() const
ROOT::ResetAfterMergeFunc_t fResetAfterMerge
std::atomic< Bool_t > fHasRootPcmInfo
C++ Property of the class (is abstract, has virtual table, etc.)
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
TClass * GetActualClass(const void *object) const
Return a pointer the the real class of the object.
ROOT::DesFunc_t fDestructor
const char * GetDeclFileName() const
TRealData * GetRealData(const char *name) const
Return pointer to TRealData element with name "name".
void SetDeleteArray(ROOT::DelArrFunc_t deleteArrayFunc)
Install a new wrapper around 'delete []'.
TFunctionTemplate * GetFunctionTemplate(const char *name)
void ResetClassInfo()
Make sure that the current ClassInfo is up to date.
ROOT::NewArrFunc_t fNewArray
Int_t ReadBuffer(TBuffer &b, void *pointer, Int_t version, UInt_t start, UInt_t count)
Function called by the Streamer functions to deserialize information from buffer b into object at p.
void GetMissingDictionariesWithRecursionCheck(TCollection &result, TCollection &visited, bool recurse)
From the second level of recursion onwards it is different state check.
@ kHasCustomStreamerMember
TListOfFunctions * GetMethodList()
Return (create an empty one if needed) the list of functions.
void ResetMenuList()
Resets the menu list to it's standard value.
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.
Int_t WriteBuffer(TBuffer &b, void *pointer, const char *info="")
Function called by the Streamer functions to serialize object at p to buffer b.
static TClass * LoadClassCustom(const char *requestedname, Bool_t silent)
Helper function used by TClass::GetClass().
Collection abstract base class.
virtual void ls(Option_t *option="") const
List (ls) all objects in this collection.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void Add(TObject *obj)=0
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
const char * GetTrueTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Bool_t IsPersistent() const
Int_t GetArrayDim() const
Return number of array dimensions.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
Basic data type descriptor (datatype information is obtained from CINT).
Long_t Property() const
Get property description word. For meaning of bits see EProperty.
const char * AsString(void *buf) const
Return string containing value in buffer formatted according to the basic data type.
TString GetTypeName()
Get basic type of typedef, e,g.
static TDataType * GetDataType(EDataType type)
Given a EDataType type, get the TDataType* that represents it.
static void GetDateTime(UInt_t datetime, Int_t &date, Int_t &time)
Static function that returns the date and time.
This class defines an abstract interface that must be implemented by all classes that contain diction...
This class stores a (key,value) pair using an external hash.
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table.
Dictionary for function template This class describes one single function template.
Global functions class (global functions are obtained from CINT).
Int_t GetNargs() const
Number of function arguments.
THashTable implements a hash table to store TObject's.
TObject * Remove(TObject *obj)
Remove object from the hashtable.
const TList * GetListForObject(const char *name) const
Return the TList corresponding to object's name based hash value.
void Add(TObject *obj)
Add object to the hash table.
TObject * FindObject(const char *name) const
Find object using its name.
virtual Bool_t ClassInfo_HasMethod(ClassInfo_t *, const char *) const
virtual const char * DataMemberInfo_Name(DataMemberInfo_t *) const
virtual const char * DataMemberInfo_TypeName(DataMemberInfo_t *) const
virtual int DataMemberInfo_TypeSize(DataMemberInfo_t *) const
virtual Long_t ClassInfo_GetBaseOffset(ClassInfo_t *, ClassInfo_t *, void *=0, bool=true) const
virtual void * ClassInfo_New(ClassInfo_t *) const
virtual Bool_t ClassInfo_IsValid(ClassInfo_t *) const
virtual Int_t AutoParse(const char *cls)=0
virtual int SetClassAutoloading(int) const
virtual void ClassInfo_Delete(ClassInfo_t *) const
virtual void ClassInfo_DeleteArray(ClassInfo_t *, void *, bool) const
virtual Long_t ClassInfo_Property(ClassInfo_t *) const
virtual Bool_t ClassInfo_HasDefaultConstructor(ClassInfo_t *) const
virtual DataMemberInfo_t * DataMemberInfo_Factory(ClassInfo_t *=0) const
virtual int ClassInfo_Size(ClassInfo_t *) const
virtual const char * ClassInfo_FullName(ClassInfo_t *) const
virtual const char * ClassInfo_Title(ClassInfo_t *) const
virtual Long_t DataMemberInfo_TypeProperty(DataMemberInfo_t *) const
virtual int DataMemberInfo_Next(DataMemberInfo_t *) const
virtual Long_t DataMemberInfo_Property(DataMemberInfo_t *) const
virtual int DataMemberInfo_ArrayDim(DataMemberInfo_t *) const
virtual void DataMemberInfo_Delete(DataMemberInfo_t *) const
virtual int DataMemberInfo_MaxIndex(DataMemberInfo_t *, Int_t) const
TDictionary::DeclId_t DeclId_t
virtual Long_t ClassInfo_ClassProperty(ClassInfo_t *) const
virtual void ClassInfo_Destruct(ClassInfo_t *, void *) const
TIsAProxy implementation class.
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
virtual void Delete(Option_t *option="")
Delete all TDataMember object files.
void Unload()
Mark 'all func' as being unloaded.
void Load()
Load all the DataMembers known to the interpreter for the scope 'fClass' into this collection.
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
virtual TObject * FindObject(const char *name) const
Specialize FindObject to do search for the a function just by name or create it if its not already in...
void Load()
Load all the functions known to the interpreter for the scope 'fClass' into this collection.
virtual void Delete(Option_t *option="")
Delete all TFunction object files.
A collection of TFunction objects designed for fast access given a DeclId_t and for keep track of TFu...
TFunction * Get(DeclId_t id)
Return (after creating it if necessary) the TMethod or TFunction describing the function correspondin...
virtual TObject * FindObject(const TObject *obj) const
Find object using its hash value (returned by its Hash() member).
virtual TList * GetListForObject(const char *name) const
Return the set of overloads for this name, collecting all available ones.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual TObjLink * FirstLink() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void AddLast(TObject *obj)
Add object at the end of the list.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Abstract base class for accessing the data-members of a class.
virtual void Inspect(TClass *cl, const char *parent, const char *name, const void *addr)
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetFullTypeName() const
Get full type description of method argument, e.g.: "class TDirectory*".
Each ROOT class (see TClass) has a linked list of methods.
TClass * GetClass() const
EMenuItemKind IsMenuItem() const
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();.
virtual void ls(Option_t *option="") const
List TNamed name and title.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntriesFast() const
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
TObject * UncheckedAt(Int_t i) const
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Int_t GetLast() const
Return index of last object in array.
virtual TObject * RemoveAt(Int_t idx)
Remove object at index idx.
TObject * At(Int_t idx) const
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Collectable string class.
Mother of all ROOT objects.
virtual void Inspect() const
Dump contents of this object in a graphics canvas.
static void SetObjectStat(Bool_t stat)
Turn on/off tracking of objects in the TObjectTable.
virtual const char * GetName() const
Returns name of object.
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
R__ALWAYS_INLINE Bool_t IsZombie() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
static Bool_t GetObjectStat()
Get status of object stat flag.
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 SetUniqueID(UInt_t uid)
Set the unique object id.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Class used by TMap to store (key,value) pairs.
Persistent version of a TClass.
static const TString & GetEtcDir()
Get the sysconfig directory in the installation. Static utility function.
The TRealData class manages the effective list of all data members for a given class.
void AdoptStreamer(TMemberStreamer *p)
virtual const char * GetName() const
Returns name of object.
Long_t GetThisOffset() const
void SetIsObject(Bool_t isObject)
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual const char * GetFullName() const
Return element name including dimensions, if any Note that this function stores the name into a stati...
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
virtual Bool_t IsaPointer() const
const char * GetTypeName() const
virtual Bool_t IsBase() const
Return kTRUE if the element represent a base class.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
View implementing the TList interface and giving access all the TDictionary describing public data me...
void Load()
Load all the DataMembers known to the interpreter for the scope 'fClass' and all its bases classes.
void Delete(Option_t *option="")
Delete is not allowed in this class.
View implementing the TList interface and giving access all the TFunction describing public methods i...
void Load()
Load all the functions known to the interpreter for the scope 'fClass' and all its bases classes.
virtual Int_t GetProperties() const
virtual UInt_t Sizeof() const =0
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE) const
virtual void * New() const
virtual void DeleteArray(void *p, Bool_t dtorOnly=kFALSE) const
virtual TClass * GetValueClass() const =0
virtual void * At(UInt_t idx)=0
virtual Int_t GetCollectionType() const =0
virtual UInt_t Size() const =0
virtual void * NewArray(Int_t nElements) const
virtual TVirtualCollectionProxy * Generate() const =0
virtual Bool_t HasPointers() const =0
virtual void SetClass(TClass *cl)=0
This class implements a mutex interface.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
virtual void SetClass(TClass *classptr)=0
virtual TVirtualRefProxy * Clone() const =0
Abstract Interface class describing Streamer information for one class.
virtual void DeleteArray(void *p, Bool_t dtorOnly=kFALSE)=0
virtual TClassStreamer * GenEmulatedClassStreamer(const char *class_name, Bool_t silent)=0
Bool_t IsCompiled() const
virtual void BuildCheck(TFile *file=0)=0
virtual TVirtualStreamerInfo * NewInfo(TClass *cl)=0
virtual TClass * GetActualClass(const void *obj) const =0
virtual UInt_t GetCheckSum() const =0
virtual Int_t GetOffset(const char *) const =0
static const char * GetElementCounterStart(const char *dmTitle)
Given a comment/title declaring an array counter, for example:
virtual Bool_t BuildFor(const TClass *cl)=0
virtual TVirtualCollectionProxy * GenExplicitProxy(const ::ROOT::Detail::TCollectionProxyInfo &info, TClass *cl)=0
virtual void Clear(Option_t *)=0
Set name and title to empty strings ("").
virtual TVirtualCollectionProxy * GenEmulatedProxy(const char *class_name, Bool_t silent)=0
virtual void SetClass(TClass *cl)=0
virtual void * NewArray(Long_t nElements, void *ary=0)=0
virtual TObjArray * GetElements() const =0
virtual Int_t GetSize() const =0
virtual void BuildOld()=0
static TVirtualStreamerInfo * Factory()
Static function returning a pointer to a new TVirtualStreamerInfo object.
virtual Version_t GetOldVersion() const =0
virtual void * New(void *obj=0)=0
virtual Int_t GetOnFileClassVersion() const =0
virtual void Destructor(void *p, Bool_t dtorOnly=kFALSE)=0
virtual Bool_t CompareContent(TClass *cl, TVirtualStreamerInfo *info, Bool_t warn, Bool_t complete, TFile *file)=0
virtual Int_t GetClassVersion() const =0
virtual void Update(const TClass *oldClass, TClass *newClass)=0
virtual TClass * GetClass() const =0
void Add(RHist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, const RHist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
R__EXTERN void * gMmallocDesc
Bool_t HasConsistentHashMember(TClass &clRef)
Return true is the Hash/RecursiveRemove setup is consistent, i.e.
Namespace for new ROOT classes and functions.
void(* DirAutoAdd_t)(void *, TDirectory *)
R__EXTERN TVirtualRWMutex * gCoreMutex
void(* ResetAfterMergeFunc_t)(void *, TFileMergeInfo *)
void(* DesFunc_t)(void *)
TClass * CreateClass(const char *cname, Version_t id, const std::type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il)
Global function called by a class' static Dictionary() method (see the ClassDef macro).
void(* DelFunc_t)(void *)
void *(* NewArrFunc_t)(Long_t size, void *arena)
void Class_ShowMembers(TClass *cl, const void *obj, TMemberInspector &)
Indirect call to the implementation of ShowMember allowing [forward] declaration with out a full defi...
void(* DelArrFunc_t)(void *)
void *(* NewFunc_t)(void *)
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
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 IsInterpreterDetail(const char *type)
Return true if the type is one the interpreter details which are only forward declared (ClassInfo_t e...
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.
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.
bool IsSTLBitset(const char *type)
Return true is the name is std::bitset<number> or bitset<number>
static constexpr double s
UInt_t Find(std::list< std::pair< const Node< T > *, Float_t > > &nlist, const Node< T > *node, const T &event, UInt_t nfind)
Short_t Min(Short_t a, Short_t b)
bool IsTemplate()
Check if the type is a template.
std::vector< std::string > fElements