RootTalk


ROOT Discussion Forums

mroot - MATLAB/ROOT data interface

Discuss your own ROOT application.

Moderator: rootdev

mroot - MATLAB/ROOT data interface

Postby joki » Tue Sep 30, 2008 13:53

Hi!

I've written a MATLAB/ROOT data interface for reading and writing ROOT files from within MATLAB just as you do with MATLAB files. This enables research projects which use MATLAB for computation to store and exchange their data in the powerful ROOT file format.

The following MATLAB data types are supported:

- Cell
- Structure
- Logical
- Char
- Single/Double
- (U)Int-8/16/32/64

The following file types are implemented:

- TFile
- TXMLFile
- TNetFile
- TSQLFile

Unfortunately only TFile works on all tested Platforms (SUSE, Ubuntu, WinXP). The other file types actually work only on SUSE 10.2. Maybe you'll run in even more trouble when testing. I'm still learning that C++ and memory management stuff...

The interface is based on MEX, so you have to compile the C++ files in src/ first. The compile.m file may help. After this you can call rsave and rload in MATLAB as you would do with save and load.

Further documentation can be found in my diploma thesis (main.pdf, in German).

I'll be thankful, if you republish improvements on my software, when you make some.

Kind regards, Johannes Kissel.

P.S.: I'll post the link to my file in the MATLAB file exchange as soon as Mathworks released it.

http://www.mathworks.com/support/tech-n ... /1605.html
http://root.cern.ch/
http://fuzzy.fzk.de/~USCT/
joki
 
Posts: 30
Joined: Wed Jul 04, 2007 10:24
Location: FZK / D

Postby joki » Wed Oct 01, 2008 15:32

Mathworks dropped my file, because I didn't want to switch to a BSD License. That's why I attached it here now.

And to say it clear: With this tool you're NOT able to load each and any ROOT-file, but only ROOT-files which were created with mroot or which are compatible.

For further explanations see also my diploma thesis (it's german). Section 2.1 (especially the pages 28/29) is the important part :wink:
Attachments
mroot.zip
(61.81 KiB) Downloaded 540 times
Last edited by joki on Thu Mar 04, 2010 14:10, edited 3 times in total.
joki
 
Posts: 30
Joined: Wed Jul 04, 2007 10:24
Location: FZK / D

Postby brun » Thu Oct 02, 2008 10:18

Thanks Johannes for this interesting post. I will mention it in the release notes.

Rene
User avatar
brun
 
Posts: 5823
Joined: Wed Aug 27, 2003 9:49
Location: CERN

Postby wiso » Fri Mar 20, 2009 1:22

Really... thanks! I've found an other tool to import data from ROOT to Mathematica:

http://mathroot.sourceforge.net/
wiso
 
Posts: 493
Joined: Sat Nov 26, 2005 14:16


Return to My ROOT App

Who is online

Users browsing this forum: No registered users and 1 guest