Re: MakeClass

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Sep 01 1999 - 11:54:54 MEST


Hi Christopher,
You are right. In case you have different names for the variable and
the branch name, the code generated by MakeClass is not correct.

In the version 2.23 coming this week, I have made substantial changes
to TTree::MakeClass (to support TChains). I had already fixed this
problem.

Rene Brun

Christopher A. Stevens wrote:
> 
> Noticed the following while playing with MakeClass.  I did  (shortened)
> TFile *f = new TFile("test.root","RECREATE");
> TTree *cains = new TTree("cains","S-3 Data");
> Double_t YTS=0;
> TBranch *YearTimeSec = cains->Branch("YearTimeSec", &YTS, "YTS/D");
> cains->Fill();
> f->Write();
> f->Close();
> // Restart Root
> TFile *f = new TFile("test.root");
> cains->MakeClass("test");
> In test.h I have a
>     Double_t        YTS;
>     TBranch        *b_YearTimeSec;
> But in the implementation of Init I have
>     b_YTS = fTree->GetBranch("YearTimeSec");
>     b_YTS->SetAddress(&YTS);
> Shouldn't b_YTS be b_YearTimeSec?  b_YearTimeSec does not seem to be
> used at all.  Or am I missing something?
> Chris
> --
> Christopher A. Stevens
> Navigation/Data Reduction
> Voice (301) 342-3181 x263 Fax   (301) 342-4745



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