# TMVAGui in Root 6

**URL:** <https://root-forum.cern.ch/t/tmvagui-in-root-6/19396>\
**Category:** TMVA\
**Created:** [June 18, 2015, 1:52pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396 "2015-06-18T13:52:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amilkar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/74df32/32.png) [@Amilkar](https://root-forum.cern.ch/u/Amilkar)\
**Post date:** [June 18, 2015, 1:52pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/1 "2015-06-18T13:52:24Z")

</div>

How do I run the TMVAGui in Root 6?  
Before it was at $ROOTSYS/test/TMVAGui.C  
Now I do not know where is it or how to call it?  
It runs fine at the end of the training but now I have the TMVA.root file and do not know how to run the Gui again.

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [June 23, 2015, 12:20pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/2 "2015-06-23T12:20:44Z")

</div>

Just type at the prompt:

```auto
root[] TMVA::TMVAGui(“TMVA.root”)
```

Lorenzo

---

<div class="post-metadata">

**Author:** ![helena](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@helena](https://root-forum.cern.ch/u/helena)\
**Post date:** [September 27, 2016, 8:04am UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/3 "2016-09-27T08:04:55Z")

</div>

Dear all,

That solution is not working for me:  
root [0] TMVA::TMVAGui(TMVA.root)  
error:  
TMVA::TMVAGui(TMVA.root)  
root [1] .x TMVAGui.C  
— Launch TMVA GUI to view input file: TMVA.root  
=== Note: inactive buttons indicate classifiers that were not trained, ===  
=== or functionalities that were not invoked during the training ===

And when trying to visualize, .e.g., “Input variables”, I get:

root [2] Error in TApplication::ExecuteFile: macro variables.C not found in path .:/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86\_64/root/6.04.16-x86\_64-slc6-gcc49-opt/macros::./:$ROOTSYS/tmva/test/:

If I just use ROOT 6 out of ATLASLocalRootBase I get the same error:  
root [2] Error in TApplication::ExecuteFile: macro variables.C not found in path .:/exper-sw/sw/sl6/x86\_64/gcc48/root/6.00.00/macros::./:$ROOTSYS/tmva/test/:

How to fix it?

Thank you in advance for help.

Best wishes,  
Helena

---

<div class="post-metadata">

**Author:** ![pietrovischia](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pietrovischia/32/11133_2.png) [@pietrovischia](https://root-forum.cern.ch/u/pietrovischia)\
**Post date:** [December 16, 2016, 11:01pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/4 "2016-12-16T23:01:12Z")

</div>

Dear ROOT forum,

for me, the new TMVA::TMVAGui(“myfile.root”) way of accessing the Gui works.

However, as usual it is very inconvenient to have to get the plots one by one by actively clicking on the various buttons (particularly if working, as usual, over an ssh connection). Furthermore, the default extension is eps.

Is there a way of:

- printing all the available plots in a batch session (or in a non-batch session, but without having to load the graphic list of buttons) with a single command? Once upon a time I used to have modified the ancient macro by removing the buttons stuff and just calling one after the other the various methods that paint the various plots

- set as default the creation of pdf files instead of eps?

Thanks in advance.

Best,  
Pietro

---

<div class="post-metadata">

**Author:** ![pietrovischia](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pietrovischia/32/11133_2.png) [@pietrovischia](https://root-forum.cern.ch/u/pietrovischia)\
**Post date:** [January 16, 2017, 9:55pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/5 "2017-01-16T21:55:18Z")

</div>

Hi again,

I tried to build my personalized macro, in order to avoid the tmvagui graphics, that is very inconvenient for batch runs.

What I am doing is:

```auto
TString dataset(""); // This is the only one that enables the following command to find classifier types/instances
TMVA::efficiencies(dataset, "TMVA_old_1l_high.root");
```

However, the plots path is broken:

```auto
root [0] 
Processing plotAll.C...
--- Opening root file TMVA_old_1l_high.root in read mode
--- Found 1 classifier types
--- Found 1 instance(s) of the method Method_BDT
--- Found 1 classifier types
--- Found 1 instance(s) of the method Method_BDT
ERROR in TPostScript::Open: Cannot open file:/plots/rejBvsS.eps
Warning in <TColor::TColor>: color 600 already defined
Error in <TPostScript::Text>: Cannot open temporary file: /plots/rejBvsS.eps_tmp_7228
```

Is there a way to tell TMVA::efficiencies(…) to use a relative path (i.e. “./plots” instead of “/plots”), without having to recompile ROOT? And also possibly for changing the eps format to pdf+png?

Line 203 of [root.cern.ch/doc/v608/efficienc … ource.html](https://root.cern.ch/doc/v608/efficiencies_8cxx_source.html) suggests it is not possible unless dataset=="./", but doing so results in segmentation violation.

Thanks in advance!

Best,  
Pietro

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [September 20, 2017, 11:47am UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/6 "2017-09-20T11:47:31Z")

</div>

Hi Pietro,

Thanks for the feedback and sorry for the super long delay in answering 😮

There is currently no way of running the GUI in batch mode. Your request is very reasonable, I’ll add a feature request ticket to the TMVA issue tracker immediately.

For modifications to the plotting functions, this also sounds reasonable but I would have to look into it. I’ll add a ticket for this as well.

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![melhutch](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/65b543/32.png) [@melhutch](https://root-forum.cern.ch/u/melhutch)\
**Post date:** [October 2, 2018, 8:23pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/7 "2018-10-02T20:23:05Z")

</div>

Hi Kim,

I know this is over a year later, but was there ever any development to not have to use the Gui for TMVA to view and obtain plots via TMVA::TMVAGui(“myfile.root”)? As Pietro pointed out, it is inconvenient to have to do this over an ssh connection. I’m also interested in not having the default extension as eps.

Thanks,  
Mel

---

<div class="post-metadata">

**Author:** ![kialbert](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/kialbert/32/16537_2.png) [@kialbert](https://root-forum.cern.ch/u/kialbert)\
**Post date:** [October 3, 2018, 11:56am UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/8 "2018-10-03T11:56:54Z")

</div>

Hi,

Unfortunately there has not been any progress so far. You can monitor it [here](https://sft.its.cern.ch/jira/browse/ROOT-9011?jql=project%20%3D%20ROOT%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20component%20%3D%20TMVA). It is good that you ping us about it, this will make us aware that there is a need for implementation 🙂

Cheers,  
Kim

---

<div class="post-metadata">

**Author:** ![melhutch](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/65b543/32.png) [@melhutch](https://root-forum.cern.ch/u/melhutch)\
**Post date:** [October 3, 2018, 6:50pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/9 "2018-10-03T18:50:11Z")

</div>

Thanks for the link to check the progress!

---

<div class="post-metadata">

**Author:** ![bozzochet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bozzochet/32/13718_2.png) [@bozzochet](https://root-forum.cern.ch/u/bozzochet)\
**Post date:** [May 27, 2020, 5:58pm UTC](https://root-forum.cern.ch/t/tmvagui-in-root-6/19396/10 "2020-05-27T17:58:11Z")

</div>

Hi all,

I have a question related to this (so perfectly ‘compliant’ with the post title, so not to require another post) but not on the “main” question (run in batch mode).

In the “old” version of TMVAGui (`TMVAGui.C`) the “aesthetics” of the plots produced and also the kind of files saved (as asked also by Pietro) could be changed by editing `tmvaglob.C`.  
Now still we get sentences like:

```auto
--- --------------------------------------------------------------------
--- If you want to save the image as eps, gif or png, please comment out 
--- the corresponding lines (line no. 239-241) in tmvaglob.C
--- --------------------------------------------------------------------

```

but currently this (I think) cannot be done: in the ROOT installation one has the `tmvaglob.h` file but not the `tmvaglob.C`. Modify the `tmvaglob.h` file, deep in the installation, would be not so “elegant” but, more important, to really modify the important things one should modify the `tmvaglob.C` file (only in the source) and then recompile ROOT… Isn’t it?  
The “aesthetical” stuff can be worked around by defining, by hand, a `TStyle`, called “MVA”, so that `TMVA` will find it already defined and will use this. I verified it and is working.  
To have `TMVAGlob` producing also the pdfs (for example) I didn’t find any solution…

Am I missing something?

Ciao,  
Matteo
