RE: Adding histos

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Wed, 18 Jul 2007 13:05:49 -0500


Hi Manuel,  

You use the attached script to add your 3D histo with you version of ROOT as follow:

   root [] .L fix.C+
   root [] ...
   root [] TH3_Add(h13d, h23d); // instead of h13D->Add( h23D );

Cheers,
Philippe.


From: owner-about-root_at_listserv.fnal.gov [mailto:owner-about-root_at_listserv.fnal.gov] On Behalf Of Manuel Mussini Sent: Tuesday, July 17, 2007 4:44 PM
To: ABOUT-ROOT_at_fnal.gov
Cc: roottalk_at_pcroot.cern.ch
Subject: Adding histos

Hi,

can anyone help me to understand if there's a trick to use in this case?

I'm trying to add TH3 histos in ROOT 4.00/08 this way (like in hadd.C):  

TH3 *h13D = (TH3*)obj;

h13D->Sumw2();

TH3 *h23D = (TH3*)key2->ReadObj();

h13D->Add( h23D );  

and it crashes because of a TH1::Add() problem:

...

 0xb6a2a303 in TH1::Add(TH1 const*, double) at hist/src/TH1.cxx:794 from
/afs/infn.it/project/cdf/cdfsoft/products/root/v4_00_08gGCC_3_4_3/Linux+2.4-
2.3.2/lib/libHist.so

 0xb6acd2d6 in <unknown> from
/afs/infn.it/project/cdf/cdfsoft/products/root/v4_00_08gGCC_3_4_3/Linux+2.4-
2.3.2/lib/libHist.so

...  

Using ROOT 5.16/00 everything works fine!!!!!!!!!  

Is there a way to get rid of this bug in ROOT 4? Unfortunally I can't decide the ROOT version while running my jobs!  

Thanks!  

Bye.  

Received on Wed Jul 18 2007 - 20:06:02 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 19 2007 - 11:50:01 CEST