12#include "RConfigure.h"
228 if (classes && strlen(classes)) {
264 gROOT->MakeDefCanvas();
267 if (classes && strlen(classes))
fClasses = classes;
281 if(!
fCnames[i]->CompareTo(classname))
return i;
304 if (udata || ufunc || ucode || uclass) {
329 if (udata || ufunc || ucode || uclass) {
344 while((obj=next())) {
347 if (!strcmp(pave->
GetLabel(),classname)) {
407 if (clbase == 0)
continue;
432 printf(
"%5d %s\n",i,
line);
460 while((obj=next())) {
466 if (nch == 0)
return;
467 char *classes =
new char[nch+1];
473 char *ptr = strtok(classes,
":");
485 }
else if (ptr[0] ==
'>') {
487 if(
fCnames[i]->Contains(&ptr[1])) {
493 }
else if (ptr[nch-1] ==
'<') {
496 if(
fCnames[i]->Contains(ptr)) {
503 }
else if (ptr[nch-1] ==
'*') {
510 if(!
fCnames[i]->CompareTo(ptr)) {
527 if (j == i)
continue;
547 if (
fNsons[i] != 0)
continue;
552 if (nlevel > maxlev) maxlev = nlevel;
582 if (maxlev > 5)
gDx = 0.97*
gXsize/maxlev;
592 gCsize = dxpixels/(10.*dypixels);
600 if (!
fCnames[i]->CompareTo(
"TObject"))
y += ymore;
614 if (nch > 20)
xmax = 0.5;
615 if (nch > 50)
xmax = 0.7;
616 if (nch > 70)
xmax = 0.9;
641 if(ns != 0) u[1] = u[0]+
gDx;
648 if (icobject >= 0 && !derived[icobject]) label->
SetFillColor(30);
710 if (ic < 0 || ic == iclass)
continue;
732 if (numb == 1)
continue;
737 if (ic == iclass)
continue;
755 while ((method = (
TMethod*) nextm())) {
758 star = strstr((
char*)
name.Data(),
"*");
760 cref = strstr((
char*)
name.Data(),
"&");
763 if (ic < 0 || ic == iclass)
continue;
773 star = strstr((
char*)
name.Data(),
"*");
775 cref = strstr((
char*)
name.Data(),
"&");
778 if (ic < 0 || ic == iclass)
continue;
796 if (!sourceName)
return;
798 char *cname =
new char[ncn+1];
801 std::ifstream sourceFile;
802 sourceFile.open( sourceName, std::ios::in );
804 if( sourceFile.good() ) {
805 const Int_t kMAXLEN=1500;
807 while( !sourceFile.eof() ) {
808 sourceFile.getline(
line, kMAXLEN-1 );
809 if( sourceFile.eof() )
break;
811 if (!strncmp(&
line[nblank],
"//",2))
continue;
812 char *cc = strstr(
line,
"::");
815 if (!strncmp(&
line[nblank],cname,ncn))
break;
817 if (!strncmp(&
line[nblank],cc+2,nl))
break;
819 nlines++;
if (nlines > 1000)
break;
820 char *inc = strstr(
line,
"#include");
822 char *ch = strstr(
line,
".h");
825 char *start = strstr(
line,
"<");
826 if (!start) start = strstr(
line,
"\"");
827 if (!start)
continue;
829 while ((start < ch) && (*start ==
' ')) start++;
831 if (icl < 0 || icl == iclass)
continue;
840 if (ic == icl)
continue;
851 delete [] sourceName;
861 if (classes == 0)
return;
896 Int_t nch = strlen(classes);
897 char *ptr =
new char[nch+1];
898 strlcpy(ptr,classes,nch+1);
907 }
else if (ptr[nch-1] ==
'*') {
927 Int_t nch = strlen(classes);
928 char *ptr =
new char[nch+1];
929 strlcpy(ptr,classes,nch+1);
938 }
else if (ptr[nch-1] ==
'*') {
964 while((obj=next())) {
968 if (icl < 0)
continue;
977 if (derived[ic])
continue;
979 if (
x1 == 0 || y1 == 0)
continue;
1002 while((obj=next())) {
1006 if (icl < 0)
continue;
1009 if (nmembers == 0)
continue;
1010 dx = (pave->
GetX2() - pave->
GetX1())/nmembers;
1018 if (
x1 == 0 || y1 == 0)
continue;
1055 TIter next(
gPad->GetListOfPrimitives());
1062 while((obj=next())) {
1066 if (icl < 0)
continue;
1075 if (derived[ic] != 2)
continue;
1077 if (
x1 == 0 || y1 == 0)
continue;
1093 TIter next(
gPad->GetListOfPrimitives());
1101 while((obj=next())) {
1105 if (icl < 0)
continue;
1108 if (nmembers == 0)
continue;
1109 dx = (pave->
GetX2() - pave->
GetX1())/nmembers;
1117 if (ic == icc)
continue;
1119 if (
x1 == 0 || y1 == 0)
continue;
1135void TClassTree::Streamer(
TBuffer &R__b)
1140 TNamed::Streamer(R__b);
1170 fLinks[i]->Streamer(R__b);
1177 TNamed::Streamer(R__b);
1193 fLinks[i]->Streamer(R__b);
static const double x1[5]
R__EXTERN TClassTable * gClassTable
R__EXTERN TSystem * gSystem
Draw all kinds of Arrows.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Each class (see TClass) has a linked list of its base class(es).
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
virtual void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this box.
Buffer base class used for serializing objects.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
virtual void WriteFastArray(const Bool_t *b, Int_t n)=0
static char * Next()
Returns next class from sorted class table.
Draw inheritance tree and their relations for a list of classes.
virtual void ShowClassesUsedBy(const char *classes)
mark classes used by the list of classes in classes
virtual void Paint(Option_t *option="")
Draw the current class setting in fClasses and fStatus.
virtual void ShowHas()
Draw the "Has a" relationships.
virtual void ShowLinks(Option_t *option="HMR")
Set link options in the ClassTree object.
char ** fDerived
![fNclasses] table to indicate if i derives from j
virtual void ScanClasses(Int_t iclass)
Select all classes used by/referenced/referencing the class number iclass and build the list of these...
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.
Int_t * fCstatus
[fNclasses] classes status
Int_t fNclasses
current number of classes
virtual void PaintClass(Int_t iclass, Float_t xleft, Float_t y)
Paint one class level.
virtual void FindClassesUsing(Int_t iclass)
Select all classes using/referencing the class number iclass.
Int_t * fParents
[fNclasses] parent number of classes (permanent)
Int_t fShowRef
if 1 show classes relationship other than inheritance
virtual void Init()
Initialize the data structures.
TString ** fOptions
![fNclasses] List of options per class
std::vector< Int_t > fNtsons
! internal variable, used during painting
Int_t fShowHas
if 1 show "has a" relationship
Int_t fShowCod
if 1 show classes referenced by implementation
Int_t * fCparent
!parent number of classes (temporary)
TString fSourceDir
Concatenated source directories.
virtual Int_t FindClass(const char *classname)
Find class number corresponding to classname in list of local classes.
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 Draw(const char *classes="")
Draw the inheritance tree and relations for the list of classes see this class header for the syntax ...
std::vector< Int_t > fNsons
! internal variable, used during painting
TString ** fCtitles
![fNclasses] class titles
virtual void SetLabelDx(Float_t labeldx=0.15)
Set the size along x of the TPaveLabel showing the class name.
virtual ~TClassTree()
TClassTree default destructor.
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...
virtual void SetSourceDir(const char *dir="src")
Float_t fLabelDx
width along x of TPaveLabels in per cent of pad
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...
virtual void ShowRef()
Draw the References relationships (other than inheritance or composition)
virtual void ShowCod()
Draw the Code References relationships.
TList ** fLinks
![fNclasses] for each class, the list of referenced(ing) classes
virtual void ShowMul()
Draw the Multiple inheritance relationships.
virtual void ls(Option_t *option="") const
list classes names and titles
virtual void ShowClassesUsing(const char *classes)
mark classes using any class in the list of classes in classes
TClassTree()
TClassTree default constructor.
Float_t fYoffset
offset at top of picture in per cent of pad
TClass ** fCpointer
![fNclasses] pointers to the TClass objects
virtual void FindClassesUsedBy(Int_t iclass)
Select all classes used/referenced by the class number iclass.
TString fClasses
List of classes to be drawn.
TObjString * Mark(const char *classname, TList *los, Int_t abit)
set bit abit in class classname in list los
Int_t fShowMul
if 1 show multiple inheritance
TString ** fCnames
![fNclasses] class names
const char * GetClasses() const
Int_t * fNdata
[fNclasses] Number of data members per class
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
const char * GetImplFileName() const
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
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 Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
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.
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
Use the TLine constructor to create a simple line.
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetTypeName() const
Get type of method argument, e.g.: "class TDirectory*" -> "TDirectory" Result needs to be used or cop...
Each ROOT class (see TClass) has a linked list of methods.
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Collectable string class.
const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual UInt_t GetUniqueID() const
Return the unique object id.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
A TPaveLabel specialized to process classes inside a TClassTree.
const char * GetLabel() const
virtual void Draw(Option_t *option="")
Draw this pavelabel with its current attributes.
static const TString & GetSourceDir()
Get the source directory in the installation. Static utility function.
const char * Data() const
void ToUpper()
Change string to upper case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.