Re: File size and Clone Tree

Rene Brun (Rene.Brun@cern.ch)
Mon, 19 Apr 1999 21:18:51 +0200 (METDST)


Hi Olivier,
I assume that you run with the default compression level 1.
If this is the case, my explanation is the following.
If you leave the original variable T, Root will compress more
because, probably, you have at least 4 bytes that are always
identical in T.
If you store instead T' = T-T0, the new variable (double)
will have a few bytes non significant (noise). This cannot
be compressed as much as in the first case.
So the message is: Do not try to be more clever than
the compression algorithm is.
You could try for example to store T'=T-T0 as a Float_t
instead of a Double_t.

Rene Brun

On Mon, 19 Apr 1999, Olivier Meplan wrote:

> Hi Rooters...
> Again questions about file size...
>
> I write a tree (1 sigle branch of object Event). These Event objects are
> made of a list of integers and one double_t corresponding to an absolute
> time. Then I want to transform this absolute time in relative one and
> make a new file containing a new tree: this tree is exactly a clone of
> the previous one execpt that the time T of each event has been modified
> to T'=T-T0;
> If I comment the line doing the time modification (via a member function
> of Event), the 2 files have the same size whereas if the time
> modification is done this is note the case (for exemple, the size of the
> initial file is 177 kb while the final file has a size of 185 kb)...
> Why and what can I do ?
> Thank you for your answer,
> O. Meplan
>