CMS 3D CMS Logo

Public Member Functions | Public Attributes

DTTTrigValid::DTTTrigValid 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
 inputdb
 outputfile
 process
 project
 pset_name
 pset_template
 task

Detailed Description

Definition at line 6 of file DTTTrigValid.py.


Constructor & Destructor Documentation

def DTTTrigValid::DTTTrigValid::__init__ (   self,
  run,
  dir,
  input_db,
  config 
)

Definition at line 7 of file DTTTrigValid.py.

00008                                                   :
00009         self.pset_name = 'dtCalibValidation_cfg.py'
00010         #self.outputfile = 'residuals.root,DQM.root'
00011         self.outputfile = 'DQM.root'
00012         self.config = config
00013         self.dir = dir
00014         self.inputdb = input_db
00015 
00016         self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_cfg'
00017         if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics:
00018             self.pset_template = 'CalibMuon.DTCalibration.dtCalibValidation_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 DTTTrigValid::DTTTrigValid::initCrab (   self)

Definition at line 67 of file DTTTrigValid.py.

00068                       :
00069         crab_cfg_parser = loadCrabCfg()
00070         loadCrabDefault(crab_cfg_parser,self.config)
00071         crab_cfg_parser.set('CMSSW','pset',self.pset_name)
00072         crab_cfg_parser.set('CMSSW','output_file',self.outputfile)
00073         crab_cfg_parser.remove_option('USER','additional_input_files')
00074         if self.inputdb:
00075             addCrabInputFile(crab_cfg_parser,self.inputdb)
00076 
00077         if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
00078             addCrabInputFile(crab_cfg_parser,self.config.inputVDriftDB)
00079 
00080         if hasattr(self.config,'inputT0DB') and self.config.inputT0DB:
00081             addCrabInputFile(crab_cfg_parser,self.config.inputT0DB)
00082 
00083         self.crab_cfg = crab_cfg_parser

def DTTTrigValid::DTTTrigValid::initProcess (   self)

Definition at line 25 of file DTTTrigValid.py.

00026                          :
00027         self.process = loadCmsProcess(self.pset_template)
00028         self.process.GlobalTag.globaltag = self.config.globaltag
00029         #self.process.dtCalibValidation.OutputMEsInRootFile = True
00030 
00031         if hasattr(self.config,'inputDBTag') and self.config.inputDBTag:
00032             tag = self.config.inputDBTag
00033             record = self.config.inputDBRcd
00034             connect = self.config.connectStrDBTag
00035             moduleName = 'customDB%s' % record 
00036             addPoolDBESSource(process = self.process,
00037                               moduleName = moduleName,record = record,tag = tag,
00038                               connect = connect)
00039 
00040         if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
00041             addPoolDBESSource(process = self.process,
00042                               moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift',
00043                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB))
00044 
00045         if hasattr(self.config,'inputT0DB') and self.config.inputT0DB:
00046             addPoolDBESSource(process = self.process,
00047                               moduleName = 't0DB',record = 'DTT0Rcd',tag = 't0',
00048                               connect = 'sqlite_file:%s' % os.path.basename(self.config.inputT0DB))
00049 
00050         if(self.inputdb):
00051             label = ''
00052             if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: label = 'cosmics'
00053             addPoolDBESSource(process = self.process,
00054                               moduleName = 'calibDB',record = 'DTTtrigRcd',tag = 'ttrig',label=label,
00055                               connect = 'sqlite_file:%s' % os.path.basename(self.inputdb))
00056 
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         if hasattr(self.config,'preselection') and self.config.preselection:
00063             pathsequence = self.config.preselection.split(':')[0]
00064             seqname = self.config.preselection.split(':')[1]
00065             self.process.load(pathsequence)
00066             prependPaths(self.process,seqname)

def DTTTrigValid::DTTTrigValid::run (   self)

Definition at line 88 of file DTTTrigValid.py.

00089                  :
00090         self.project = self.task.run()
00091         return self.project
def DTTTrigValid::DTTTrigValid::writeCfg (   self)

Definition at line 84 of file DTTTrigValid.py.

00085                       :
00086         writeCfg(self.process,self.dir,self.pset_name)
00087         #writeCfgPkl(self.process,self.dir,self.pset_name)


Member Data Documentation

Definition at line 7 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.

Definition at line 88 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.

Definition at line 7 of file DTTTrigValid.py.