[ROOT] Size of root file after writing a subset of a tree

From: Frank Winklmeier (frank.winklmeier@colostate.edu)
Date: Mon Jan 26 2004 - 23:54:53 MET


Hi,

I want to select a subset of a tree which is split over several files and 
save this subset to one new file. Everything works fine but the resulting 
file size is much bigger than the sum of the input files.

I start with:

TChain *chain = new TChain("tree");
chain->Add("data-*.root");     

// there is data-1 to data-21, each about 13 MB

TFile f("subset.root");
TTree *subtree = chain->CopyTree("m0b0>0");
f.Write();

The resuling size of subset.root is about 560 MB !!!
But the total size of the (unfiltered) input is only about 270 MB.
The compression level is 1 in all the files.
The selection criteria "m0b0>0" selects about 50% of all entries.
I am using RooT version 3.10-01 on RH9.

How is that possible? Why is the compression so much worse for the subset?

Thanks,
Frank



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET