TTree->MakeClass() : how can I get a branch arborescence ? / what about arrays in the TBrowser ?

From: Patois Yannick (patois@ganil.fr)
Date: Thu Nov 04 1999 - 19:06:34 MET


Hi rooters,

First thanx to Rene Brun for his prompt answer to my previous question.
But, of course, I have some other ones :

I declare a C_brut_plastic_data as follow : 
---
class C_brut_plastic_data : public TObject
{
public:
  C_brut_plastic_data (void);
  ~C_brut_plastic_data(void);
public:
  UShort_t T [4];
  UShort_t Q [4];
  UShort_t Qa[4];
  ClassDef(C_brut_plastic_data,1)
};
---

I then generate the dictionnary for this class and everything. I create 
a .root file with some data.

In root I load the shared lib, seems OK.

My data seems to be recognised as an array :

Root > .class C_brut_plastic_data
[...]
Defined in C_brut_plastic_data
0xc        UShort_t T[4]
0x14       UShort_t Q[4]
0x1c       UShort_t Qa[4]

0x14-0xC = 8 = 4 * 2bytes, what I asked for.

But when I open a TBrowser window and go to look into my file, it only
show me an object called 'T[4]' and it seems that I cant access the
T[i].

Is there a simple way to get this ?

More... (and far more annoying) :

I created several branches, and they do appears in different 'folders'
in the TBrowser.

But when I do a :
root [2] my_tree->MakeClass("my_tree");    

I get a 'flat' description of my objects... Worse, if two have the same
name they seems to be simply doubled in the declaration... extract of
'my_tree.h' :

//Declaration of leaves types
   Float_t         T[4];
   Float_t         E[4];
   Float_t         Ea[4];
   UInt_t          fUniqueID;
   UInt_t          fBits;
   Float_t         dEc;
   Float_t         dEr;
   Float_t         theta;
   Float_t         phi;
   Float_t         Qc;
   Float_t         Qr;
   Float_t         Qloc;
   Float_t         hit_P;
   UInt_t          fUniqueID;
   UInt_t          fBits;

'fUniqueID' and 'fBits' (what are those by the way ?) are simply
duplicated in the declaration, originally they belong to two differnt
branches.

Shouldnt those data be packed by branches some way ? 

	Yannick

 _/ Yannick Patois _________________ Address (home) __________________
| irc(undernet): Garp on #france25+ | La Villa des Sciences            |
| email : patois@ganil.fr           | 12, avenue de Cambridge          |
| web :http://www.sura.org/~patois/ | 14200 Herouville-Saint-Clair     |
| Tel/Fax-home:+33 (0)2 31 94 50 32 | FRANCE                           |
|___________________________________|__________________________________|



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