RE: [ROOT] problem with a tree with my own class branch

From: Philippe Canal (pcanal@popgtw.fnal.gov)
Date: Tue Aug 01 2000 - 20:08:42 MEST


Hi Angela,

As you noted changing the return type from double to Double_t work around 
the problem.  In the current release of ROOT, the TTree::Draw method can 
only use method that returns type like Int_t, Double_t, etc. (and NOT int,
double or float!).

This will be fixed in the next release.

Philippe Canal.

> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Angela Biselli
> Sent: Monday, July 31, 2000 1:32 PM
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] problem with a tree with my own class branch
> 
> 
> Dear Rooters
> I'm sorry if what I'm asking has been discussed already but I could not
> find any useful hint  in the roottalk messages and the documentation
> I wrote two classes V3 and V4 and I managed to create the dictionary and
> the so library.I then  wrote a small program that create a tree with a
> single branch that is a V3 object(split=0).
> 
>    Int_t split = 0;
>    Int_t bsize = 256000;
>    V3 *angela = new V3;
>    TFile *f = new TFile("A.root","recreate");
>    TTree *tree = new TTree("T","An example of ROOT tree");
>    tree->Branch("angela","V3",&angela,bsize,split);
>    for (Int_t i=0;i<10;i++) {
>       angela->SetV3(1.,2.,3.);
>       tree->Fill();
>    }
>    tree->Print();
>    tree->Write();
>    f->Write();
>    f->Close();
> 
>  When I try to draw any variable I always get a plot with the right number
> of events but all zeros
> 
> gSystem->Load("libVector.so") 
> TFile *f=new TFile("A.root");
> T->Draw("angela.GetZ()")  
> 
> Am I doing something wrong or am I trying to do something that is not
> possible
> I attached all the classes file,the Makefile and the main program
> 
> Any help would be appreciated
> 
> thanks
> 
> Angela
>  
> -- 
> Angela Biselli             homepage : http://ignatz.phys.rpi.edu/~biselli
> Graduate Student           e-mail:biselli@angel.phys.rpi.edu
> Office TEL.518-276-2050 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET