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 68 of file DTVDriftMeanTimerCalibration.py.

00069                       :
00070         crab_cfg_parser = loadCrabCfg()
00071         loadCrabDefault(crab_cfg_parser,self.config)
00072         crab_cfg_parser.set('CMSSW','pset',self.pset_name)
00073         crab_cfg_parser.set('CMSSW','output_file',self.outputfile)
00074         crab_cfg_parser.remove_option('USER','additional_input_files')
00075         if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB:
00076             addCrabInputFile(crab_cfg_parser,self.config.inputTTrigDB)
00077 
00078         if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
00079             addCrabInputFile(crab_cfg_parser,self.config.inputVDriftDB)
00080 
00081         if hasattr(self.config,'inputT0DB') and self.config.inputT0DB:
00082             addCrabInputFile(crab_cfg_parser,self.config.inputT0DB)
00083 
00084         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         # Update Event Setup
00029         if hasattr(self.config,'inputDBTag') and self.config.inputDBTag:
00030             tag = self.config.inputDBTag
00031             record = self.config.inputDBRcd
00032             connect = self.config.connectStrDBTag
00033             moduleName = 'customDB%s' % record 
00034             addPoolDBESSource(process = self.process,
00035                               moduleName = moduleName,record = record,tag = tag,
00036                               connect = connect)
00037 
00038         if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB:
00039             label = ''
00040             if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: label = 'cosmics'
00041             addPoolDBESSource(process = self.process,
00042                               moduleName = 'tTrigDB',record = 'DTTtrigRcd',tag = 'ttrig',label = label,
00043                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputTTrigDB))
00044 
00045         if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
00046             addPoolDBESSource(process = self.process,
00047                               moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift',
00048                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB))
00049 
00050         if hasattr(self.config,'inputT0DB') and self.config.inputT0DB:
00051             addPoolDBESSource(process = self.process,
00052                               moduleName = 't0DB',record = 'DTT0Rcd',tag = 't0',
00053                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputT0DB))
00054 
00055         # Update sequences
00056         # Prepend paths with unpacker if running on RAW
00057         if hasattr(self.config,'runOnRAW') and self.config.runOnRAW:
00058             if hasattr(self.config,'runOnMC') and self.config.runOnMC:
00059                 getattr(self.process,self.config.digilabel).inputLabel = 'rawDataCollector' 
00060             prependPaths(self.process,self.config.digilabel)
00061 
00062         # Prepend paths with custom selection sequence
00063         if hasattr(self.config,'preselection') and self.config.preselection:
00064             pathsequence = self.config.preselection.split(':')[0]
00065             seqname = self.config.preselection.split(':')[1]
00066             self.process.load(pathsequence)
00067             prependPaths(self.process,seqname)

def DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration::run (   self)

Definition at line 89 of file DTVDriftMeanTimerCalibration.py.

00090                  :
00091         self.project = self.task.run()
00092         return self.project
def DTVDriftMeanTimerCalibration::DTVDriftMeanTimerCalibration::writeCfg (   self)

Definition at line 85 of file DTVDriftMeanTimerCalibration.py.

00086                       :
00087         writeCfg(self.process,self.dir,self.pset_name)
00088         #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 89 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.