12 #include "RConfigure.h" 227 if (classes && strlen(classes)) {
263 gROOT->MakeDefCanvas();
266 if (classes && strlen(classes))
fClasses = classes;
280 if(!
fCnames[i]->CompareTo(classname))
return i;
303 if (udata || ufunc || ucode || uclass) {
328 if (udata || ufunc || ucode || uclass) {
343 while((obj=next())) {
346 if (!strcmp(pave->
GetLabel(),classname)) {
406 if (clbase == 0)
continue;
428 snprintf(line,500,
"%s%s",
fCnames[i]->Data(),
"...........................");
431 printf(
"%5d %s\n",i,line);
459 while((obj=next())) {
465 if (nch == 0)
return;
466 char *classes =
new char[nch+1];
472 char *ptr = strtok(classes,
":");
484 }
else if (ptr[0] ==
'>') {
486 if(
fCnames[i]->Contains(&ptr[1])) {
492 }
else if (ptr[nch-1] ==
'<') {
495 if(
fCnames[i]->Contains(ptr)) {
502 }
else if (ptr[nch-1] ==
'*') {
509 if(!
fCnames[i]->CompareTo(ptr)) {
526 if (j == i)
continue;
546 if (
gNsons[i] != 0)
continue;
551 if (nlevel > maxlev) maxlev = nlevel;
581 if (maxlev > 5)
gDx = 0.97*
gXsize/maxlev;
586 gDxx = 0.5*gXsize/26.;
591 gCsize = dxpixels/(10.*dypixels);
599 if (!
fCnames[i]->CompareTo(
"TObject")) y += ymore;
613 if (nch > 20) xmax = 0.5;
614 if (nch > 50) xmax = 0.7;
615 if (nch > 70) xmax = 0.9;
617 ,ymin+gYsize-0.9*gYsize/20.
619 ,ymin+gYsize-0.1*gYsize/26.
640 if(ns != 0) u[1] = u[0]+
gDx;
647 if (icobject >= 0 && !derived[icobject]) label->
SetFillColor(30);
662 if (!first) {first=1; yu =
y;}
669 line =
new TLine(u[1],yl,u[1],yu);
709 if (ic < 0 || ic == iclass)
continue;
731 if (numb == 1)
continue;
736 if (ic == iclass)
continue;
754 while ((method = (
TMethod*) nextm())) {
757 star = strstr((
char*)name.
Data(),
"*");
759 cref = strstr((
char*)name.
Data(),
"&");
762 if (ic < 0 || ic == iclass)
continue;
772 star = strstr((
char*)name.
Data(),
"*");
774 cref = strstr((
char*)name.
Data(),
"&");
777 if (ic < 0 || ic == iclass)
continue;
795 if (!sourceName)
return;
797 char *cname =
new char[ncn+1];
800 std::ifstream sourceFile;
801 sourceFile.open( sourceName, std::ios::in );
803 if( sourceFile.good() ) {
804 const Int_t kMAXLEN=1500;
806 while( !sourceFile.eof() ) {
807 sourceFile.getline( line, kMAXLEN-1 );
808 if( sourceFile.eof() )
break;
809 Int_t nblank = strspn(line,
" ");
810 if (!strncmp(&line[nblank],
"//",2))
continue;
811 char *cc = strstr(line,
"::");
814 if (!strncmp(&line[nblank],cname,ncn))
break;
815 Int_t nl = strlen(&line[nblank]);
816 if (!strncmp(&line[nblank],cc+2,nl))
break;
818 nlines++;
if (nlines > 1000)
break;
819 char *inc = strstr(line,
"#include");
821 char *ch = strstr(line,
".h");
824 char *start = strstr(line,
"<");
825 if (!start) start = strstr(line,
"\"");
826 if (!start)
continue;
828 while ((start < ch) && (*start ==
' ')) start++;
830 if (icl < 0 || icl == iclass)
continue;
839 if (ic == icl)
continue;
859 if (classes == 0)
return;
894 Int_t nch = strlen(classes);
895 char *ptr =
new char[nch+1];
896 strlcpy(ptr,classes,nch+1);
905 }
else if (ptr[nch-1] ==
'*') {
925 Int_t nch = strlen(classes);
926 char *ptr =
new char[nch+1];
927 strlcpy(ptr,classes,nch+1);
936 }
else if (ptr[nch-1] ==
'*') {
962 while((obj=next())) {
966 if (icl < 0)
continue;
975 if (derived[ic])
continue;
977 if (x1 == 0 || y1 == 0)
continue;
1000 while((obj=next())) {
1004 if (icl < 0)
continue;
1007 if (nmembers == 0)
continue;
1008 dx = (pave->
GetX2() - pave->
GetX1())/nmembers;
1016 if (x1 == 0 || y1 == 0)
continue;
1053 TIter next(
gPad->GetListOfPrimitives());
1060 while((obj=next())) {
1064 if (icl < 0)
continue;
1073 if (derived[ic] != 2)
continue;
1075 if (x1 == 0 || y1 == 0)
continue;
1091 TIter next(
gPad->GetListOfPrimitives());
1099 while((obj=next())) {
1103 if (icl < 0)
continue;
1106 if (nmembers == 0)
continue;
1107 dx = (pave->
GetX2() - pave->
GetX1())/nmembers;
1115 if (ic == icc)
continue;
1117 if (x1 == 0 || y1 == 0)
continue;
1133 void TClassTree::Streamer(
TBuffer &R__b)
1138 TNamed::Streamer(R__b);
1168 fLinks[i]->Streamer(R__b);
1175 TNamed::Streamer(R__b);
1191 fLinks[i]->Streamer(R__b);
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * GetName() const
Returns name of object.
TString fClasses
List of classes to be drawn.
virtual ~TClassTree()
TClassTree default destructor.
virtual UInt_t GetUniqueID() const
Return the unique object id.
A TPaveLabel specialized to process classes inside a TClassTree.
virtual void FindClassesUsedBy(Int_t iclass)
Select all classes used/referenced by the class number iclass.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void FindClassPosition(const char *classname, Float_t &x, Float_t &y)
Search the TPaveClass object in the pad with label=classname returns the x and y position of the cent...
const char * GetImplFileName() const
virtual void ls(Option_t *option="") const
list classes names and titles
Collectable string class.
R__EXTERN TClassTable * gClassTable
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
virtual void SetYoffset(Float_t offset=0)
Set the offset at the top of the picture The default offset is computed automatically taking into acc...
All ROOT classes may have RTTI (run time type identification) support added.
TString fSourceDir
Concatenated source directories.
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
virtual void SetClasses(const char *classes, Option_t *option="ID")
Set the list of classes for which the hierarchy is to be drawn See Paint for the syntax.
virtual void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this box.
TString ** fCtitles
![fNclasses] class titles
Int_t fShowCod
if 1 show classes referenced by implementation
Int_t * fNdata
[fNclasses] Number of data members per class
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
void ToUpper()
Change string to upper case.
Buffer base class used for serializing objects.
TClassTree()
TClassTree default constructor.
virtual void ShowClassesUsing(const char *classes)
mark classes using any class in the list of classes in classes
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
TObjString * Mark(const char *classname, TList *los, Int_t abit)
set bit abit in class classname in list los
TString ** fCnames
![fNclasses] class names
virtual void Paint(Option_t *option="")
Draw the current class setting in fClasses and fStatus.
virtual void ShowMul()
Draw the Multiple inheritance relationships.
Float_t fLabelDx
width along x of TPaveLabels in per cent of pad
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Each ROOT method (see TMethod) has a linked list of its arguments.
Int_t fShowMul
if 1 show multiple inheritance
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
virtual void SaveAs(const char *filename="", Option_t *option="") const
save current configuration in a Root file if filename is blank, the name of the file will be the curr...
virtual void ShowClassesUsedBy(const char *classes)
mark classes used by the list of classes in classes
const char * GetTypeName() const
Get type of method argument, e.g.
virtual void ShowLinks(Option_t *option="HMR")
Set link options in the ClassTree object.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
virtual void ScanClasses(Int_t iclass)
Select all classes used by/referenced/referencing the class number iclass and build the list of these...
TClass ** fCpointer
![fNclasses] pointers to the TClass objects
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
The TNamed class is the base class for all named ROOT classes.
virtual void Draw(Option_t *option="")
Draw this arrow with its current attributes.
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
virtual Int_t FindClass(const char *classname)
Find class number corresponding to classname in list of local classes.
const char * GetName() const
Returns name of object.
const char * GetLabel() const
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetSourceDir(const char *dir="src")
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();...
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
char ** fDerived
![fNclasses] table to indicate if i derives from j
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLabelDx(Float_t labeldx=0.15)
Set the size along x of the TPaveLabel showing the class name.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Int_t fNclasses
current number of classes
Int_t * fParents
[fNclasses] parent number of classes (permanent)
Int_t fShowRef
if 1 show classes relationship other than inheritance
static const TString & GetSourceDir()
Get the source directory in the installation. Static utility function.
virtual void FindClassesUsing(Int_t iclass)
Select all classes using/referencing the class number iclass.
The ROOT global object gROOT contains a list of all defined classes.
virtual void ShowRef()
Draw the References relationships (other than inheritance or composition)
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual void WriteFastArray(const Bool_t *b, Int_t n)=0
Each class (see TClass) has a linked list of its base class(es).
virtual void ShowCod()
Draw the Code References relationships.
static const double x1[5]
static char * Next()
Returns next class from sorted class table.
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
virtual void Draw(const char *classes="")
Draw the inheritance tree and relations for the list of classes see this class header for the syntax ...
virtual void ShowHas()
Draw the "Has a" relationships.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Int_t fShowHas
if 1 show "has a" relationship
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.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
Mother of all ROOT objects.
virtual void Add(TObject *obj)
Each ROOT class (see TClass) has a linked list of methods.
const char * GetClasses() const
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Draw all kinds of Arrows.
virtual Int_t GetSize() const
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
Bool_t IsaPointer() const
Return true if data member is a pointer.
TString ** fOptions
![fNclasses] List of options per class
Int_t * fCstatus
[fNclasses] classes status
virtual void PaintClass(Int_t iclass, Float_t xleft, Float_t y)
Paint one class level.
static constexpr double ns
Float_t fYoffset
offset at top of picture in per cent of pad
Int_t * fCparent
!parent number of classes (temporary)
Draw inheritance tree and their relations for a list of classes.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
virtual void Init()
Initialize the data structures.
TList ** fLinks
![fNclasses] for each class, the list of referenced(ing) classes