7

The ROOT data analysis framework commonly used in high energy physics uses a binary file format that has internal structure like a real filesystem (i.e. folder & files). The ls() method output from the program look something like this:

  KEY: TH1D     name1
  KEY: TH1D     name2
  KEY: TH2D     name3
....

Where "TH1D" and "TH2D" etc. are just object type. It'd be so nice to browse the file in a dired-like interface in emacs. I certainly don't have the energy/time to write a dired interface for this from scratch (even with the help of the dired.el source). My question is: if possible, how can I just tape into the dired interface by re-implementing some functions to make a dired-like interface for the output like above?

I'm certainly not expecting a full-solution here, but rather pointers to examples, tutorial, and other useful info.

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
polyglot
  • 9,945
  • 10
  • 49
  • 63
  • I've tried to do things like this (tab complete ROOT directory names). The annoying thing is that access to ROOT files is extremely heavyweight; you have to initialize the framework just to look at a file, which takes ~1s. Sure, it works, but it's a bit clunky. If you store your data in another format (i.e. HDF5) you'll have a better time. – Shep Apr 10 '15 at 15:36

3 Answers3

4

archive-mode or tar-mode might be good starting points.

legoscia
  • 39,593
  • 22
  • 116
  • 167
3

If it's similar enough to a filesystem, perhaps you could write somekind of loopback driver taht actually allows you to mount the datafile as a filesystem, similar to the way you can mount an ISO image as a filesystem. My very limited understanding is that this isn't a terribly hard thing to do under Linux.

rmeador
  • 25,504
  • 18
  • 62
  • 103
  • Yes it is very easy and you can use it for many different purposes. See fuse.http://fuse.sourceforge.net/ – Ben Jun 27 '09 at 11:50
1

xRootdfs from someone at slac seems to do this now. "rootdFS is a Posix filesystem for an Xrootd storage cluster. It is based on FUSE (Filesystem in Userspace) and runs in user space."

but I expect that you need root access to load the FUSE module.

user94574
  • 51
  • 3