Re: Creating graphs in functions

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Nov 17 1998 - 13:55:47 MET


Matthew R. Nelson wrote:
> 
> Rene,
> 
> I realize that I am deviating somewhat from ROOT's primary intended use.
> What I want to do is avoid having to rewrite my library of combinatorial
> application classes to be ROOT/CINT-able, yet still capitalize on ROOT's
> powerful graphical capabilities.  I originally programmed some graphs into
> my main(), but they soon grew so large that I felt a need to move them into
> their own set of functions, to allow for easy mixing and matching.
> 
> Understanding that I may be abusing the ROOT way of doing things, do you
> have any suggestions for wrapping a series of ROOT commands, including
> creating a canvas, pads, and plots, into a function?
> 

Matt,
The Root classes can be called from:
  - the command line
  - an unnamed macro {...} run via .x macro.C
  - an interpreted file with several functions
         Root > .L file.C
         Root > function1();
  - a compiled program
  - a graphics object (TButton, TSlider, context-menus,etc)

Most examples in the tutorials show case 2.
Tutorials 15, 21 show case 3

Several examples in $ROOTSYS/test of compiled code calling Root classes.

You can look at the Root source code itself. You will find plenty
of examples with calls to Root classes from Root classes.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:39 MET