CMS 3D CMS Logo

Public Member Functions | Public Attributes

DTT0DBValidation::DTT0DBValidation Class Reference

List of all members.

Public Member Functions

def __init__
def initProcess
def run

Public Attributes

 config
 configs
 dir
 input_files
 output_dir
 process
 pset_template
 runnumber
 task

Detailed Description

Definition at line 6 of file DTT0DBValidation.py.


Constructor & Destructor Documentation

def DTT0DBValidation::DTT0DBValidation::__init__ (   self,
  run,
  dir,
  input_files,
  output_dir,
  config = None 
)

Definition at line 7 of file DTT0DBValidation.py.

00008                                                                       :
00009         self.runnumber = int(run)
00010         self.dir = dir
00011         self.output_dir = output_dir
00012         self.config = config
00013         self.input_files = input_files
00014 
00015         self.pset_template = 'DQMOffline.CalibMuon.dtT0DBValidation_cfg'
00016 
00017         self.configs = []
00018         self.initProcess()
00019         self.task = CmsswTask(self.dir,self.configs)


Member Function Documentation

def DTT0DBValidation::DTT0DBValidation::initProcess (   self)

Definition at line 20 of file DTT0DBValidation.py.

00021                          :
00022         refDBTag = ''
00023         if hasattr(self.config,'refDBTag') and self.config.refDBTag: refDBTag = self.config.refDBTag
00024         connect = ''
00025         if hasattr(self.config,'config.connectStrRefDBTag') and self.config.config.connectStrRefDBTag: connect = self.config.config.connectStrRefDBTag
00026         runNumbersToFiles = []
00027         if hasattr(self.config,'dbValidRuns') and self.config.dbValidRuns and len(self.config.dbValidRuns) == len(self.input_files): runNumbersToFiles = self.config.dbValidRuns
00028 
00029         self.process = {}
00030         idx_file = 0
00031         for inputFile in self.input_files:
00032             file = os.path.abspath(inputFile)
00033             fileLabel = os.path.basename(file).split('.')[0] 
00034             pset_name = 'dtT0DBValidation_%s_Run%d_cfg.py' % (fileLabel,self.runnumber)
00035             self.process[pset_name] = loadCmsProcess(self.pset_template)
00036             self.process[pset_name].source.firstRun = self.runnumber
00037 
00038             self.process[pset_name].tzeroRef.toGet = cms.VPSet(
00039                 cms.PSet(
00040                     record = cms.string('DTT0Rcd'),
00041                     tag = cms.string(refDBTag),
00042                     label = cms.untracked.string('tzeroRef')
00043                     ),
00044                 cms.PSet(
00045                     record = cms.string('DTT0Rcd'),
00046                     tag = cms.string('t0'),
00047                     connect = cms.untracked.string('sqlite_file:%s' % file),
00048                     label = cms.untracked.string('tzeroToValidate')
00049                     )
00050                 )
00051             self.process[pset_name].tzeroRef.connect = connect
00052 
00053             if self.config:
00054                 label = 'dtT0DBValidation'
00055                 if hasattr(self.config,'label') and self.config.label: label = self.config.label 
00056                 workflowName = dqmWorkflowName(self.config.datasetpath,label,self.config.trial)
00057                 self.process[pset_name].dqmSaver.workflow = workflowName
00058 
00059             if runNumbersToFiles: self.process[pset_name].dqmSaver.forceRunNumber = runNumbersToFiles[idx_file]
00060             self.process[pset_name].dqmSaver.dirName = os.path.abspath(self.output_dir)
00061 
00062             self.configs.append(pset_name)
00063             writeCfg(self.process[pset_name],self.dir,pset_name) 
00064             idx_file += 1

def DTT0DBValidation::DTT0DBValidation::run (   self)

Definition at line 72 of file DTT0DBValidation.py.

00073                  :
00074         self.task.run()
00075         return

Member Data Documentation

Definition at line 7 of file DTT0DBValidation.py.

Definition at line 7 of file DTT0DBValidation.py.

Definition at line 7 of file DTT0DBValidation.py.

Definition at line 7 of file DTT0DBValidation.py.

Definition at line 7 of file DTT0DBValidation.py.

Definition at line 20 of file DTT0DBValidation.py.

Definition at line 7 of file DTT0DBValidation.py.

Definition at line 7 of file DTT0DBValidation.py.

Definition at line 7 of file DTT0DBValidation.py.