CMS 3D CMS Logo

Public Member Functions | Public Attributes

DTDQMValidation::DTDQMValidation 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 DTDQMValidation.py.


Constructor & Destructor Documentation

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

Definition at line 8 of file DTDQMValidation.py.

00009                                         :
00010         self.outputfile = 'DQM.root'
00011         self.config = config
00012         self.dir = dir
00013         #self.inputdb = input_db
00014 
00015         self.pset_name = 'dtDQM_cfg.py'
00016         self.pset_template = 'CalibMuon.DTCalibration.dtDQMAlca_cfg'
00017         if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics:
00018             self.pset_template = 'CalibMuon.DTCalibration.dtDQMAlca_cosmics_cfg'
00019 
00020         self.process = None  
00021         self.crab_cfg = None
00022         self.initProcess()
00023         self.initCrab()
00024         self.task = CrabTask(self.dir,self.crab_cfg)


Member Function Documentation

def DTDQMValidation::DTDQMValidation::initCrab (   self)

Definition at line 61 of file DTDQMValidation.py.

00062                       :
00063         crab_cfg_parser = loadCrabCfg()
00064         loadCrabDefault(crab_cfg_parser,self.config)
00065         crab_cfg_parser.set('CMSSW','pset',self.pset_name)
00066         crab_cfg_parser.set('CMSSW','output_file',self.outputfile)
00067         crab_cfg_parser.remove_option('USER','additional_input_files')
00068         #if self.inputdb:
00069         #    addCrabInputFile(crab_cfg_parser,self.inputdb)
00070         if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB:
00071             addCrabInputFile(crab_cfg_parser,self.config.inputTTrigDB)
00072 
00073         if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
00074             addCrabInputFile(crab_cfg_parser,self.config.inputVDriftDB)
00075 
00076         self.crab_cfg = crab_cfg_parser

def DTDQMValidation::DTDQMValidation::initProcess (   self)

Definition at line 25 of file DTDQMValidation.py.

00026                          :
00027         self.process = loadCmsProcess(self.pset_template)
00028         self.process.GlobalTag.globaltag = self.config.globaltag
00029 
00030         if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB:
00031             label = ''
00032             if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: label = 'cosmics'
00033             addPoolDBESSource(process = self.process,
00034                               moduleName = 'tTrigDB',record = 'DTTtrigRcd',tag = 'ttrig',label = label,
00035                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputTTrigDB))
00036 
00037         if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
00038             addPoolDBESSource(process = self.process,
00039                               moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift',
00040                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB))
00041 
00042         if hasattr(self.config,'inputDBTag') and self.config.inputDBTag:
00043             tag = self.config.inputDBTag
00044             record = self.config.inputDBRcd
00045             connect = self.config.connectStrDBTag
00046             moduleName = 'customDB%s' % record 
00047             addPoolDBESSource(process = self.process,
00048                               moduleName = moduleName,record = record,tag = tag,
00049                               connect = connect)
00050 
00051         if hasattr(self.config,'runOnRAW') and self.config.runOnRAW:
00052             if hasattr(self.config,'runOnMC') and self.config.runOnMC:
00053                 getattr(self.process,self.config.digilabel).inputLabel = 'rawDataCollector' 
00054             prependPaths(self.process,self.config.digilabel)
00055  
00056         if hasattr(self.config,'preselection') and self.config.preselection:
00057             pathsequence = self.config.preselection.split(':')[0]
00058             seqname = self.config.preselection.split(':')[1]
00059             self.process.load(pathsequence)
00060             prependPaths(self.process,seqname)

def DTDQMValidation::DTDQMValidation::run (   self)

Definition at line 81 of file DTDQMValidation.py.

00082                  :
00083         self.project = self.task.run()
00084         return self.project
def DTDQMValidation::DTDQMValidation::writeCfg (   self)

Definition at line 77 of file DTDQMValidation.py.

00078                       :
00079         writeCfg(self.process,self.dir,self.pset_name)
00080         #writeCfgPkl(self.process,self.dir,self.pset_name)


Member Data Documentation

Definition at line 8 of file DTDQMValidation.py.

Definition at line 8 of file DTDQMValidation.py.

Definition at line 8 of file DTDQMValidation.py.

Definition at line 8 of file DTDQMValidation.py.

Definition at line 8 of file DTDQMValidation.py.

Definition at line 81 of file DTDQMValidation.py.

Definition at line 8 of file DTDQMValidation.py.

Definition at line 8 of file DTDQMValidation.py.

Definition at line 8 of file DTDQMValidation.py.