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
29 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
31 moduleName =
'vDriftDB',record =
'DTMtimeRcd',tag =
'vDrift',
32 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB))
34 if hasattr(self.
config,
'inputDBTag')
and self.config.inputDBTag:
35 tag = self.config.inputDBTag
36 record = self.config.inputDBRcd
37 connect = self.config.connectStrDBTag
38 moduleName =
'customDB%s' % record
40 moduleName = moduleName,record = record,tag = tag,
45 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics: label =
'cosmics'
47 moduleName =
'calibDB',record =
'DTTtrigRcd',tag =
'ttrig',label = label,
48 connect =
'sqlite_file:%s' % os.path.basename(self.
inputdb))
50 if hasattr(self.
config,
'runOnRAW')
and self.config.runOnRAW:
51 if hasattr(self.
config,
'runOnMC')
and self.config.runOnMC:
52 getattr(self.
process,self.config.digilabel).inputLabel =
'rawDataCollector'
55 if hasattr(self.
config,
'preselection')
and self.config.preselection:
56 pathsequence = self.config.preselection.split(
':')[0]
57 seqname = self.config.preselection.split(
':')[1]
58 self.process.load(pathsequence)
64 crab_cfg_parser.set(
'CMSSW',
'pset',self.
pset_name)
65 crab_cfg_parser.set(
'CMSSW',
'output_file',self.
outputfile)
66 crab_cfg_parser.remove_option(
'USER',
'additional_input_files')
70 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
perl if(1 lt scalar(@::datatypes))