Re: [ROOT] dinamic memory allocation within ROOT

From: cell (murat@fnal.gov)
Date: Fri Nov 29 2002 - 20:48:12 MET


On Fri, 29 Nov 2002 15:22:43 -0200 (BRST)
"Henrique de M. J. Barbosa - mestrado" <hbarbosa@ifi.unicamp.br> wrote:

> 
> Pasha,
> 
> Thanks a lot for the advice, now it works. One more question: do you know 
> if it is possible to get the entries from a TObjArray with the proper 
> type? 
> 

Hi Henrique, 

the general answer is "no", but I think you'd agree that in practice 
there is no reason for you not to know the type of the objects stored
in the list, created by yourself. Therefore,

TH1* hist = (TH1*) Histo_List[0];
hist->whatever_method_of_your_histogram_class()

covers [again - in practice!] absolute majority of the normal human 
needs. -best, Pasha



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:21 MET