Logo ROOT   6.07/09
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  return 0;
221  }
222  TString dummy = "";
223 
224  if (itree >= fNtrees) {
225  std::cout << "*** ERROR: requested decision tree: " << itree
226  << ", but number of trained trees only: " << fNtrees << std::endl;
227  return 0;
228  }
229 
230  // file header with name
231  while (!dummy.Contains("#VAR")) fin >> dummy;
232  fin >> dummy >> dummy >> dummy; // the rest of header line
233 
234  // number of variables
235  Int_t nVars;
236  fin >> dummy >> nVars;
237 
238  // variable mins and maxes
239  vars = new TString[nVars+1];
240  for (Int_t i = 0; i < nVars; i++) fin >> vars[i] >> dummy >> dummy >> dummy >> dummy;
241  vars[nVars]="FisherCrit";
242 
243  char buffer[20];
244  char line[256];
245  sprintf(buffer,"Tree %d",itree);
246 
247  while (!dummy.Contains(buffer)) {
248  fin.getline(line,256);
249  dummy = TString(line);
250  }
251 
252  d->Read(fin);
253 
254  fin.close();
255  }
256  else{
257  if (itree >= fNtrees) {
258  std::cout << "*** ERROR: requested decision tree: " << itree
259  << ", but number of trained trees only: " << fNtrees << std::endl;
260  return 0;
261  }
262  Int_t nVars;
263  void* doc = TMVA::gTools().xmlengine().ParseFile(fWfile);
264  void* rootnode = TMVA::gTools().xmlengine().DocGetRootElement(doc);
265  void* ch = TMVA::gTools().xmlengine().GetChild(rootnode);
266  while(ch){
267  TString nodeName = TString( TMVA::gTools().xmlengine().GetNodeName(ch) );
268  if(nodeName=="Variables"){
269  TMVA::gTools().ReadAttr( ch, "NVar", nVars);
270  vars = new TString[nVars+1];
271  void* varnode = TMVA::gTools().xmlengine().GetChild(ch);
272  for (Int_t i = 0; i < nVars; i++){
273  TMVA::gTools().ReadAttr( varnode, "Expression", vars[i]);
274  varnode = TMVA::gTools().xmlengine().GetNext(varnode);
275  }
276  vars[nVars]="FisherCrit";
277  }
278  if(nodeName=="Weights") break;
279  ch = TMVA::gTools().xmlengine().GetNext(ch);
280  }
281  ch = TMVA::gTools().xmlengine().GetChild(ch);
282  for (int i=0; i<itree; i++) ch = TMVA::gTools().xmlengine().GetNext(ch);
283  d->ReadXML(ch);
284  }
285  return d;
286 }
287 
288 ////////////////////////////////////////////////////////////////////////////////
289 
291 {
292  TString *vars;
293 
294  TMVA::DecisionTree* d = ReadTree( vars, itree );
295  if (d == 0) return;
296 
297  UInt_t depth = d->GetTotalTreeDepth();
298  Double_t ystep = 1.0/(depth + 1.0);
299 
300  std::cout << "--- Tree depth: " << depth << std::endl;
301 
302  TStyle* TMVAStyle = gROOT->GetStyle("Plain"); // our style is based on Plain
303  Int_t canvasColor = TMVAStyle->GetCanvasColor(); // backup
304 
305  TString cbuffer = Form( "Reading weight file: %s", fWfile.Data() );
306  TString tbuffer = Form( "Regression Tree no.: %d", itree );
307  if (!fCanvas) fCanvas = new TCanvas( "c1", cbuffer, 200, 0, 1000, 600 );
308  else fCanvas->Clear();
309  fCanvas->Draw();
310  DrawNode( (TMVA::DecisionTreeNode*)d->GetRoot(), 0.5, 1.-0.5*ystep, 0.25, ystep ,vars);
311 
312  // make the legend
313  Double_t yup=0.99;
314  Double_t ydown=yup-ystep/2.5;
315  Double_t dy= ystep/2.5 * 0.2;
316 
317  TPaveText *whichTree = new TPaveText(0.85,ydown,0.98,yup, "NDC");
318  whichTree->SetBorderSize(1);
319  whichTree->SetFillStyle(1001);
320  whichTree->SetFillColor( TColor::GetColor( "#ffff33" ) );
321  whichTree->AddText( tbuffer );
322  whichTree->Draw();
323 
324  TPaveText *intermediate = new TPaveText(0.02,ydown,0.15,yup, "NDC");
325  intermediate->SetBorderSize(1);
326  intermediate->SetFillStyle(1001);
327  intermediate->SetFillColor( getIntColorF() );
328  intermediate->AddText("Intermediate Nodes");
329  intermediate->SetTextColor( getIntColorT() );
330  intermediate->Draw();
331 
332  ydown = ydown - ystep/2.5 -dy;
333  yup = yup - ystep/2.5 -dy;
334  TPaveText *signalleaf = new TPaveText(0.02,ydown ,0.15,yup, "NDC");
335  signalleaf->SetBorderSize(1);
336  signalleaf->SetFillStyle(1001);
337  signalleaf->SetFillColor( getSigColorF() );
338  signalleaf->AddText("Leaf Nodes");
339  signalleaf->SetTextColor( getSigColorT() );
340  signalleaf->Draw();
341  /*
342  ydown = ydown - ystep/2.5 -dy;
343  yup = yup - ystep/2.5 -dy;
344  TPaveText *backgroundleaf = new TPaveText(0.02,ydown,0.15,yup, "NDC");
345  backgroundleaf->SetBorderSize(1);
346  backgroundleaf->SetFillStyle(1001);
347  backgroundleaf->SetFillColor( kBkgColorF );
348 
349  backgroundleaf->AddText("Backgr. Leaf Nodes");
350  backgroundleaf->SetTextColor( kBkgColorT );
351  backgroundleaf->Draw();
352  */
353  fCanvas->Update();
354  TString fname = fDataset+Form("/plots/%s_%i", fMethName.Data(), itree );
355  std::cout << "--- Creating image: " << fname << std::endl;
356  TMVAGlob::imgconv( fCanvas, fname );
357 
358  TMVAStyle->SetCanvasColor( canvasColor );
359 }
360 
361 // ========================================================================================
362 
363 // intermediate GUI
364 void TMVA::BDT_Reg(TString dataset, const TString& fin )
365 {
366  // --- read the available BDT weight files
367 
368  // destroy all open cavases
370 
371  // checks if file with name "fin" is already open, and if not opens one
372  TFile* file = TMVAGlob::OpenFile( fin );
373 
374  TDirectory* dir = file->GetDirectory(dataset.Data())->GetDirectory( "Method_BDT" );
375  if (!dir) {
376  std::cout << "*** Error in macro \"BDT_Reg.C\": cannot find directory \"Method_BDT\" in file: " << fin << std::endl;
377  return;
378  }
379 
380  // read all directories
381  TIter next( dir->GetListOfKeys() );
382  TKey *key(0);
383  std::vector<TString> methname;
384  std::vector<TString> path;
385  std::vector<TString> wfile;
386  while ((key = (TKey*)next())) {
387  TDirectory* mdir = dir->GetDirectory( key->GetName() );
388  if (!mdir) {
389  std::cout << "*** Error in macro \"BDT_Reg.C\": cannot find sub-directory: " << key->GetName()
390  << " in directory: " << dir->GetName() << std::endl;
391  return;
392  }
393 
394  // retrieve weight file name and path
395  TObjString* strPath = (TObjString*)mdir->Get( "TrainingPath" );
396  TObjString* strWFile = (TObjString*)mdir->Get( "WeightFileName" );
397  if (!strPath || !strWFile) {
398  std::cout << "*** Error in macro \"BDT_Reg.C\": could not find TObjStrings \"TrainingPath\" and/or \"WeightFileName\" *** " << std::endl;
399  std::cout << "*** Maybe you are using TMVA >= 3.8.15 with an older training target file ? *** " << std::endl;
400  return;
401  }
402 
403  methname.push_back( key->GetName() );
404  path .push_back( strPath->GetString() );
405  wfile .push_back( strWFile->GetString() );
406  }
407 
408  // create the control bar
409  TControlBar* cbar = new TControlBar( "vertical", "Choose weight file:", 50, 50 );
410  BDTReg_Global__cbar.push_back(cbar);
411 
412  for (UInt_t im=0; im<path.size(); im++) {
413  TString fname = path[im];
414  if (fname[fname.Length()-1] != '/') fname += "/";
415  fname += wfile[im];
416  TString macro = Form( "TMVA::BDT_Reg(\"%s\",0,\"%s\",\"%s\")",dataset.Data(), fname.Data(), methname[im].Data() );
417  cbar->AddButton( fname, macro, "Plot decision trees from this weight file", "button" );
418  }
419 
420  // *** problems with this button in ROOT 5.19 ***
421 #if ROOT_VERSION_CODE < ROOT_VERSION(5,19,0)
422  cbar->AddButton( "Close", Form("BDTReg_DeleteTBar(%i)", BDTReg_Global__cbar.size()-1), "Close this control bar", "button" );
423 #endif
424  // **********************************************
425 
426  // set the style
427  cbar->SetTextColor("blue");
428 
429  // draw
430  cbar->Show();
431 }
432 
434 {
435  // destroy all open canvases
438 
439  delete BDTReg_Global__cbar[i];
440  BDTReg_Global__cbar[i] = 0;
441 }
442 
443 // input: - No. of tree
444 // - the weight file from which the tree is read
445 void TMVA::BDT_Reg(TString dataset, Int_t itree, TString wfile , TString methName, Bool_t useTMVAStyle )
446 {
447  // destroy possibly existing dialog windows and/or canvases
450  if(wfile=="")
451  wfile = dataset+"/weights/TMVARegression_BDT.weights.xml";
452 
453  // quick check if weight file exist
454  if(!wfile.EndsWith(".xml") ){
455  std::ifstream fin( wfile );
456  if (!fin.good( )) { // file not found --> Error
457  std::cout << "*** ERROR: Weight file: " << wfile << " does not exist" << std::endl;
458  return;
459  }
460  }
461  std::cout << "test1";
462  // set style and remove existing canvas'
463  TMVAGlob::Initialize( useTMVAStyle );
464 
465  StatDialogBDTReg* gGui = new StatDialogBDTReg(dataset, gClient->GetRoot(), wfile, methName, itree );
466 
467  gGui->DrawTree( itree );
468 
469  gGui->RaiseDialog();
470 }
471 
void Show()
Show control bar.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Definition: TAttLine.h:49
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:278
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:26
TCanvas * fCanvas
Definition: BDT_Reg.h:67
Int_t getSigColorT()
Definition: BDT.h:45
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:211
virtual TList * GetListOfKeys() const
Definition: TDirectory.h:158
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Definition: TDirectory.cxx:729
Ssiz_t Length() const
Definition: TString.h:390
TLine * line
Collectable string class.
Definition: TObjString.h:32
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:170
UInt_t GetTotalTreeDepth() const
Definition: BinaryTree.h:99
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:50
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:160
virtual DecisionTreeNode * GetRight() const
TGMainFrame * fMain
Definition: BDT_Reg.h:64
Float_t GetRMS(void) const
TGTextButton * fDrawButton
Definition: BDT_Reg.h:73
#define gROOT
Definition: TROOT.h:364
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:137
#define gClient
Definition: TGClient.h:174
Int_t GetNodeType(void) const
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:255
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:44
void BDT_Reg(TString dataset, const TString &fin="TMVAReg.root")
Definition: BDT_Reg.cxx:364
virtual DecisionTreeNode * GetLeft() const
virtual DecisionTreeNode * GetRoot() const
Definition: DecisionTree.h:102
void SetCanvasColor(Color_t color=19)
Definition: TStyle.h:334
StatDialogBDTReg(TString dataset, const TGWindow *p, TString wfile, TString methName="BDT", Int_t itree=0)
Definition: BDT_Reg.cxx:48
const char * Data() const
Definition: TString.h:349
Int_t getIntColorT()
Definition: BDT.h:47
Tools & gTools()
Definition: Tools.cxx:79
Double_t x[n]
Definition: legend1.C:17
TMVA::DecisionTree * ReadTree(TString *&vars, Int_t itree)
Definition: BDT_Reg.cxx:209
Bool_t GetCutType(void) const
void Clear(Option_t *option="")
Remove all primitives from the canvas.
Definition: TCanvas.cxx:678
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Definition: TKey.h:30
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:43
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:1137
TString GetString() const
Definition: TObjString.h:50
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Definition: TString.cxx:2221
void Initialize(Bool_t useTMVAStyle=kTRUE)
Definition: tmvaglob.cxx:176
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:42
unsigned int UInt_t
Definition: RtypesCore.h:42
char * Form(const char *fmt,...)
A simple line.
Definition: TLine.h:33
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:1706
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
void ReadAttr(void *node, const char *, T &value)
Definition: Tools.h:296
virtual void ReadXML(void *node, UInt_t tmva_Version_Code=TMVA_VERSION_CODE)
read attributes from XML
Definition: BinaryTree.cxx:145
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:41
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:27
double Double_t
Definition: RtypesCore.h:55
Describe directory structure in memory.
Definition: TDirectory.h:44
static RooMathCoreReg dummy
Double_t y[n]
Definition: legend1.C:17
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
Short_t GetSelector() const
TGHorizontalFrame * fButtons
Definition: BDT_Reg.h:72
virtual void Draw(Option_t *option="")
Draw a canvas.
Definition: TCanvas.cxx:795
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 xml node
Definition: TXMLEngine.cxx:993
Definition: file.py:1
Int_t getBkgColorF()
Definition: BDT.h:41
virtual void MapWindow()
Definition: TGFrame.h:267
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:567
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:338
void DrawTree(Int_t itree)
Definition: BDT_Reg.cxx:290
#define NULL
Definition: Rtypes.h:82
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
Definition: TAttText.h:49
virtual Double_t GetNumber() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:391
virtual void Update()
Update canvas pad buffers.
Definition: TCanvas.cxx:2183
void DestroyCanvases()
Definition: tmvaglob.cxx:166
const Int_t n
Definition: legend1.C:16
Float_t GetResponse(void) const
Color_t GetCanvasColor() const
Definition: TStyle.h:190
Int_t getSigColorF()
Definition: BDT.h:40
virtual void SetBorderSize(Int_t bordersize=4)
Definition: TPave.h:74
void BDTReg_DeleteTBar(int i)
Definition: BDT_Reg.cxx:433
static std::vector< TControlBar * > BDTReg_Global__cbar
Definition: BDT_Reg.h:105
Float_t GetCutValue(void) const