Logo ROOT   6.12/07
Reference Guide
BDT_Reg.cxx
Go to the documentation of this file.
1 #include "TMVA/BDT_Reg.h"
2 #include <iostream>
3 #include <iomanip>
4 #include <fstream>
5 
6 
7 
8 #include "RQ_OBJECT.h"
9 
10 #include "TROOT.h"
11 #include "TStyle.h"
12 #include "TPad.h"
13 #include "TCanvas.h"
14 #include "TLine.h"
15 #include "TFile.h"
16 #include "TColor.h"
17 #include "TPaveText.h"
18 #include "TObjString.h"
19 #include "TControlBar.h"
20 
21 #include "TGWindow.h"
22 #include "TGButton.h"
23 #include "TGLabel.h"
24 #include "TGNumberEntry.h"
25 
26 #include "TMVA/DecisionTree.h"
27 #include "TMVA/Tools.h"
28 #include "TXMLEngine.h"
29 
30 
32 
34 {
36 }
37 
39 {
41 }
42 
44 {
45  delete this;
46 }
47 
49  : fMain( 0 ),
50  fItree(itree),
51  fNtrees(0),
52  fCanvas(0),
53  fDataset(dataset),
54  fInput(0),
55  fButtons(0),
56  fDrawButton(0),
57  fCloseButton(0),
58  fWfile( wfile ),
59  fMethName( methName )
60 {
61  UInt_t totalWidth = 500;
62  UInt_t totalHeight = 200;
63 
64  fThis = this;
65 
66  // read number of decision trees from weight file
67  GetNtrees();
68 
69  // main frame
70  fMain = new TGMainFrame(p, totalWidth, totalHeight, kMainFrame | kVerticalFrame);
71 
72  TGLabel *sigLab = new TGLabel( fMain, Form( "Regression tree [%i-%i]",0,fNtrees-1 ) );
73  fMain->AddFrame(sigLab, new TGLayoutHints(kLHintsLeft | kLHintsTop,5,5,5,5));
74 
77  fInput->Resize(100,24);
79 
80  fButtons = new TGHorizontalFrame(fMain, totalWidth,30);
81 
82  fCloseButton = new TGTextButton(fButtons,"&Close");
84 
85  fDrawButton = new TGTextButton(fButtons,"&Draw");
87 
89 
90  fMain->SetWindowName("Regression tree");
91  fMain->SetWMPosition(0,0);
94  fMain->MapWindow();
95 
96  fInput->Connect("ValueSet(Long_t)","TMVA::StatDialogBDTReg",this, "SetItree()");
97 
98  // doesn't seem to exist .. gives an 'error message' and seems to work just fine without ... :)
99  // fDrawButton->Connect("Clicked()","TGNumberEntry",fInput, "ValueSet(Long_t)");
100  fDrawButton->Connect("Clicked()", "TMVA::StatDialogBDTReg", this, "Redraw()");
101 
102  fCloseButton->Connect("Clicked()", "TMVA::StatDialogBDTReg", this, "Close()");
103 }
104 
106 {
107  DrawTree( fItree );
108 }
109 
111 {
112  if(!fWfile.EndsWith(".xml") ){
113  std::ifstream fin( fWfile );
114  if (!fin.good( )) { // file not found --> Error
115  std::cout << "*** ERROR: Weight file: " << fWfile << " does not exist" << std::endl;
116  return;
117  }
118 
119  TString dummy = "";
120 
121  // read total number of trees, and check whether requested tree is in range
122  Int_t nc = 0;
123  while (!dummy.Contains("NTrees")) {
124  fin >> dummy;
125  nc++;
126  if (nc > 200) {
127  std::cout << std::endl;
128  std::cout << "*** Huge problem: could not locate term \"NTrees\" in BDT weight file: "
129  << fWfile << std::endl;
130  std::cout << "==> panic abort (please contact the TMVA authors)" << std::endl;
131  std::cout << std::endl;
132  exit(1);
133  }
134  }
135  fin >> dummy;
136  fNtrees = dummy.ReplaceAll("\"","").Atoi();
137  fin.close();
138  }
139  else{
140  void* doc = TMVA::gTools().xmlengine().ParseFile(fWfile);
141  void* rootnode = TMVA::gTools().xmlengine().DocGetRootElement(doc);
142  void* ch = TMVA::gTools().xmlengine().GetChild(rootnode);
143  while(ch){
144  TString nodeName = TString( TMVA::gTools().xmlengine().GetNodeName(ch) );
145  if(nodeName=="Weights") {
146  TMVA::gTools().ReadAttr( ch, "NTrees", fNtrees );
147  break;
148  }
149  ch = TMVA::gTools().xmlengine().GetNext(ch);
150  }
151  }
152  std::cout << "--- Found " << fNtrees << " decision trees in weight file" << std::endl;
153 
154 }
155 
156 ////////////////////////////////////////////////////////////////////////////////
157 /// recursively puts an entries in the histogram for the node and its daughters
158 ///
159 
161  Double_t x, Double_t y,
162  Double_t xscale, Double_t yscale, TString * vars)
163 {
164  Float_t xsize=xscale*1.5;
165  Float_t ysize=yscale/3;
166  if (xsize>0.15) xsize=0.1;
167  if (n->GetLeft() != NULL){
168  TLine *a1 = new TLine(x-xscale/4,y-ysize,x-xscale,y-ysize*2);
169  a1->SetLineWidth(2);
170  a1->Draw();
171  DrawNode((TMVA::DecisionTreeNode*) n->GetLeft(), x-xscale, y-yscale, xscale/2, yscale, vars);
172  }
173  if (n->GetRight() != NULL){
174  TLine *a1 = new TLine(x+xscale/4,y-ysize,x+xscale,y-ysize*2);
175  a1->SetLineWidth(2);
176  a1->Draw();
177  DrawNode((TMVA::DecisionTreeNode*) n->GetRight(), x+xscale, y-yscale, xscale/2, yscale, vars );
178  }
179 
180  // TPaveText *t = new TPaveText(x-xscale/2,y-yscale/2,x+xscale/2,y+yscale/2, "NDC");
181  TPaveText *t = new TPaveText(x-xsize,y-ysize,x+xsize,y+ysize, "NDC");
182 
183  t->SetBorderSize(1);
184 
185  t->SetFillStyle(1001);
186  if (n->GetNodeType() == 1) { t->SetFillColor( getSigColorF() ); t->SetTextColor( getSigColorT() ); }
187  else if (n->GetNodeType() == -1) { t->SetFillColor( getBkgColorF() ); t->SetTextColor( getBkgColorT() ); }
188  else if (n->GetNodeType() == 0) { t->SetFillColor( getIntColorF() ); t->SetTextColor( getIntColorT() ); }
189 
190  char buffer[25];
191  // sprintf( buffer, "N=%f", n->GetNEvents() );
192  // t->AddText(buffer);
193  sprintf( buffer, "R=%4.1f +- %4.1f", n->GetResponse(),n->GetRMS() );
194  t->AddText(buffer);
195 
196  if (n->GetNodeType() == 0){
197  if (n->GetCutType()){
198  t->AddText(TString(vars[n->GetSelector()]+">"+=::Form("%5.3g",n->GetCutValue())));
199  }else{
200  t->AddText(TString(vars[n->GetSelector()]+"<"+=::Form("%5.3g",n->GetCutValue())));
201  }
202  }
203 
204  t->Draw();
205 
206  return;
207 }
208 
210 {
211  std::cout << "--- Reading Tree " << itree << " from weight file: " << fWfile << std::endl;
213 
214 
215  if(!fWfile.EndsWith(".xml") ){
216 
217  std::ifstream fin( fWfile );
218  if (!fin.good( )) { // file not found --> Error
219  std::cout << "*** ERROR: Weight file: " << fWfile << " does not exist" << std::endl;
220  delete d;
221  d = nullptr;
222  return 0;
223  }
224  TString dummy = "";
225 
226  if (itree >= fNtrees) {
227  std::cout << "*** ERROR: requested decision tree: " << itree
228  << ", but number of trained trees only: " << fNtrees << std::endl;
229  delete d;
230  d = nullptr;
231  return 0;
232  }
233 
234  // file header with name
235  while (!dummy.Contains("#VAR")) fin >> dummy;
236  fin >> dummy >> dummy >> dummy; // the rest of header line
237 
238  // number of variables
239  Int_t nVars;
240  fin >> dummy >> nVars;
241 
242  // variable mins and maxes
243  vars = new TString[nVars+1];
244  for (Int_t i = 0; i < nVars; i++) fin >> vars[i] >> dummy >> dummy >> dummy >> dummy;
245  vars[nVars]="FisherCrit";
246 
247  char buffer[20];
248  char line[256];
249  sprintf(buffer,"Tree %d",itree);
250 
251  while (!dummy.Contains(buffer)) {
252  fin.getline(line,256);
253  dummy = TString(line);
254  }
255 
256  d->Read(fin);
257 
258  fin.close();
259  }
260  else{
261  if (itree >= fNtrees) {
262  std::cout << "*** ERROR: requested decision tree: " << itree
263  << ", but number of trained trees only: " << fNtrees << std::endl;
264  delete d;
265  d = nullptr;
266  return 0;
267  }
268  Int_t nVars;
269  void* doc = TMVA::gTools().xmlengine().ParseFile(fWfile);
270  void* rootnode = TMVA::gTools().xmlengine().DocGetRootElement(doc);
271  void* ch = TMVA::gTools().xmlengine().GetChild(rootnode);
272  while(ch){
273  TString nodeName = TString( TMVA::gTools().xmlengine().GetNodeName(ch) );
274  if(nodeName=="Variables"){
275  TMVA::gTools().ReadAttr( ch, "NVar", nVars);
276  vars = new TString[nVars+1];
277  void* varnode = TMVA::gTools().xmlengine().GetChild(ch);
278  for (Int_t i = 0; i < nVars; i++){
279  TMVA::gTools().ReadAttr( varnode, "Expression", vars[i]);
280  varnode = TMVA::gTools().xmlengine().GetNext(varnode);
281  }
282  vars[nVars]="FisherCrit";
283  }
284  if(nodeName=="Weights") break;
285  ch = TMVA::gTools().xmlengine().GetNext(ch);
286  }
287  ch = TMVA::gTools().xmlengine().GetChild(ch);
288  for (int i=0; i<itree; i++) ch = TMVA::gTools().xmlengine().GetNext(ch);
289  d->ReadXML(ch);
290  }
291  return d;
292 }
293 
294 ////////////////////////////////////////////////////////////////////////////////
295 
297 {
298  TString *vars;
299 
300  TMVA::DecisionTree* d = ReadTree( vars, itree );
301  if (d == 0) return;
302 
303  UInt_t depth = d->GetTotalTreeDepth();
304  Double_t ystep = 1.0/(depth + 1.0);
305 
306  std::cout << "--- Tree depth: " << depth << std::endl;
307 
308  TStyle* TMVAStyle = gROOT->GetStyle("Plain"); // our style is based on Plain
309  Int_t canvasColor = TMVAStyle->GetCanvasColor(); // backup
310 
311  TString cbuffer = Form( "Reading weight file: %s", fWfile.Data() );
312  TString tbuffer = Form( "Regression Tree no.: %d", itree );
313  if (!fCanvas) fCanvas = new TCanvas( "c1", cbuffer, 200, 0, 1000, 600 );
314  else fCanvas->Clear();
315  fCanvas->Draw();
316  DrawNode( (TMVA::DecisionTreeNode*)d->GetRoot(), 0.5, 1.-0.5*ystep, 0.25, ystep ,vars);
317 
318  // make the legend
319  Double_t yup=0.99;
320  Double_t ydown=yup-ystep/2.5;
321  Double_t dy= ystep/2.5 * 0.2;
322 
323  TPaveText *whichTree = new TPaveText(0.85,ydown,0.98,yup, "NDC");
324  whichTree->SetBorderSize(1);
325  whichTree->SetFillStyle(1001);
326  whichTree->SetFillColor( TColor::GetColor( "#ffff33" ) );
327  whichTree->AddText( tbuffer );
328  whichTree->Draw();
329 
330  TPaveText *intermediate = new TPaveText(0.02,ydown,0.15,yup, "NDC");
331  intermediate->SetBorderSize(1);
332  intermediate->SetFillStyle(1001);
333  intermediate->SetFillColor( getIntColorF() );
334  intermediate->AddText("Intermediate Nodes");
335  intermediate->SetTextColor( getIntColorT() );
336  intermediate->Draw();
337 
338  ydown = ydown - ystep/2.5 -dy;
339  yup = yup - ystep/2.5 -dy;
340  TPaveText *signalleaf = new TPaveText(0.02,ydown ,0.15,yup, "NDC");
341  signalleaf->SetBorderSize(1);
342  signalleaf->SetFillStyle(1001);
343  signalleaf->SetFillColor( getSigColorF() );
344  signalleaf->AddText("Leaf Nodes");
345  signalleaf->SetTextColor( getSigColorT() );
346  signalleaf->Draw();
347  /*
348  ydown = ydown - ystep/2.5 -dy;
349  yup = yup - ystep/2.5 -dy;
350  TPaveText *backgroundleaf = new TPaveText(0.02,ydown,0.15,yup, "NDC");
351  backgroundleaf->SetBorderSize(1);
352  backgroundleaf->SetFillStyle(1001);
353  backgroundleaf->SetFillColor( kBkgColorF );
354 
355  backgroundleaf->AddText("Backgr. Leaf Nodes");
356  backgroundleaf->SetTextColor( kBkgColorT );
357  backgroundleaf->Draw();
358  */
359  fCanvas->Update();
360  TString fname = fDataset+Form("/plots/%s_%i", fMethName.Data(), itree );
361  std::cout << "--- Creating image: " << fname << std::endl;
362  TMVAGlob::imgconv( fCanvas, fname );
363 
364  TMVAStyle->SetCanvasColor( canvasColor );
365 }
366 
367 // ========================================================================================
368 
369 // intermediate GUI
370 void TMVA::BDT_Reg(TString dataset, const TString& fin )
371 {
372  // --- read the available BDT weight files
373 
374  // destroy all open cavases
376 
377  // checks if file with name "fin" is already open, and if not opens one
378  TFile* file = TMVAGlob::OpenFile( fin );
379 
380  TDirectory* dir = file->GetDirectory(dataset.Data())->GetDirectory( "Method_BDT" );
381  if (!dir) {
382  std::cout << "*** Error in macro \"BDT_Reg.C\": cannot find directory \"Method_BDT\" in file: " << fin << std::endl;
383  return;
384  }
385 
386  // read all directories
387  TIter next( dir->GetListOfKeys() );
388  TKey *key(0);
389  std::vector<TString> methname;
390  std::vector<TString> path;
391  std::vector<TString> wfile;
392  while ((key = (TKey*)next())) {
393  TDirectory* mdir = dir->GetDirectory( key->GetName() );
394  if (!mdir) {
395  std::cout << "*** Error in macro \"BDT_Reg.C\": cannot find sub-directory: " << key->GetName()
396  << " in directory: " << dir->GetName() << std::endl;
397  return;
398  }
399 
400  // retrieve weight file name and path
401  TObjString* strPath = (TObjString*)mdir->Get( "TrainingPath" );
402  TObjString* strWFile = (TObjString*)mdir->Get( "WeightFileName" );
403  if (!strPath || !strWFile) {
404  std::cout << "*** Error in macro \"BDT_Reg.C\": could not find TObjStrings \"TrainingPath\" and/or \"WeightFileName\" *** " << std::endl;
405  std::cout << "*** Maybe you are using TMVA >= 3.8.15 with an older training target file ? *** " << std::endl;
406  return;
407  }
408 
409  methname.push_back( key->GetName() );
410  path .push_back( strPath->GetString() );
411  wfile .push_back( strWFile->GetString() );
412  }
413 
414  // create the control bar
415  TControlBar* cbar = new TControlBar( "vertical", "Choose weight file:", 50, 50 );
416  BDTReg_Global__cbar.push_back(cbar);
417 
418  for (UInt_t im=0; im<path.size(); im++) {
419  TString fname = path[im];
420  if (fname[fname.Length()-1] != '/') fname += "/";
421  fname += wfile[im];
422  TString macro = Form( "TMVA::BDT_Reg(\"%s\",0,\"%s\",\"%s\")",dataset.Data(), fname.Data(), methname[im].Data() );
423  cbar->AddButton( fname, macro, "Plot decision trees from this weight file", "button" );
424  }
425 
426  // *** problems with this button in ROOT 5.19 ***
427 #if ROOT_VERSION_CODE < ROOT_VERSION(5,19,0)
428  cbar->AddButton( "Close", Form("BDTReg_DeleteTBar(%i)", BDTReg_Global__cbar.size()-1), "Close this control bar", "button" );
429 #endif
430  // **********************************************
431 
432  // set the style
433  cbar->SetTextColor("blue");
434 
435  // draw
436  cbar->Show();
437 }
438 
439 void TMVA::BDTReg_DeleteTBar(int i)
440 {
441  // destroy all open canvases
444 
445  delete BDTReg_Global__cbar[i];
446  BDTReg_Global__cbar[i] = 0;
447 }
448 
449 // input: - No. of tree
450 // - the weight file from which the tree is read
451 void TMVA::BDT_Reg(TString dataset, Int_t itree, TString wfile , TString methName, Bool_t useTMVAStyle )
452 {
453  // destroy possibly existing dialog windows and/or canvases
456  if(wfile=="")
457  wfile = dataset+"/weights/TMVARegression_BDT.weights.xml";
458 
459  // quick check if weight file exist
460  if(!wfile.EndsWith(".xml") ){
461  std::ifstream fin( wfile );
462  if (!fin.good( )) { // file not found --> Error
463  std::cout << "*** ERROR: Weight file: " << wfile << " does not exist" << std::endl;
464  return;
465  }
466  }
467  std::cout << "test1";
468  // set style and remove existing canvas'
469  TMVAGlob::Initialize( useTMVAStyle );
470 
471  StatDialogBDTReg* gGui = new StatDialogBDTReg(dataset, gClient->GetRoot(), wfile, methName, itree );
472 
473  gGui->DrawTree( itree );
474 
475  gGui->RaiseDialog();
476 }
477 
Float_t GetRMS(void) const
void Show()
Show control bar.
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:43
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
void AddButton(TControlBarButton *button)
Add button.
TXMLEngine & xmlengine()
Definition: Tools.h:270
void imgconv(TCanvas *c, const TString &fname)
Definition: tmvaglob.cxx:212
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
Definition: TControlBar.h:22
TCanvas * fCanvas
Definition: BDT_Reg.h:67
Int_t getSigColorT()
Definition: BDT.h:45
virtual TList * GetListOfKeys() const
Definition: TDirectory.h:150
void SetTextColor(const char *colorName)
Sets text color for control bar buttons, e.g.
virtual void Draw(Option_t *option="")
Draw this pavetext with its current attributes.
Definition: TPaveText.cxx:234
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Definition: TDirectory.cxx:805
TLine * line
Collectable string class.
Definition: TObjString.h:28
float Float_t
Definition: RtypesCore.h:53
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1746
virtual void Read(std::istream &istr, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
Read the binary tree from an input stream.
Definition: BinaryTree.cxx:169
Int_t getBkgColorT()
Definition: BDT.h:46
TFile * OpenFile(const TString &fin)
Definition: tmvaglob.cxx:192
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
Definition: TPaveText.cxx:183
TGMainFrame * fMain
Definition: BDT_Reg.h:64
TGTextButton * fDrawButton
Definition: BDT_Reg.h:73
#define gROOT
Definition: TROOT.h:402
XMLNodePointer_t GetNext(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
return next to xmlnode node if realnode==kTRUE, any special nodes in between will be skipped ...
Basic string class.
Definition: TString.h:125
#define gClient
Definition: TGClient.h:166
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition: TObject.cxx:195
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
Definition: TAttFill.h:39
void BDT_Reg(TString dataset, const TString &fin="TMVAReg.root")
Bool_t GetCutType(void) const
virtual DecisionTreeNode * GetRoot() const
Definition: DecisionTree.h:88
void SetCanvasColor(Color_t color=19)
Definition: TStyle.h:318
StatDialogBDTReg(TString dataset, const TGWindow *p, TString wfile, TString methName="BDT", Int_t itree=0)
Definition: BDT_Reg.cxx:48
Int_t getIntColorT()
Definition: BDT.h:47
Double_t x[n]
Definition: legend1.C:17
TMVA::DecisionTree * ReadTree(TString *&vars, Int_t itree)
Definition: BDT_Reg.cxx:209
Float_t GetCutValue(void) const
void Clear(Option_t *option="")
Remove all primitives from the canvas.
Definition: TCanvas.cxx:707
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Definition: TString.cxx:2231
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Definition: TKey.h:24
TGTextButton * fCloseButton
Definition: BDT_Reg.h:74
void DrawNode(TMVA::DecisionTreeNode *n, Double_t x, Double_t y, Double_t xscale, Double_t yscale, TString *vars)
recursively puts an entries in the histogram for the node and its daughters
Definition: BDT_Reg.cxx:160
TStyle objects may be created to define special styles.
Definition: TStyle.h:27
TGNumberEntry * fInput
Definition: BDT_Reg.h:70
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
Definition: TQObject.cxx:867
const TString & GetString() const
Definition: TObjString.h:47
Int_t GetNodeType(void) const
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition: tmvaglob.cxx:176
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:37
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:375
Implementation of a Decision Tree.
Definition: DecisionTree.h:59
unsigned int UInt_t
Definition: RtypesCore.h:42
char * Form(const char *fmt,...)
Ssiz_t Length() const
Definition: TString.h:386
A simple line.
Definition: TLine.h:23
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
Definition: TColor.cxx:1751
void ReadAttr(void *node, const char *, T &value)
read attribute from xml
Definition: Tools.h:290
Tools & gTools()
virtual void ReadXML(void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
read attributes from XML
Definition: BinaryTree.cxx:144
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
The Canvas class.
Definition: TCanvas.h:31
XMLDocPointer_t ParseFile(const char *filename, Int_t maxbuf=100000)
Parses content of file and tries to produce xml structures.
static void Delete()
Definition: BDT_Reg.h:90
A Pave (see TPave) with text, lines or/and boxes inside.
Definition: TPaveText.h:21
double Double_t
Definition: RtypesCore.h:55
virtual Double_t GetNumber() const
Describe directory structure in memory.
Definition: TDirectory.h:34
static RooMathCoreReg dummy
Double_t y[n]
Definition: legend1.C:17
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:570
UInt_t GetTotalTreeDepth() const
Definition: BinaryTree.h:93
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
Int_t getIntColorF()
Definition: BDT.h:42
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1146
static StatDialogBDTReg * fThis
Definition: BDT_Reg.h:99
TGHorizontalFrame * fButtons
Definition: BDT_Reg.h:72
virtual void Draw(Option_t *option="")
Draw a canvas.
Definition: TCanvas.cxx:826
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1837
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
returns first child of xmlnode
Float_t GetResponse(void) const
Definition: file.py:1
Int_t getBkgColorF()
Definition: BDT.h:41
virtual void MapWindow()
Definition: TGFrame.h:251
XMLNodePointer_t DocGetRootElement(XMLDocPointer_t xmldoc)
returns root node of document
virtual TDirectory * GetDirectory(const char *namecycle, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory using apath.
Definition: TDirectory.cxx:400
virtual DecisionTreeNode * GetLeft() const
void DrawTree(Int_t itree)
Definition: BDT_Reg.cxx:296
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition: TAttText.h:43
virtual DecisionTreeNode * GetRight() const
Color_t GetCanvasColor() const
Definition: TStyle.h:174
Short_t GetSelector() const
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2248
void DestroyCanvases()
Definition: tmvaglob.cxx:166
const Int_t n
Definition: legend1.C:16
Int_t getSigColorF()
Definition: BDT.h:40
virtual void SetBorderSize(Int_t bordersize=4)
Definition: TPave.h:70
void BDTReg_DeleteTBar(int i)
const char * Data() const
Definition: TString.h:345