README roottools 12/5/2003 D. Lawrence This directory contains tools useful for integrating ROOT into the PrimEx analysis software. It was created, in particular, to provide an easy, consistent way for programs to serve up histograms in an online environment so that remote root sessions could access them while they are being filled. To make histograms available: -------------------------------- 1. Include roottools.h header to your main program and hist_book.cc #include "roottools.h" 2. Set the port number for the TCP/IP connection in main(). This number is specific to the program since all must be unique. Several subsystems already have values reserved. These can be found in roottools.C. Here's a list: 9090 tac 9091 hycal 9092 ps 9093 veto 9094 tagger ROOT_SERVER_PORT = 9090; 3. Register the root server init and event procedures with PEvent_Loop. event_loop.RegisterINITProc(InitRootServer); event_loop.RegisterEVNTProc(RootServer); To access histograms remotely: -------------------------------- 1. Start up ROOT and load the roottools.C file >root root [0] .L roottools.C 2. If you are running root on a different machine than the server is running on, set the host of the server location (skip this step if running on the same machine) root [1] sethost("clon00") 3. List the histograms available for a specfic system root [2] cd("tac") root [3] ls() 4. Retrieve a histogram and draw it root [4] Draw("tac_tdc") 5. The most recently retrieved histogram (via Draw()) will stay in memory until a newer version is retrieved with the same name.