CMS 3D CMS Logo

Public Member Functions | Public Attributes

DTVDriftSegmentWriter::DTVDriftSegmentWriter Class Reference

List of all members.

Public Member Functions

def __init__
def initProcess
def run
def writeCfg

Public Attributes

 config
 configs
 dir
 input_file
 output_dir
 process
 pset_templates
 runnumber
 task

Detailed Description

Definition at line 6 of file DTVDriftSegmentWriter.py.


Constructor & Destructor Documentation

def DTVDriftSegmentWriter::DTVDriftSegmentWriter::__init__ (   self,
  run,
  dir,
  input_file,
  output_dir,
  config 
)

Definition at line 7 of file DTVDriftSegmentWriter.py.

00008                                                                 :
00009         self.runnumber = int(run)
00010         self.config = config
00011         self.dir = dir
00012         self.input_file = input_file
00013         self.output_dir = output_dir
00014 
00015         self.configs = ['dtVDriftSegmentWriter_cfg.py',
00016                         'dumpDBToFile_vdrift_cfg.py']
00017 
00018         self.pset_templates = {}
00019         self.pset_templates['dtVDriftSegmentWriter_cfg.py'] = 'CalibMuon.DTCalibration.dtVDriftSegmentWriter_cfg'
00020         self.pset_templates['dumpDBToFile_vdrift_cfg.py'] = 'CalibMuon.DTCalibration.dumpDBToFile_vdrift_cfg'
00021 
00022         self.initProcess()
00023         self.task = CmsswTask(self.dir,self.configs)
    

Member Function Documentation

def DTVDriftSegmentWriter::DTVDriftSegmentWriter::initProcess (   self)

Definition at line 24 of file DTVDriftSegmentWriter.py.

00024                          : 
00025         vDrift_segment = self.output_dir + '/' + 'vDrift_segment_' + str(self.runnumber)
00026         vDrift_segment_db = os.path.abspath(vDrift_segment + '.db')
00027         vDrift_segment_txt = os.path.abspath(vDrift_segment + '.txt')
00028 
00029         self.process = {}
00030         # dtVDriftSegmentWriter
00031         self.process['dtVDriftSegmentWriter_cfg.py'] = loadCmsProcess(self.pset_templates['dtVDriftSegmentWriter_cfg.py'])
00032         self.process['dtVDriftSegmentWriter_cfg.py'].source.firstRun = self.runnumber
00033         self.process['dtVDriftSegmentWriter_cfg.py'].GlobalTag.globaltag = self.config.globaltag
00034 
00035         # Input vDrift db
00036         if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
00037             addPoolDBESSource(process = self.process['dtVDriftSegmentWriter_cfg.py'],
00038                               moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift',
00039                               connect = 'sqlite_file:%s' % self.config.inputVDriftDB)
00040 
00041         self.process['dtVDriftSegmentWriter_cfg.py'].PoolDBOutputService.connect = 'sqlite_file:%s' % vDrift_segment_db
00042         self.process['dtVDriftSegmentWriter_cfg.py'].dtVDriftSegmentWriter.vDriftAlgoConfig.rootFileName = self.input_file
00043 
00044         # dumpDBToFile
00045         self.process['dumpDBToFile_vdrift_cfg.py'] = loadCmsProcess(self.pset_templates['dumpDBToFile_vdrift_cfg.py'])
00046         self.process['dumpDBToFile_vdrift_cfg.py'].calibDB.connect = 'sqlite_file:%s' % vDrift_segment_db
00047         self.process['dumpDBToFile_vdrift_cfg.py'].dumpToFile.outputFileName = vDrift_segment_txt
00048  
def DTVDriftSegmentWriter::DTVDriftSegmentWriter::run (   self)

Definition at line 54 of file DTVDriftSegmentWriter.py.

00055                  :
00056         self.task.run()
00057         return
def DTVDriftSegmentWriter::DTVDriftSegmentWriter::writeCfg (   self)

Definition at line 49 of file DTVDriftSegmentWriter.py.

00050                       :
00051         for cfg in self.configs:
00052             writeCfg(self.process[cfg],self.dir,cfg)
00053             #writeCfgPkl(self.process[cfg],self.dir,cfg) 


Member Data Documentation

Definition at line 7 of file DTVDriftSegmentWriter.py.

Definition at line 7 of file DTVDriftSegmentWriter.py.

Definition at line 7 of file DTVDriftSegmentWriter.py.

Definition at line 7 of file DTVDriftSegmentWriter.py.

Definition at line 7 of file DTVDriftSegmentWriter.py.

Definition at line 24 of file DTVDriftSegmentWriter.py.

Definition at line 7 of file DTVDriftSegmentWriter.py.

Definition at line 7 of file DTVDriftSegmentWriter.py.

Definition at line 7 of file DTVDriftSegmentWriter.py.