00001 from tools import loadCmsProcess,writeCfg 00002 from CmsswTask import CmsswTask 00003 import os 00004 00005 class DTValidSummary: 00006 def __init__(self, run, dir, input_file, output_file, config): 00007 self.runnumber = run 00008 self.config = config 00009 self.dir = dir 00010 self.input_file = input_file 00011 self.output_file = output_file 00012 00013 self.pset_name = 'dtTTrigValidSummary_cfg.py' 00014 self.pset_template = 'CalibMuon.DTCalibration.dtTTrigValidSummary_cfg' 00015 00016 self.process = None 00017 self.initProcess() 00018 self.configs = [self.pset_name] 00019 self.task = CmsswTask(self.dir,self.configs) 00020 00021 def initProcess(self): 00022 self.process = loadCmsProcess(self.pset_template) 00023 self.process.resolutionTest.inputFile = self.input_file 00024 self.process.resolutionTest.OutputFileName = self.output_file 00025 00026 def writeCfg(self): 00027 writeCfg(self.process,self.dir,self.pset_name) 00028 #writeCfgPkl(self.process,self.dir,self.pset_name) 00029 00030 def run(self): 00031 self.task.run() 00032 return