Re: Using THashTable

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Mar 12 1999 - 14:35:07 MET


Hi Piotr,

   when trying to find an object by name you must make sure that
your class' GetName() method returns the string you are looking for.
You must override this function from TObject. Make it something like:


const char *MPar::GetName() const
{
   // Returns name used by FindObject("name").

   return name.Data();
}

If you want to look for an object by pointer, make sure you
override TObject::IsEqual(). See for example TObjString.
To see how FindObject() works see the TList source.

For the NT problem check with Valery Fine (fine@bnl.gov).


Cheers, Fons.



Piotr ?wiat wrote:
> 
> Hi Fons,
> 
> Thanks a lot. Now it can find dictionary but I'm still
> getting NULL pointer returned from FindObject functions.
> That means if You call hashtable->FindObject("ObjectName");
> it returns NULL.
> 
> I've another problem with ROOT under NTSP3 with VC6.0SP2
> I can't run root at all. I'm getting message window with:
> The application failed to initialize properly (0xc0000022)
> Any hints.
> 
> Piotrek Swiat
> ufswiat@if.uj.edu.pl

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:30 MET