Re: [ROOT] Merging files

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Nov 29 2001 - 15:28:13 MET


Hi Christian,

The procedure to merge ROOT Trees is described in TChain::Merge. See:
   http://root.cern.ch/root/htmldoc/TChain.html#TChain:Merge

If you have files named file1.root,file2.root,file3.root, containing a Tree "T",
do
  TChain ch("T");
  ch.Add("file1.root");
  ch.Add("file2.root");
  ch.Add("file3.root");
  ch.Merge("big.root");

Rene Brun

Christian Schmitt wrote:
> 
> Hi ROOTers,
> 
> I have the following problem: I need to merge several hundred files, each
> containing the same tree. The total size is something like 10 GB.
> So I cannot use just TChain::Merge because of the 2GB limit of root-files.
> 
> Now my wuestion is: how can I merge the files such that ideally I get 5 to 6
> files with each having a filesize < 2GB ?
> 
> It should be a solution which works in general, i.e. doesn't make an
> asumption on the structure of the tree in the files (the only thing known is
> that the trees are simple trees, i.e. only integers, or floats are stored).
> 
> Thanks for your help,
> 
>         Christian Schmitt



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:10 MET