How do I make my object "browsable"

From: Tobias Raufer <T.Raufer1_at_physics.ox.ac.uk>
Date: Tue, 25 Mar 2008 10:51:12 -0000


Dear roottalk,

I have a simple class which inherits from TObject. Its data members are a few ints and doubles and a TClonesArray. I write objects of this type to a TFile.

Is there a way to make this class "browsable" in the TBrowser? I'd like to be able to click on the object in the TBrowser and inspect its data members. I read in the User's Guide that I have to override the method "IsFolder()" to return true. I've done this but it doesn't seem to be enough.

Do I have to implement my own Browse() method? When I stick my object into the branch of a TTree, I can browse it's contents. However, I want to avoid using a TTree and just save it to the TFile directly.

Thanks for your help,

        Tobi

P.S. My system info: Mac OS X 10.4, Root v5.17/03

---
Tobias Raufer

R1,2.90, RAL
Chilton, Didcot
OX11 0QX, UK

+44 1235 778842
+44 1235 446733 (fax)
t.m.raufer_at_rl.ac.uk
Received on Tue Mar 25 2008 - 11:51:21 CET

This archive was generated by hypermail 2.2.0 : Tue Mar 25 2008 - 17:50:01 CET