test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
readConfig.py
Go to the documentation of this file.
1 # set up variables
2 #def readConfig(fileName)
3 import FWCore.ParameterSet.Config as cms
5 
6 class fileINI:
7  def __init__(self, fileName):
8  self.fileName=fileName
9 
10  def read(self):
11  Config.optionxform = str
12  Config.read(self.fileName)
13  self.processname=ConfigSectionMap("config")["processname"]
14  self.CMSSWVER=ConfigSectionMap("config")["cmsswver"]
15  self.jets=ConfigSectionMap("config")["hltjets"]
16  files=ConfigSectionMap("config")["files"]
17  self.maxEvents=ConfigSectionMap("config")["maxevents"]
18 # self.denominatorTriggerPath=ConfigSectionMap("config")["denominatorTriggerPath"]
19 
20  files=files.splitlines()
21  self.files=filter(lambda x: len(x)>0,files)
22 
23  self.btag_modules=cms.VInputTag()
24  self.btag_pathes=cms.vstring()
25  self.btag_modules_string=cms.vstring()
26  for path in Config.options("btag"):
27  print path
28  modules=Config.get("btag",path)
29  modules=modules.splitlines()
30  for module in modules:
31  if(module!="" and path!=""):
32  self.btag_modules.extend([cms.InputTag(module)])
33  self.btag_modules_string.extend([module])
34  self.btag_pathes.extend([path])
35 
36  self.vertex_modules=cms.VInputTag()
37  self.vertex_pathes=cms.vstring()
38  for path in Config.options("vertex"):
39  print path
40  modules=Config.get("vertex",path)
41  modules=modules.splitlines()
42  for module in modules:
43  if(module!="" and path!=""):
44  self.vertex_modules.extend([cms.InputTag(module)])
45  self.vertex_pathes.extend([path])
46 
47 def printMe(self):
48  print
49  print "Reading ", self.fileName
50  print
51  print "denominatorTriggerPath = ",self.denominatorTriggerPath
52  print "maxEvents = ",self.maxEvents
53  print "CMSSWVER = ",self.CMSSWVER
54  print "processname = ",self.processname
55  print "jets (for matching) = ",self.jets
56  print "files = ",self.files
57  print "btag_modules ",self.btag_modules
58  print "btag_pathes ",self.btag_pathes
59  print "vertex_modules ",self.vertex_modules
60  print "vertex_pathes ",self.vertex_pathes
61  print
def printMe
Definition: readConfig.py:47
tuple options
Definition: Config.py:5
def ConfigSectionMap
Definition: helper.py:11
if(dp >Float(M_PI)) dp-