Building LIGOtools dmtroot on Linux
Eric Myers
<myers@spy-hill.net>
Last updated: 3 September 2007
Topics Overview Software Prerequisites Tricky Stuff Running it References
The LIGOtools package dmtroot allows one to make use of LIGO-specific container classes and signal-processing functions using ROOT. These notes describe how I was able to build and use a more recent version of dmtroot on Linux, specifically Fedora Core 3, 4 and 5.this document is still very rough
Overview
The LIGOtools package dmtroot allows one to make use of LIGO-specific container classes and signal-processing functions of DMT from within ROOT. Understanding what that all means requires that you first know more about these various components. (If you already do, then you can skip it).
- LIGOtools
- is a project to collect together various software tools used by the LIGO Scientific Collaboration (LSC) and distribute pre-compiled versions of these tools (source code is sometimes also avaiable). LIGOtools is thus a collection of software and a "package manager" for that software. You can find out more about LIGOtools here.
- DMT
- is the Data Monitoring Tools, a software framework for creating tools for continuously monitoring data from the LIGO interferometers and supporting sensors. DMT "monitor"s are daemon processes which run on the Sun computers in the LIGO control rooms. They monitor the data stream, providing a real-time graphical display of data quality, and they can trigger alarms or other events for specific run conditions. The DMT framework makes it relatively easy for LIGO scientists to write a new monitor by writing the core pieces of the monitor without having to re-create the interface elements common to all monitors. You can find out more about DMT here.
- ROOT
- is an object-oriented data analysis framework from CERN which is used by DMT to produce graphical output. You can find out more about ROOT here.
- dmtroot
- is a package in LIGOtools which makes it possible to bring DMT container classes and functions into ROOT. Essentially, dmtroot consists of 1) a set of shared-object libraries which have been generated with the appropriate symbol dictionaries so that they can be used by ROOT, 2) a set of ROOT macros for dealing with LIGO-specific data objects and for creating plots commonly used by LIGO, and 3) a script to run ROOT using these libraries and macros. One useful feature of this modified version of ROOT is that it automatically includes a data accessor object, which makes it very easy to read data from frame files. You can find out more about dmtroot here.
- ltroot
- is the command one actually gives to run ROOT with the additional DMT functionality. The name means "LIGOtools ROOT", which is appropriate because it also loads some shared object libraries for other LIGOtools packages, not just DMT.
If all you want to do is use existing tools to analyse LIGO data with no modifications, then it may well suffice to use the current version of dmtroot from LIGOtools. It is straightforward to initialize LIGOtools (with ligotools_init) and then install dmtroot(with ligotools_install dmtroot) along with any other packages you may wish to use (you'll need basegdsroot, for starters). Then you don't have to worry about building any software, it's all been done for you.
On the other hand, the Linux version of dmtroot in LIGOtools was last built in April of 2002 and uses ROOT version 3.02 (it is provided as another package in LIGOtools, and you must use this version), whereas ROOT is now (October 2006) up to version 5.12 and has many new and useful features. Since 2002 DMT itself has not changed much, though many new monitors have been added and DMT has since been incorporated into GDS. If you want to make use of any new software or features introduced since 2002, or if you want to make your own changes to the software, then you will need to build dmtroot yourself.
The notes below describe how I was able to build and use a more current version of dmtroot on Linux. In particular, I built dmtroot and the components from which is was assembled on Fedora Core 3, 4 and 5. One hopes these notes will be helpful even if you are using some other flavor of Linux or Unix. (See the references below for links to pages for Red Hat 9 and Debian Linux).
In what follows it may help to know:
In the future, when DOL has developed further, it may be desirable to merge it back into the main DMT code base, with the option to enable ROOT or not, rather than making an on-line/off-line distinction.
- GDS
- is the LIGO Global Diagnostic Tools, essentially a combination of DMT and DTT (the Diagnostic Test Tools), along with supporting libraries such as FrameCPP and fftw3, all brought together with a unified build system.
- FrameCPP
- is a library of routines to read IGWD formated frame files.... While the frame library is separate from GDS, the build proceedure for GDS will automatically download and install it for you.
- fftw3
- is a library of routines for performing Fast Fourier Transforms (FFT's)
- on-line vs. off-line DMT
- is an important but possibly confusing distinction....
- DOL
- is an off-line version of DMT which is being given the ability to read data via "Grid" facilities. The acronym stands for "DMT Off-Line". It's still a work in progress. You can find out more about DOL from MIT ....
- interactive -vs- batch
- is a similar but separate distinction one can make...(explain)
Software Prerequisties
(Describe here which versions of the software to use and how to get it (via CVS?), but save the build instructions for the next section.
- ROOT
- I'be been able to build and use dmtroot with ROOT 4.04g with GDS 2.10, but attemts to use ROOT 5 have failed initially. Seems to be a problem with missing symbols or names with extra ID stuff in them in the lbraries. I've not yet investigated further, but I'd like to get it to work with ROOt 5.
- GDS - Global Diagnostic System
- separate page on how to build this, since it's a bit tricky. Key point: to use ROOT you need the on-line not off-line version of GDS. Current version is still 2.10.8
- FrameCPP
- automatically downloaded and built by the GDS build script. discuss ways to control this, it can be annoying or a problem if it gets the 'wrong' version.
- pkg-config
- FC3 needed update, FC4 and FC5 were fine. autoconf and automake were fine? Or did I have
- what else...?
- compiler version?
Assembling dmtroot
First how to build the pieces, then where to put themBuild
- You need to build ROOT first, then build GDS, with ROOTSYS set to point to the ROOT you have installed. That way it will use the 'current' version of the dictionary generator for the .so files.
- Build GDS after you set ROOTSYS The result is that you need to say
setenv GDSBUILD online(or similar for your shell) or the .so files will not be useableInstallation
(where to put the stuff)
The tricky bits...
(these need to be better organized, and some moved to other sections)After going over how ROOT is used in LIGOtools and dmtroot I have a number of small suggestions about how to make the already complicated process a bit easier to understand.
- ROOT will only load shared object libraries (.so files) if they are in directories listed in LD_LIBRARY_PATH, even if you provide a full path name to the library. I consider this a bug. I've seen this in ROOT 4 but not yet tested ROOT 5. If it's the same in ROOT 5 I'll report this as a bug.
The result of this is that you need to add the proper directories to LD_LIBRARY_PATH in the script that fires up ROOT (ltroot or similar).
- ROOT cannot use the classes from DMT from the shared object libraries unless they include the dictionaries, which have to be generated using the CINT dictionary generator (http://root.cern.ch/root/CintGenerator.html). As presently configured, this is done for the DMT/GDS on-line build, but not for the off-line build (and not for DOL).
The result is that you need to say
setenv GDSBUILD online(or similar for your shell) or the .so files will not be useableQuestion: is there a good reason not to do this for DOL (DMT off-line)? Perhaps there is no ROOT support intended? Perhaps it could be a clearer option?
- I would like to include the metaio routines in the latest version, so that I can read/write LIGO_LW files. Will the libmetaio.so file work as built or do I need to do anything more than load it?
- The executable name should be 'dmtroot' not 'root' if it is not a regular CINT ROOT.
Actually, the 'root' that is installed is a vanilla CINT root executable, but 'ltroot' then also loads .so files for various components. I have a script called 'dmtroot' whichn is similar to 'ltroot' but loads the .so files via a different mechanism, and so far only loads the DMT libraries, not including FrvROOT (because that won't build).
The distinction is confusing. Eventually dmtroot and ltroot should be the same command, even if the implementations are different.
- package extentions - load order matters but this is not clear. How about we pre-pend numbers to file names in LIGOTOOLS/root/ to insure that the load order is clear? Right now it just works because 'basegdsrootLogin.C begins with a 'b'. At least a comment in the script about this?
- set LD_LIBRARY_PATH explicitly in ltroot script, it is required for loading a dynamic library (a bug in ROOT?) (Need to test this in ROOT 5)
- Maybe ltroot script checks/modifies $HOME/.rootrc since you *must* have that correct to load macros?
No. It could just check it, but not modify it. It should already have a good default in it's own etc directory if $HOME/.rootrc does not exist. Most people should not have a ~/.rootrc, (unless there is a config tool that is putting one in place, which is not the best way to do it, but seems to be how LIGOtools does it.)
Running dmtroot
(Here I'll provide instructions on how to run it, and a link to my own dmtroot scripts for Unix and PHP).References
- LIGOtools: http://www.ldas-sw.ligo.caltech.edu/ligotools/
- DMT: http://www.ligo.caltech.edu/~jzweizig/dmt/DMTProject/
- ROOT: http://root.cern.ch
- How to read frame data into ROOT (Warning: this page is sketchy)
- GDS Home page
- DMT on Red Hat 9
- LIGO GDS DMT on Debian GNU/Linux
- Data Monitoring Tools (DMT) project
- ROOT from CERN
Acknowledgements
Many thanks to Peter Shawhan for providing me with the Makefile and supporting scripts for building dmtroot . I hope to be able to return the favor by giving back to him a newer Makefile which will assemble a newer dmtroot package from a more current GDS build. I'm getting there, but it's not ready yet.-- Eric Myers
Copyright © 2007 by Spy Hill Research http://www.Spy-Hill.net/~myers/help/ligo/dmtroot.html (served by Islay.spy-hill.com) Last modified: 03 September 2007