示例#1
0
    def initProcess(self):
        self.process = loadCmsProcess(self.pset_template)
        self.process.GlobalTag.globaltag = self.config.globaltag

        if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB:
            label = ''
            if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: label = 'cosmics'
            addPoolDBESSource(process = self.process,
                              moduleName = 'tTrigDB',record = 'DTTtrigRcd',tag = 'ttrig',label = label,
                              connect = 'sqlite_file:%s' % os.path.abspath(self.config.inputTTrigDB))

        if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB:
            addPoolDBESSource(process = self.process,
                              moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift',
                              connect = 'sqlite_file:%s' % os.path.abspath(self.config.inputVDriftDB))

	if hasattr(self.config,'inputDBTag') and self.config.inputDBTag:
	    tag = self.config.inputDBTag
	    record = self.config.inputDBRcd
	    connect = self.config.connectStrDBTag
	    moduleName = 'customDB%s' % record 
	    addPoolDBESSource(process = self.process,
			      moduleName = moduleName,record = record,tag = tag,
			      connect = connect)

        self.process.source.fileNames = self.dqm_files
        self.process.dqmSaver.dirName = os.path.abspath(self.result_dir)
        if self.config:
            label = 'dtDQMValidation'
            if hasattr(self.config,'label') and self.config.label: label = self.config.label 
            workflowName = dqmWorkflowName(self.config.datasetpath,label,self.config.trial)
            self.process.dqmSaver.workflow = workflowName
        if self.process.DQMStore.collateHistograms == True: self.process.dqmSaver.forceRunNumber = self.runnumber
示例#2
0
文件: DTDqm.py 项目: nsahoo/cmssw-1
 def initProcess(self):
     self.process = loadCmsProcess(self.pset_template)
     self.process.source.fileNames = self.dqm_files
     self.process.dqmSaver.dirName = os.path.abspath(self.result_dir)
     if self.config:
         label = "dtCalibration"
         if hasattr(self.config, "label") and self.config.label:
             label = self.config.label
         workflowName = dqmWorkflowName(self.config.datasetpath, label, self.config.trial)
         self.process.dqmSaver.workflow = workflowName
     if self.process.DQMStore.collateHistograms == True:
         self.process.dqmSaver.forceRunNumber = self.runnumber
示例#3
0
    def initProcess(self):
        refDBTag = ''
        if hasattr(self.config, 'refDBTag') and self.config.refDBTag:
            refDBTag = self.config.refDBTag
        connect = ''
        if hasattr(self.config, 'config.connectStrRefDBTag'
                   ) and self.config.config.connectStrRefDBTag:
            connect = self.config.config.connectStrRefDBTag
        runNumbersToFiles = []
        if hasattr(self.config,
                   'dbValidRuns') and self.config.dbValidRuns and len(
                       self.config.dbValidRuns) == len(self.input_files):
            runNumbersToFiles = self.config.dbValidRuns

        self.process = {}
        idx_file = 0
        for inputFile in self.input_files:
            file = os.path.abspath(inputFile)
            fileLabel = os.path.basename(file).split('.')[0]
            pset_name = 'dtT0DBValidation_%s_Run%d_cfg.py' % (fileLabel,
                                                              self.runnumber)
            self.process[pset_name] = loadCmsProcess(self.pset_template)
            self.process[pset_name].source.firstRun = self.runnumber

            self.process[pset_name].tzeroRef.toGet = cms.VPSet(
                cms.PSet(record=cms.string('DTT0Rcd'),
                         tag=cms.string(refDBTag),
                         label=cms.untracked.string('tzeroRef')),
                cms.PSet(record=cms.string('DTT0Rcd'),
                         tag=cms.string('t0'),
                         connect=cms.untracked.string('sqlite_file:%s' % file),
                         label=cms.untracked.string('tzeroToValidate')))
            self.process[pset_name].tzeroRef.connect = connect

            if self.config:
                label = 'dtT0DBValidation'
                if hasattr(self.config, 'label') and self.config.label:
                    label = self.config.label
                workflowName = dqmWorkflowName(self.config.datasetpath, label,
                                               self.config.trial)
                self.process[pset_name].dqmSaver.workflow = workflowName

            if runNumbersToFiles:
                self.process[
                    pset_name].dqmSaver.forceRunNumber = runNumbersToFiles[
                        idx_file]
            self.process[pset_name].dqmSaver.dirName = os.path.abspath(
                self.output_dir)

            self.configs.append(pset_name)
            writeCfg(self.process[pset_name], self.dir, pset_name)
            idx_file += 1
示例#4
0
 def initProcess(self):
     self.process = loadCmsProcess(self.pset_template)
     self.process.source.fileNames = self.dqm_files
     self.process.dqmSaver.dirName = os.path.abspath(self.result_dir)
     if self.config:
         label = 'dtCalibration'
         if hasattr(self.config, 'label') and self.config.label:
             label = self.config.label
         workflowName = dqmWorkflowName(self.config.datasetpath, label,
                                        self.config.trial)
         self.process.dqmSaver.workflow = workflowName
     if self.process.DQMStore.collateHistograms == True:
         self.process.dqmSaver.forceRunNumber = self.runnumber
示例#5
0
    def initProcess(self):
        refDBTag = ''
        if hasattr(self.config,'refDBTag') and self.config.refDBTag: refDBTag = self.config.refDBTag
        connect = ''
        if hasattr(self.config,'config.connectStrRefDBTag') and self.config.config.connectStrRefDBTag: connect = self.config.config.connectStrRefDBTag
        runNumbersToFiles = []
        if hasattr(self.config,'dbValidRuns') and self.config.dbValidRuns and len(self.config.dbValidRuns) == len(self.input_files): runNumbersToFiles = self.config.dbValidRuns

        self.process = {}
        idx_file = 0
        for inputFile in self.input_files:
            file = os.path.abspath(inputFile)
            fileLabel = os.path.basename(file).split('.')[0] 
            pset_name = 'dtT0DBValidation_%s_Run%d_cfg.py' % (fileLabel,self.runnumber)
            self.process[pset_name] = loadCmsProcess(self.pset_template)
	    self.process[pset_name].source.firstRun = self.runnumber

	    self.process[pset_name].tzeroRef.toGet = cms.VPSet(
		cms.PSet(
		    record = cms.string('DTT0Rcd'),
		    tag = cms.string(refDBTag),
		    label = cms.untracked.string('tzeroRef')
		    ),
		cms.PSet(
		    record = cms.string('DTT0Rcd'),
		    tag = cms.string('t0'),
		    connect = cms.untracked.string('sqlite_file:%s' % file),
		    label = cms.untracked.string('tzeroToValidate')
		    )
	        )
            self.process[pset_name].tzeroRef.connect = connect

	    if self.config:
		label = 'dtT0DBValidation'
		if hasattr(self.config,'label') and self.config.label: label = self.config.label 
		workflowName = dqmWorkflowName(self.config.datasetpath,label,self.config.trial)
                self.process[pset_name].dqmSaver.workflow = workflowName

            if runNumbersToFiles: self.process[pset_name].dqmSaver.forceRunNumber = runNumbersToFiles[idx_file]
	    self.process[pset_name].dqmSaver.dirName = os.path.abspath(self.output_dir)

            self.configs.append(pset_name)
            writeCfg(self.process[pset_name],self.dir,pset_name) 
            idx_file += 1