File indexing completed on 2024-11-26 02:34:21
0001
0002
0003 import FWCore.ParameterSet.Config as cms
0004 from HLTriggerOffline.Btag.helper import *
0005
0006 class fileINI:
0007 def __init__(self, fileName):
0008 self.fileName=fileName
0009
0010 def read(self):
0011 Config.optionxform = str
0012 Config.read(self.fileName)
0013 self.processname=ConfigSectionMap("config")["processname"]
0014 self.CMSSWVER=ConfigSectionMap("config")["cmsswver"]
0015 self.jets=ConfigSectionMap("config")["hltjets"]
0016 files=ConfigSectionMap("config")["files"]
0017 self.maxEvents=ConfigSectionMap("config")["maxevents"]
0018
0019
0020 files=files.splitlines()
0021 self.files=[x for x in files if len(x)>0]
0022
0023 self.btag_modules=cms.VInputTag()
0024 self.btag_pathes=cms.vstring()
0025 self.btag_modules_string=cms.vstring()
0026 for path in Config.options("btag"):
0027 print(path)
0028 modules=Config.get("btag",path)
0029 modules=modules.splitlines()
0030 for module in modules:
0031 if(module!="" and path!=""):
0032 self.btag_modules.extend([cms.InputTag(module)])
0033 self.btag_modules_string.extend([module])
0034 self.btag_pathes.extend([path])
0035
0036 self.vertex_modules=cms.VInputTag()
0037 self.vertex_pathes=cms.vstring()
0038 for path in Config.options("vertex"):
0039 print(path)
0040 modules=Config.get("vertex",path)
0041 modules=modules.splitlines()
0042 for module in modules:
0043 if(module!="" and path!=""):
0044 self.vertex_modules.extend([cms.InputTag(module)])
0045 self.vertex_pathes.extend([path])
0046
0047 def printMe(self):
0048 print()
0049 print("Reading ", self.fileName)
0050 print()
0051 print("denominatorTriggerPath = ",self.denominatorTriggerPath)
0052 print("maxEvents = ",self.maxEvents)
0053 print("CMSSWVER = ",self.CMSSWVER)
0054 print("processname = ",self.processname)
0055 print("jets (for matching) = ",self.jets)
0056 print("files = ",self.files)
0057 print("btag_modules ",self.btag_modules)
0058 print("btag_pathes ",self.btag_pathes)
0059 print("vertex_modules ",self.vertex_modules)
0060 print("vertex_pathes ",self.vertex_pathes)
0061 print()