Re: [ROOT] TExMapIter query

From: Edward Moyse (edward.moyse@cern.ch)
Date: Mon Jun 23 2003 - 11:07:37 MEST


Perfect.

Thanks once again Rene - I'm very impressed at how the speed with which you 
manage to reply!

Ed

On Monday 23 June 2003 10:43 am, Rene Brun wrote:
> Hi Ed,
> The arguments to TExmapIter are Long_t, not ULong_t.
>
> If you change:
>  ULong_t key3;
>  ULong_t value3;
> to
>  Long_t key3;
>  Long_t value3;
>
> your script will work correctly.
>
> Rene Brun
>
> Edward Moyse wrote:
> > Sorry, I'm really dominating the list this morning ... I have severe
> > deadlines today!
> >
> > Can anyone tell me what I'm doing wrong here? I just want to iterate over
> > a TExMap, printing the values out.
> >
> > Cheers,
> >
> > Ed
> >
> > root [0] TExMap* testMap = new TExMap();
> > root [1] testMap->Add(1,2);
> > root [2] testMap->Add(2,56);
> > root [3] testMap->Add(3,256);
> > root [4] ULong_t key3;
> > root [5] ULong_t value3;
> > root [6] TExMapIter it(testMap);
> > root [7] while ( it.Next(key3, value3) ) cout << key3<<","<<value3<<endl;
> > 0,0
> > 0,0
> > 0,0



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET