[ROOT] Tree print and compression question

From: Christian.Doerr@mpi-hd.mpg.de
Date: Fri Apr 19 2002 - 10:26:46 MEST


Good morning everybody,

today I have a simple question about writing events to a tree.
I link some Root classes with geant4 to create a Tree with one brach to
store my event class:

  // create tree with branches
  fTree = new TTree(localTreeName,"A Tree with Events");

  // create pointer to event object
  fEvent = new BBRootEvent();
  fTree->Branch(localBranchName,"BBRootEvent", &fEvent, 16000, 1);

  (... then create and fill some events and write to tree with
        fTree->Fill() )

  fTree->Write("",kOverwrite);


After rereading the information from file in a root session, I call

t->Print();

and get the following output:

******************************************************************************
*Tree    :MC_Tree   : A Tree with Events                                     *
*Entries :      184 : Total =           31330 bytes  File  Size =      17149 *
*        :          : Tree compression factor =  12.81                       *
******************************************************************************
*Branch  :MC_Branch                                                          *
*Entries :      184 : BranchElement (see below)                              *
*............................................................................*
*Br    0 :TObject   :                                                        *
*Entries :      184 : Total  Size=          0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size=      16000 bytes  Compression=   1.00     *
*............................................................................*
*Br    1 :fEventNo  :                                                        *
*Entries :      184 : Total  Size=          0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size=      16000 bytes  Compression=   1.00     *
*............................................................................*
*Br    2 :fNameOfDecay[30] :                                                 *
*Entries :      184 : Total  Size=          0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size=      16000 bytes  Compression=   1.00     *
*............................................................................*
*Br    3 :fFirstHit[20] :                                                    *
*Entries :      184 : Total  Size=          0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size=      16000 bytes  Compression=   1.00     *
*............................................................................*

.... and so on.


My question is: Why does it say

	 Total  Size=          0 bytes  File Size  =          0

for every branch, though the tree is appearantly not empty. The data is
correctly stored, I can read it and fill histograms with it and so on.
I just wonder....

Thanks a lot for any reply

Cheers, Christian

PS: I'm using Root version 3.01/06 and Geant4 4.0
    under SuSE Linux 7.3 with gcc version 2.95.3

-----------------------------------------------------------
Christian Doerr
Max-Planck-Institut fuer Kernphysik, Heidelberg
Bothe-Labor, room 232                phone: +49-6221-516-259
email: C.Doerr@mpi-hd.mpg.de         www.christiandoerr.de
-----------------------------------------------------------



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET