Re: macro arguments, and histogram titles

Rene Brun (Rene.Brun@cern.ch)
Tue, 27 Oct 1998 18:07:40 +0100


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