CMS 3D CMS Logo

dcsonly_json_2012.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from FWCore.PythonUtilities.LumiList import LumiList
3 from os import environ
4 from os.path import exists, join
5 
6 def findFileInPath(theFile):
7  for s in environ["CMSSW_SEARCH_PATH"].split(":"):
8  attempt = join(s,theFile)
9  if exists(attempt):
10  return attempt
11  return None
12 
13 #--------------------------------------------------
14 # Pick a set of events
15 # defined by a set of run:luminositysection
16 #--------------------------------------------------
17 
18 dcsonly_json_2012_pickEvents = cms.EDFilter(
19  "PickEvents",
20 
21  # chose between two definitions for the selection:
22  # run/lumiSection -based with input from a json file (what THIS example does)
23  # run/event -based with input from a json file (the historical PickEvents)
24 
25  IsRunLsBased = cms.bool(True),
26 
27  # the file listrunev is unused, in this example
28  RunEventList = cms.untracked.string('DPGAnalysis/Skims/data/listrunev'),
29 
30  LuminositySectionsBlockRange = LumiList(findFileInPath("DPGAnalysis/Skims/data/json_DCSONLY.txt")).getVLuminosityBlockRange()
31 
32  )
33 
34 dcsonly_json_2012 = cms.Sequence( dcsonly_json_2012_pickEvents )
def findFileInPath(theFile)
static std::string join(char **cmd)
Definition: RemoteFile.cc:19