Re: Add THnSparse problem

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Thu, 15 May 2008 19:18:12 +0200


Hi Smbat,

I see that in your example THnSpare::Add() writes to a memory location that it shouldn't be writing to. I'll fix it tomorrow. It might or might not be related to the problem with the number of entries you observed.

Cheers, Axel

Smbat Grigoryan wrote:
> Hi,
>
> I have the following problem when merging root files including
> THnSparse. I've modified the hadd.C macro from the tutorials,
> adding the part for THnSparse like it is done for histograms
> (see Add.C in the attachment). To show the problem I included
> in the attachment 2 root files containing THnSparse of dim 5
> and the resulting root file obtained using Add.C.
> The problem is that the number of entries of the resulting
> THnSparse is not equal (is smaller) to the sum of entries of
> the initial THnSparse-s. In the attachment you can find a
> small macro which shows that the method THnSparse::Add() works
> correctly when used directly, but not in Add.C.
> Apparently the problem is in Add.C
> Could anybody help to correct Add.C for THnSparse?
>
> Thanks in advance,
> Smbat
Received on Thu May 15 2008 - 19:18:59 CEST

This archive was generated by hypermail 2.2.0 : Fri May 16 2008 - 23:50:02 CEST