PickEvents filter extended to select based on run lumi section; it accepts the list of the CMS certification
json files from certification of Jan22 8TeV rereco, chosen according to: https://hypernews.cern.ch/HyperNews/CMS/get/susy/1558.html
import PickEvents instances to do what you want
PickEvents w/ run:lumisection and verbosity removed; algo is linear, and yet 0.2 ms per event using dcs-only json
Merge pull request #4494 from franzoni/pick-events-based-on-runLS-from-CMSSW_7_1_X_2014-07-02-0200

PickEvents based also on run:ls