Re: THSTack, saving as .C

From: Olivier Couet <Olivier.Couet_at_cern.ch>
Date: Tue, 19 Apr 2011 08:00:26 +0000


Hi,

I found the faulty patch:
http://root.cern.ch/viewvc/trunk/hist/hist/src/TH1.cxx?r1=29899&r2=30001 I am trying to find a solution.

Olivier

From: Alexandros Attikis <attikis_at_cern.ch<mailto:attikis_at_cern.ch>> Date: Mon, 18 Apr 2011 18:01:32 +0200
To: "roottalk (Mailing list discussing all aspects of the ROOT system.)" <roottalk_at_cern.ch<mailto:roottalk_at_cern.ch>> Subject: [ROOT] THSTack, saving as .C

Hi,

it appears that I have stumbled across a bug, or so I believe. I've noticed that If you have a THStack and you save the TCanvas as ".C" upon executing this macro I get a crash: error: Symbol THSTack1 is not defined in current scope

However, it turn out that this can be avoided be setting: myTHStack->SetHistogram( (TH1D*) myTHStack->GetHists()->At(0));

Is there a way to avoid this because it gives rise to other problems - like replacing the histogram (TH1D*) myTHStack->GetHists()->At(0) in memory.

I have attached the macro reproducing the problem. I am running ROOT 5.28.

Cheers,
Alexandros Received on Tue Apr 19 2011 - 10:00:34 CEST

This archive was generated by hypermail 2.2.0 : Tue Apr 19 2011 - 11:50:01 CEST