Re: TBrowser can't read objects in a file??

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Apr 12 1999 - 18:13:11 MEST


Hi Chris,
The TBrowser browses automatically all objects declared folders.
The TDirectory is a floder. You should be able to see the TDirectory
in the browser.
If you want to have your cevent, etc, browsable, you must implement
two functions (defined as dummy in TObject).
  TObject::IsFolder() {return kTRUE;} // if your class is browsable
  TObject::Browse(); to implement the Browse action.
For examples of the Browse function, I suggest you look examples
in the Root classes (TDirectory, TNode, TClass, etc..)

Rene Brun



On Mon, 12 Apr 1999, chris garcia wrote:

> hi guys.  i have been working with directory structures on a root file in
> the hopes of ordering various objects into directories.  i first wrote a
> c++ macro that wrote these objects (event, tracks, etc., just various
> classes associated with cdf runs) and then opened up the file in root and
> in a TBrowser window.  this seemed to work fine.  i have since made a java
> interface for doing this, and now can only see the first directory that i
> created in the browser.  but, if i do a map of the file, i get
> 
> 990412/102147  At:64        N=116       TFile
> 990412/102147  At:180       N=81        TDirectory
> 990412/102148  At:261       N=83        ctrack
> 990412/102148  At:344       N=83        ctrack
> 990412/102148  At:427       N=83        ctrack
> 990412/102148  At:510       N=83        ctrack
> 990412/102148  At:593       N=83        ctrack
> 990412/102148  At:676       N=83        ctrack
> 990412/102148  At:759       N=83        ctrack
> 990412/102148  At:842       N=83        ctrack
> 990412/102148  At:925       N=71        cevent2
> 990412/102148  At:996       N=81        TDirectory
> 990412/102148  At:1077      N=83        ctrack
> 990412/102148  At:1160      N=83        ctrack
> 990412/102148  At:1243      N=83        ctrack
> 990412/102148  At:1326      N=83        ctrack
> 990412/102148  At:1409      N=83        ctrack
> 
> etc. which looks right (or close enough).  any way to make this visable in
> the browser?? thanks in advance
> 
> 
> 						chris
> chris garcia
> cdf group, the ohio state university
> 



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