elaird / supy

analyze events stored in TTrees in parallel
8 stars 7 forks source link

plotter: add regexp blacklist #104

Closed gerbaudo closed 12 years ago

gerbaudo commented 12 years ago

This is a feature to exclude from the final pdf the intermediate plots. I use this when there are several intermediate histograms to veto, and writing the 'blacklist' list of names is painful--for example when I plot several trigger turn-on (many num/den histograms, but I care only about their ratio).

Example usage: in one's analysis

import re ... supy.plotter(..., blackListRe = [re.compile(r'num'), re.compile(r'den')],...)

gerbaudo commented 12 years ago

Thanks, Burt! I didn't know about the 'any' function. You implementation is much more clear, indeed. Now merged on the blacklist-regexp branch.

betchart commented 12 years ago

This is fine with me. Ted, you can merge into master if you like. The diff is simple: blacklist is now regex patterns rather than absolute names, but I believe it is backward compatible.

elaird commented 12 years ago

Ok, merging now.