How to read frame data into ROOT

Peter Shawhan
Revised April 25, 2002

Warning: this page is sketchy

Two LIGOtools packages provide ways to read frame data into an interactive ROOT session, where it can be manipulated, displayed, etc. Note that the necessary libraries and macros for both of these packages are automatically loaded when you start up the LIGOtools version of ROOT by typing ltroot. (See the FAQ write-up about this.)

The dmtroot package

The Data Monitoring Tool software includes LIGO-specific container classes (such as time series and frequency series) as well as data-access and signal-processing functions which are designed to be easily used within an interactive ROOT session. There are a few ways to read in data, but the standard method is to set your DMTINPUT environment variable to contain the filename(s) you want to look at, then start up ltroot; a "data accessor" object called "In" will be created and will be set up to read from the file(s) you specified. You then can use statements like:
  In.addChannel("L1:LSC-AS_Q")
  In.fillData(16.0)
  TSeries *asq = In.refData("L1:LSC-AS_Q")
  TPlot(asq)
For more information, see the DMT documentation, especially the section entitled "Interactive (Foreground) Environment".

The Fr and Frv packages

The Fr package includes a ROOT-enabled shared-object library which makes the library functions available to ROOT's CINT interpreter. There is a companion package called Frv which provides additional functions to manipulate the FrVect objects which are read from frame files, including vector arithmetic, linear filtering, and Fourier transforms. These functions may be used interactively within ROOT. For more information, see the documentation for the Frv package.