use of TMap

Richard Dubois (richard@SLAC.stanford.edu)
Mon, 31 Aug 1998 19:29:10 -0700


I would like to use a TMap in a way that I would use an STL map: I have
an ascii file I am parsing and want to use the map to find out whether
an entry (an int) has occurred already.

With an STL map, I would use the find on the key (which would be the
int) and be told if it is already in the map. With TMap I must create an
object inheriting from TObject which contains the int. TMap's FindObject
requires a pointer to the key. But I would have to make a new key object
to hold the int; then it wouldn't be in the TMap since it is new.

Is TMap not meant to be used in this way?

Thanks,

Richard