Re: [ROOT] TChain, TClonesArray and inheritance

From: Benoit Revenu (revenu@cdf.in2p3.fr)
Date: Thu Jan 10 2002 - 09:47:07 MET


> Rene Brun
> 
> Rene Brun wrote:
> > 
> > Hi Benoit,
> > 
> > The main problem in your test was that you delete the TClonesArray
> > in the Gentest destructor and you do not reset the static gtca.
> > 
> > I have recoded/simplified your example. See attachement
> > 
> > untar test.tar.gz
> > run the 3 lines script go
> > root -b -q test.C
> > root macro.C
> > 
> > Rene Brun
> > 

Dear Rene, thanks a lot for your help. But another problem remains : in my
analysis, I want to use two derived classes :
class Test : public GenTest
class Test1 : public GenTest
(for instance to separate random data with physical data),
so that I can't use the example you gave me since the static TClonesArray
will be the same for the two instances of Test and Test1 and I don't want
that to happen.
That's why I think I have to use something like what I did before, namely,
setting 1 different static TClonesArray in each derived class Test and
Test1. And in this case, I have the problem I explained in my first mail.



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