Saving several TChains into one file?

Hello :smiley:

I have a problem: I can not save several chains into one file.

This is the idea how I do it:

TFile finalResult("finalResult.root", "RECREATE");

for(Chains::const_iterator cit=chains.begin(); cit!=chains.end(); cit++)
     TChain chain(cit->c_str());

     for(SlaveJobs::const_iterator it=slaveJobs.begin(); it!=slaveJobs.end(); it++)

     chain.Merge(&finalResult, 1000);
     // chain.Write();


I get this :frowning:

*** Break *** in TUnixSystem::DispatchSignals: segmentation violation
Generating stack trace…

If I substitute [quote]chain.Merge[/quote] by [quote]chain.Write[/quote] it works.

Please help me if I do something wrong :cry:

Thanks a lot!!! :slight_smile:

Cancel :smiley: I have caught the problem 8)