Re: filling histograms

Rene Brun (Rene.Brun@cern.ch)
Fri, 15 Aug 1997 14:00:37 +0200


Robert Loke wrote:
>
> Hi,
>
> probably it's just a silly mistake ...
>
> I try to fill an existent histogram using
>
> TH1F* InvMassSpectrum = new TH1F("invariant mass","invariant mass",500,0,5);
> ....
> InvMassSpectrum->Fill(InvMass);
>
> and receive such a strange strange error message like
>
> Error in <TList::AddBefore>: before not fond, object not added
>
> does anybody has an idea what went wrong? Or even better: how to
> repair this?

You may get this king of errors if you compiled your program
using old header files with a new library or vice-versa.
In this case the virtual table of pointers to member functions
is wrong and the system calls the wrong function.

Rene Brun