Tags:
tag this topic
create new tag
view all tags
---+!! How Merge root files %TOC% ---++ Ganga The easiest way is to let ganga handle it with with the RootMerger() <verbatim>j=Job(t) j.merger = RootMerger() j.merger.files = ['out-file.root']</verbatim> Note, this only works with non grid backends. This worked fine for me for ages until the merging program this calls stayed at 100% forever and the python memory usage consumed everything available. So I had to merge the files manually, see below. Apparently its caused by root not being backwards compatible, https://twiki.cern.ch/twiki/bin/view/LHCb/FAQ/GangaLHCbFAQ#Root_merging_fails_segfaults_rec suggests that changing your version of root could fix this. ---+++ Merging manually The program hadd is the one that the root merger calls to merge the files <verbatim>hadd ~/outputfile.root ~/input1.root ~/input2.root [...]</verbatim> When running manually this segfaulted on my root file, it turned out to be because I had run SetupProject Ganga at the beginning, by starting a new session and doing SetupProject DaVinci the hadd program no longer segfaulted, they probably pull in different versions of root, which are not compatible. ---++++ Merging many jobs If you have a few jobs each with hundreds of subjobs, this command will find all the output files and merge them. You will need to change 101 102 103 104 to your jobs numbers, output.root to the file that your jobs output and /opt/ppd/lhcb/user/place/to/save/merged-outputfile.root to where you want your file to be stored. I suggest storing big files in /opt/ppd/lhcb somewhere. <verbatim>cd ~/gangadir/workspace/uoh35620/LocalXML/ find 101 102 103 104 -name output.root | xargs hadd /opt/ppd/lhcb/user/place/to/save/merged-outputfile.root </verbatim> -- Main.ThomasBird - 2010-08-04
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r3 - 2010-09-07
-
ThomasBird
Home
Site map
Atlas web
CMS web
Computing web
Documentation web
PPDITForum web
LHCb web
PPDLabSpace web
Sandbox web
TWiki web
LHCb Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback