1 from tools
import loadCmsProcess,loadCrabCfg,loadCrabDefault,addCrabInputFile,writeCfg,prependPaths
2 from addPoolDBESSource
import addPoolDBESSource
7 def __init__(self, run, dir, input_db, config):
14 self.
pset_template =
'CalibMuon.DTCalibration.dtResidualCalibration_cfg'
15 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics:
16 self.
pset_template =
'CalibMuon.DTCalibration.dtResidualCalibration_cosmics_cfg'
26 self.process.GlobalTag.globaltag = self.config.globaltag
27 self.process.dtResidualCalibration.rootFileName = self.
outputfile
31 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics: label =
'cosmics'
33 moduleName =
'calibDB',record =
'DTTtrigRcd',tag =
'ttrig',label = label,
34 connect =
'sqlite_file:%s' % os.path.basename(self.
inputdb))
36 if hasattr(self.
config,
'inputVdriftDB')
and self.config.inputVdriftDB:
38 moduleName =
'vDriftDB',record =
'DTMtimeRcd',tag =
'vDrift',
39 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputVdriftDB))
41 if hasattr(self.
config,
'runOnRAW')
and self.config.runOnRAW:
44 if hasattr(self.
config,
'preselection')
and self.config.preselection:
45 pathsequence = self.config.preselection.split(
':')[0]
46 seqname = self.config.preselection.split(
':')[1]
47 self.process.load(pathsequence)
53 crab_cfg_parser.set(
'CMSSW',
'pset',self.
pset_name)
54 crab_cfg_parser.set(
'CMSSW',
'output_file',self.
outputfile)
55 crab_cfg_parser.remove_option(
'USER',
'additional_input_files')
59 if hasattr(self.
config,
'inputVdriftDB')
and self.config.inputVdriftDB:
perl if(1 lt scalar(@::datatypes))