Using your file and ROOT 4.02/00, from
a d I can reproduce that
Generate a file much large. This is due to the fact that in this case, the file is recreate by merge with the default compression level (1) which does not work nearly as well on your files as the one use you used (9).
So you would be using:
m_The_Chain->Merge(FileToWriteFinal,1001,"C"); which works perfectly for me.
To understand the reason of the crah you are seeing, you might want to run in the debugger and see what the stack trace is.
From: Giovanni Franzoni [mailto:franzoni_at_mail.cern.ch] Sent: Friday, February 18, 2005 5:34 PM
To: Philippe Canal
Subject: RE: [ROOT] TChain -> Merge()
On Fri, 18 Feb 2005, Philippe Canal wrote:
> Can you provide me with a way to reproduce this problem?
Hi Philippe, thanks for your reply.
Sure I can.
/afs/cern.ch/user/f/franzoni/public/Root_Merge you find:
Merge_test_1.root Merge_test_2.root Merge_test_3.root which
(which I report here after)
is the little macro that should merge the three trees. v4.02.00/rh73_gcc296/
Thanks and good evening, Giovanni
TFile * FileToWriteFinal = new TFile("Merge_Test_All.root","RECREATE");
TChain* m_The_Chain = new TChain("T1"); m_The_Chain -> Add("Merge_test_*.root"); m_The_Chain->Print();
FileToWriteFinal -> cd(); FileToWriteFinal -> SetCompressionLevel(9);
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
> On Behalf Of Giovanni Franzoni
> Sent: Friday, February 18, 2005 10:40 AM
> To: roottalk
> Subject: [ROOT] TChain -> Merge()
> Hi Rooters,
> I am trying to merge trees of the same kind which sit in different
> (smaller) files into one.
> Sorry, I know this issue has already been proposed in the past but I was
> not able to find the reply to noeding (<merging root files>, Fri May 28,
> 2004 14:04).
> I use a TChain and:
> crashes, while
> gives me a final file whose size is roughly one hundred times bigger than
> the sum of the initial smaller files.
> I have tried both with uncompressed and compressed (level 9 files).
> I tried with several releases, for instance v4.02.00/rh73_gcc296/.
> What am I doing wrong?
> Thanks, regards, Giovanni
--Received on Mon Feb 21 2005 - 19:53:14 MET
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:05 MET