Size of ROOT Tree

I have created a binary file consisting of the following data:

Binary File
UChar_t (detector id)
UChar_t (Time-of-flight in tenths of nanoseconds.)
UChar_t ( " )
UChar_t ( " )
UChar_t ( " )
UChar_t (Energy 1)
UChar_t ( " )
UChar_t (Energy 2)
UChar_t ( " )

I have also created an uncompressed ROOT Tree consisting of the same data but using the natural variables rather than breaking the data into UChar_t:

Branch1:
UChar_t (detector id)
Int_t (Time-of-flight in tenths of nanoseconds.)

Branch 2:
Short_t (Energy 1)
Short_t (Energy 2)

In both cases the size of a single event is 9 bytes. For 802212 events written out to the binary file I get a file size of 7219908, which is exactly what I expect. The ROOT tree is almost 4 times the size of the binary file. Why?

Could you post a RUNNING script showing what you are doing?

Rene

Unfortunately that is not easy since the code output occurs after running through a lot of event by event data using a large ROOT based program. I will try to put something together over the next few days.

Jan