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

From: Angela Biselli (biselli@angel.phys.rpi.edu)
Date: Mon Jul 31 2000 - 20:31:53 MEST


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