# Root 6.04.14 hadd 100Gb and rootlogon

**URL:** <https://root-forum.cern.ch/t/root-6-04-14-hadd-100gb-and-rootlogon/24581>\
**Category:** ROOT\
**Created:** [April 28, 2017, 8:15am UTC](https://root-forum.cern.ch/t/root-6-04-14-hadd-100gb-and-rootlogon/24581 "2017-04-28T08:15:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![msaimper](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/f0a364/32.png) [@msaimper](https://root-forum.cern.ch/u/msaimper)\
**Post date:** [May 2, 2017, 7:23am UTC](https://root-forum.cern.ch/t/root-6-04-14-hadd-100gb-and-rootlogon/24581/3 "2017-05-02T07:23:06Z")

</div>

Dear Philippe,

thank you very much for your message, this is very helpful!

In addition, let me copy/paste here a little python script a colleague passed me which does the job also in case people visit this thread (\*).

Thanks again for your help  
Best wishes  
Matthias

(\*)

```auto
import ROOT
import os, sys

print 'Merging %s' % sys.argv[1]

print "Max tree size",ROOT.TTree.GetMaxTreeSize()
ROOT.TTree.SetMaxTreeSize(200000000000) # 200 Gb
print "Updated tree size",ROOT.TTree.GetMaxTreeSize()

rm = ROOT.TFileMerger(False)
rm.SetFastMethod(True)

path = 'mypath'
file_output = '%s.root' % sys.argv[1]
file_list = []
for path, dirs, files in os.walk(path):
  for filename in files:
    if ('%s_part' % sys.argv[1]) in filename: file_list.append(path+filename)

print "Input file list:",file_list
print "Output file:",file_output

for F in file_list:

    print "Adding ->",F
    rm.AddFile(F)

rm.OutputFile(file_output)
rm.Merge()

```

---

_[View the full topic](https://root-forum.cern.ch/t/root-6-04-14-hadd-100gb-and-rootlogon/24581)._
