CMS 3D CMS Logo

Public Member Functions | Public Attributes

DTTTrigTimeBoxesWriter::DTTTrigTimeBoxesWriter Class Reference

List of all members.

Public Member Functions

def __init__
def initProcess
def run
def writeCfg

Public Attributes

 config
 configs
 dir
 process
 pset_templates
 result_dir
 runnumber
 task

Detailed Description

Definition at line 6 of file DTTTrigTimeBoxesWriter.py.


Constructor & Destructor Documentation

def DTTTrigTimeBoxesWriter::DTTTrigTimeBoxesWriter::__init__ (   self,
  run,
  dir,
  result_dir,
  config 
)

Definition at line 7 of file DTTTrigTimeBoxesWriter.py.

00008                                                     :
00009         self.runnumber = int(run)
00010         self.config = config
00011         self.dir = dir
00012         self.result_dir = result_dir
00013 
00014         """
00015         self.configs = ['dtTTrigWriter_cfg.py',
00016                         'dumpDBToFile_first_cfg.py',
00017                         'dtTTrigCorrection_cfg.py',
00018                         'dumpDBToFile_second_cfg.py']
00019 
00020         self.pset_templates = {'dtTTrigWriter_cfg.py':'CalibMuon.DTCalibration.dtTTrigWriter_cfg',
00021                                'dumpDBToFile_first_cfg.py':'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg',
00022                                'dtTTrigCorrection_cfg.py':'CalibMuon.DTCalibration.dtTTrigCorrection_cfg',
00023                                'dumpDBToFile_second_cfg.py':'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg'}
00024         """
00025         self.configs = ['dtTTrigWriter_cfg.py',
00026                         'dtTTrigCorrection_cfg.py',
00027                         'dumpDBToFile_ttrig_cfg.py']
00028 
00029         self.pset_templates = {'dtTTrigWriter_cfg.py':'CalibMuon.DTCalibration.dtTTrigWriter_cfg',
00030                                'dtTTrigCorrection_cfg.py':'CalibMuon.DTCalibration.dtTTrigCorrection_cfg',
00031                                'dumpDBToFile_ttrig_cfg.py':'CalibMuon.DTCalibration.dumpDBToFile_ttrig_cfg'}
00032  
00033 
00034         self.initProcess()
00035         self.task = CmsswTask(self.dir,self.configs)


Member Function Documentation

def DTTTrigTimeBoxesWriter::DTTTrigTimeBoxesWriter::initProcess (   self)

Definition at line 36 of file DTTTrigTimeBoxesWriter.py.

00037                          :
00038         timeBoxes = os.path.abspath( self.result_dir + '/' + 'DTTimeBoxes_' + str(self.runnumber) + '.root' )
00039         ttrig_uncorrected_db = os.path.abspath( self.result_dir + '/' + 'ttrig_uncorrected_' + str(self.runnumber) + '.db' )
00040         ttrig_timeboxes_db = os.path.abspath( self.result_dir + '/' + 'ttrig_timeboxes_' + str(self.runnumber) + '.db' )
00041         ttrig_timeboxes_txt = os.path.abspath( self.result_dir + '/' + 'ttrig_timeboxes_' + str(self.runnumber) + '.txt' )       
00042  
00043         self.process = {}
00044         # dtTTrigWriter_cfg.py
00045         self.process['dtTTrigWriter_cfg.py'] = loadCmsProcess(self.pset_templates['dtTTrigWriter_cfg.py'])
00046         self.process['dtTTrigWriter_cfg.py'].dtTTrigWriter.rootFileName = timeBoxes
00047         self.process['dtTTrigWriter_cfg.py'].PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_uncorrected_db
00048 
00049         # dtTTrigCorrection_cfg.py
00050         self.process['dtTTrigCorrection_cfg.py'] = loadCmsProcess(self.pset_templates['dtTTrigCorrection_cfg.py'])
00051         self.process['dtTTrigCorrection_cfg.py'].GlobalTag.globaltag = self.config.globaltag
00052         self.process['dtTTrigCorrection_cfg.py'].source.firstRun = self.runnumber
00053         addPoolDBESSource(process = self.process['dtTTrigCorrection_cfg.py'],
00054                           moduleName = 'calibDB',record = 'DTTtrigRcd',tag = 'ttrig',
00055                           connect = 'sqlite_file:%s' % ttrig_uncorrected_db)
00056 
00057         self.process['dtTTrigCorrection_cfg.py'].PoolDBOutputService.connect = 'sqlite_file:%s' % ttrig_timeboxes_db
00058 
00059         # dumpDBToFile_ttrig_cfg.py
00060         self.process['dumpDBToFile_ttrig_cfg.py'] = loadCmsProcess(self.pset_templates['dumpDBToFile_ttrig_cfg.py'])
00061         self.process['dumpDBToFile_ttrig_cfg.py'].calibDB.connect = 'sqlite_file:%s' % ttrig_timeboxes_db
00062         self.process['dumpDBToFile_ttrig_cfg.py'].dumpToFile.outputFileName = ttrig_timeboxes_txt
 
def DTTTrigTimeBoxesWriter::DTTTrigTimeBoxesWriter::run (   self)

Definition at line 68 of file DTTTrigTimeBoxesWriter.py.

00069                  :
00070         self.task.run()
00071         return 
def DTTTrigTimeBoxesWriter::DTTTrigTimeBoxesWriter::writeCfg (   self)

Definition at line 63 of file DTTTrigTimeBoxesWriter.py.

00064                       :
00065         for cfg in self.configs:
00066             writeCfg(self.process[cfg],self.dir,cfg)
00067             #writeCfgPkl(self.process[cfg],self.dir,cfg)
           

Member Data Documentation

Definition at line 7 of file DTTTrigTimeBoxesWriter.py.

Definition at line 17 of file DTTTrigTimeBoxesWriter.py.

Definition at line 7 of file DTTTrigTimeBoxesWriter.py.

Definition at line 36 of file DTTTrigTimeBoxesWriter.py.

Definition at line 17 of file DTTTrigTimeBoxesWriter.py.

Definition at line 7 of file DTTTrigTimeBoxesWriter.py.

Definition at line 7 of file DTTTrigTimeBoxesWriter.py.

Definition at line 17 of file DTTTrigTimeBoxesWriter.py.