Re: macro arguments, and histogram titles

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Oct 27 1998 - 18:07:40 MET


Charles Leggett wrote:
> 
> How can one pass an arguement to a macro from the root command line? Whenever I
> try to do something obvious such as
> void test(int I) { ... }
> it results in a segmentation error. I didn't see this covered anywhere in the
> tutorials.
> 

Please give more details about this trivial problem.
If you have a function "void test(int I)" in a macro file.C
you can do:
  Root > .L file.C
  Root > test(8)
If the macro has the same name as the function (eg, test.C), you
can do directly
  Root > .x test.C(8)

see Root course1 at page 24
    ftp::/root.cern.ch/root/course1.ps.gz


> Also, I've found that when one choses to not view the histogram title from the
> "Options" menu, fairly often all TPaveText objects and TLine objects will also
> be removed. Re-executing the macro which produced the histogram will bring them
> back though. This is using v2.00/12 under Linux.

This is hard to believe! Are you running with the X backing store ON ?
Are you using the executable generated on our Web site?

Rene Brun



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