Re: Problem with histogram stats when executing macros

From: <>
Date: Sun, 29 Oct 2006 09:56:12 +0100

Hi Antonio,

    try to draw the histogram in a canvas you first declare, then update it(canvas->Update();), and then with:


you should get the canvas. Try this, it usually works for me.



Quoting Antonio Bulgheroni <>:

> Dear ROOTers,
> in this days I'm preparing a macro in which several files are
> opened and histograms from different files are stacked together and
> compared. I'm having some problem getting the TPaveStats object from an
> histogram but only when commands are executed within a macro. Attached you
> can find both the macro and the ROOT file containing the histogram.
> If I load the macro (.L test.C) and execute the function test(), the
> TH1D::FindObject("stats") fails and the TPaveStats pointer is null, instead
> if I copy/paste all the instructions into an interactive ROOT session, I got
> a proper TPaveStats pointer. What's wrong? Can you reproduce the problem on
> your system?
> I'm using ROOT v5-11-06 on a SLC 4 box.
> Thanks in advance for you help.
> Best regards,
> Antonio
> --
> Antonio Bulgheroni, PhD
> Computers have a lot in common with air conditioners:
> Once you open WINDOWS, they stop working properly.

This message was sent using IMP, the Internet Messaging Program. Received on Sun Oct 29 2006 - 09:55:48 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET