# Problem reading .root from TMVA

**URL:** <https://root-forum.cern.ch/t/problem-reading-root-from-tmva/27560>\
**Category:** TMVA\
**Created:** [January 15, 2018, 12:39pm UTC](https://root-forum.cern.ch/t/problem-reading-root-from-tmva/27560 "2018-01-15T12:39:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alkass](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@Alkass](https://root-forum.cern.ch/u/Alkass)\
**Post date:** [January 15, 2018, 12:39pm UTC](https://root-forum.cern.ch/t/problem-reading-root-from-tmva/27560/1 "2018-01-15T12:39:15Z")

</div>

Hello

I am having problems reading the .root made with 6.12/04. In particular when I do

root -l  
TMVA::TMVAGui(“TMVA.root”)

the panel opens but then seems like the file is empty (which is not). The .root file can be found here

> **[Dropbox - Link not found](https://www.dropbox.com/s/rao5wl8hog3gv22/TMVA.root?dl=0)**
>
> Dropbox is a free service that lets you bring your photos, docs, and videos anywhere and share them easily. Never email yourself a file again!

---

<div class="post-metadata">

**Author:** ![behrenhoff](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/behrenhoff/32/12285_2.png) [@behrenhoff](https://root-forum.cern.ch/u/behrenhoff)\
**Post date:** [January 15, 2018, 12:44pm UTC](https://root-forum.cern.ch/t/problem-reading-root-from-tmva/27560/2 "2018-01-15T12:44:28Z")

</div>

The file was probably produced with an older TMVA version (pre 6.08, if I remember correctly). New TMVA has a DataLoader (by default of name “default”) and all data in the ROOT file needs to be in a folder with the DataLoader name.

---

<div class="post-metadata">

**Author:** ![Alkass](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/c67d28/32.png) [@Alkass](https://root-forum.cern.ch/u/Alkass)\
**Post date:** [January 15, 2018, 2:03pm UTC](https://root-forum.cern.ch/t/problem-reading-root-from-tmva/27560/3 "2018-01-15T14:03:51Z")

</div>

Hi

Yes, the file was produced with root under CMSSW\_8\_0\_25 (6.06/01) - So, setting a 6.06 instead of 6.12 seems to solve this (although naively one would expect backwards compatibility with MVA root files 😉

Regards

Alexis

---

<div class="post-metadata">

**Author:** ![behrenhoff](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/behrenhoff/32/12285_2.png) [@behrenhoff](https://root-forum.cern.ch/u/behrenhoff)\
**Post date:** [January 15, 2018, 2:42pm UTC](https://root-forum.cern.ch/t/problem-reading-root-from-tmva/27560/4 "2018-01-15T14:42:28Z")

</div>

> [@Alkass](#):
>
> although naively one would expect backwards compatibility with MVA root files 😉

Agree, it is a PITA to move all the code to the new directory structure. And worse, I don’t even see the benefit. Why would one ever want multiple dataloaders? My own code can only deal with one dataloader per file named “default” 🙂 For me, the biggest cause for trouble was that this name is also a name on the harddisk. If I remember correctly, it gets prepended to the filename you give to TMVA, so you can’t store results in arbitrary directories - you need to change the current working directory instead. So I ended up wrapping this in a class so that I don’t have to deal with TMVA’s ideas of storage any more 😉

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [January 29, 2018, 2:42pm UTC](https://root-forum.cern.ch/t/problem-reading-root-from-tmva/27560/5 "2018-01-29T14:42:46Z")

</div>

Closed on January 29, 2018, 2:42pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
