diff --git a/Phys/B2KShh/job/selection.py b/Phys/B2KShh/job/selection.py index c443ab7..71a40db 100644 --- a/Phys/B2KShh/job/selection.py +++ b/Phys/B2KShh/job/selection.py @@ -1,3 +1,4 @@ +from __future__ import division import sys import os import ROOT as r @@ -66,8 +67,9 @@ 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])) + n_new, n_old = t.cptree.GetEntriesFast(), t.tree.GetEntriesFast() + print '\t Copying {0}/{1} tree: {2:.1%} out of {3} events selected...'.format(t.location, t.tree.GetName(), n_new / n_old, n_old) 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])))