diff --git a/Phys/B2KShh/job/selection.py b/Phys/B2KShh/job/selection.py index 9b53ce3..c443ab7 100644 --- a/Phys/B2KShh/job/selection.py +++ b/Phys/B2KShh/job/selection.py @@ -62,10 +62,12 @@ # #clones.append(truth_tree.tree.CopyTree('')) # truth_tree.cptree = truth_tree.tree.CopyTree('') for t in recotrees: - print '\tCopying %s tree...' % t.tree.GetName() - t.cptree = t.tree.CopyTree(' && '.join([sel_strings[sel_name] for sel_name in sel_names])) if not outfile.GetDirectory(t.location): + print '\tMaking directory %s ...' % t.location outfile.mkdir(t.location, t.location) + outfile.cd(t.location) + print '\tCopying %s/%s tree: ...' % (t.location, t.tree.GetName()) + t.cptree = t.tree.CopyTree(' && '.join([sel_strings[sel_name] for sel_name in sel_names])) t.cptree.SetDirectory(outfile.GetDirectory(t.location)) t.cptree.AutoSave() #clones.append(t.tree.CopyTree(' && '.join([sel_strings[sel_name] for sel_name in sel_names])))