GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BrowserDB.C File Reference

ROOT macro to display (radware, midas, gpsi, etc) spectra from the ROOT TBrowser. More...

Go to the source code of this file.

Functions

void BrowserDB (const char *hname)
 

Detailed Description

ROOT macro to display (radware, midas, gpsi, etc) spectra from the ROOT TBrowser.

This macro is an illustration on how HistoDB could be used to enhance the ROOT TBrowser object to be able to display spectra from other histo DB systems just by clicking on icons.

First, you must install properly the GammaWare on you system [http://agata.in2p3.fr].

Open your /Users/stezow/.root.mines file. If you don't have this file, copy one from the ROOT distribution (in the etc directory). This is the file that is read by ROOT to configure the ROOT TBrowser icons and on-click actions. In this file adds the following lines:

[root/file]
pattern = *.s *.spe *.eg
icon = hdb_s.xpm hdb_t.xpm
action = .x BrowserDB.C("%s")
Go to the GammaWare demos/tools directory, run root and open a TBrowser:

root
root [0] TBrowser b
In the window corresponding to the current system directory, you should see something like:

RadinROOT.gif

Double clicked on the spectrum (radware or midas) you want to see and it will be displayed. The macro just list the content of the gpsi .. but it could be easily modified to load all the spectra for instance in a THStack collection which is a ROOT dedicated object for collections of histograms.

Author
Olivier Stezowski
Date
14/10/2005

Definition in file BrowserDB.C.