CMS 3D CMS Logo

Public Member Functions | Public Attributes

DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration Class Reference

List of all members.

Public Member Functions

def __init__
def initCrab
def initProcess
def run
def writeCfg

Public Attributes

 config
 crab_cfg
 dir
 outputfile
 process
 project
 pset_name
 pset_template
 task

Detailed Description

Definition at line 6 of file DTVDriftMeanTimerCalibration.py.


Constructor & Destructor Documentation

def DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration::__init__ (   self,
  run,
  dir,
  config 
)

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

00008                                         :
00009         self.pset_name = 'dtVDriftMeanTimerCalibration_cfg.py'
00010         self.outputfile = 'DTTMaxHistos.root'
00011         self.config = config
00012         self.dir = dir
00013 
00014         self.pset_template = 'CalibMuon.DTCalibration.dtVDriftMeanTimerCalibration_cfg'
00015         if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics:
00016             self.pset_template = 'CalibMuon.DTCalibration.dtVDriftMeanTimerCalibration_cosmics_cfg'
00017 
00018         self.process = None  
00019         self.crab_cfg = None
00020         self.initProcess()
00021         self.initCrab()
00022         self.task = CrabTask(self.dir,self.crab_cfg)


Member Function Documentation

def DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration::initCrab (   self)

Definition at line 51 of file DTVDriftMeanTimerCalibration.py.

00052                       :
00053         crab_cfg_parser = loadCrabCfg()
00054         loadCrabDefault(crab_cfg_parser,self.config)
00055         crab_cfg_parser.set('CMSSW','pset',self.pset_name)
00056         crab_cfg_parser.set('CMSSW','output_file',self.outputfile)
00057         crab_cfg_parser.remove_option('USER','additional_input_files')
00058         if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB:
00059             addCrabInputFile(crab_cfg_parser,self.config.inputTTrigDB)
00060 
00061         if hasattr(self.config,'inputVdriftDB') and self.config.inputVdriftDB:
00062             addCrabInputFile(crab_cfg_parser,self.config.inputVdriftDB)
00063 
00064         self.crab_cfg = crab_cfg_parser

def DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration::initProcess (   self)

Definition at line 23 of file DTVDriftMeanTimerCalibration.py.

00024                          :
00025         self.process = loadCmsProcess(self.pset_template)
00026         self.process.GlobalTag.globaltag = self.config.globaltag
00027         self.process.dtVDriftMeanTimerCalibration.rootFileName = self.outputfile
00028         # Add tTrig and vDrift DB's, if requested
00029         if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB:
00030             label = ''
00031             if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: label = 'cosmics'
00032             addPoolDBESSource(process = self.process,
00033                               moduleName = 'tTrigDB',record = 'DTTtrigRcd',tag = 'ttrig',label = label,
00034                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputTTrigDB))
00035 
00036         if hasattr(self.config,'inputVdriftDB') and self.config.inputVdriftDB:
00037             addPoolDBESSource(process = self.process,
00038                               moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift',
00039                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputVdriftDB))
00040 
00041         # Prepend paths with unpacker if running on RAW
00042         if hasattr(self.config,'runOnRAW') and self.config.runOnRAW:
00043             prependPaths(self.process,self.config.digilabel)
00044 
00045         # Prepend paths with custom selection sequence
00046         if hasattr(self.config,'preselection') and self.config.preselection:
00047             pathsequence = self.config.preselection.split(':')[0]
00048             seqname = self.config.preselection.split(':')[1]
00049             self.process.load(pathsequence)
00050             prependPaths(self.process,seqname)

def DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration::run (   self)

Definition at line 69 of file DTVDriftMeanTimerCalibration.py.

00070                  :
00071         self.project = self.task.run()
00072         return self.project
def DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration::writeCfg (   self)

Definition at line 65 of file DTVDriftMeanTimerCalibration.py.

00066                       :
00067         writeCfg(self.process,self.dir,self.pset_name)
00068         #writeCfgPkl(self.process,self.dir,self.pset_name)


Member Data Documentation

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

Definition at line 69 of file DTVDriftMeanTimerCalibration.py.

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.

Definition at line 7 of file DTVDriftMeanTimerCalibration.py.