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