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 #4496 from franzoni/pick-events-based-on-runLS-from-CMSSW_7_2_X_2014-07-01-0200

Pick events based on run ls from cmssw