Problem with histogram stats when executing macros

From: Antonio Bulgheroni <>
Date: Sun, 29 Oct 2006 09:46:10 +0200

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 Bulgheroni, PhD

Computers have a lot in common with air conditioners:
Once you open WINDOWS, they stop working properly.

  • application/octet-stream attachment: test.root
  • text/x-c++src attachment: test.C
Received on Sun Oct 29 2006 - 08:46:19 MET

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