1 from tools
import loadCmsProcess,loadCrabCfg,loadCrabDefault,addCrabInputFile,writeCfg,prependPaths
2 from addPoolDBESSource
import addPoolDBESSource
7 def __init__(self, run, dir, input_db, config):
16 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics:
17 self.
pset_template =
'CalibMuon.DTCalibration.dtCalibValidation_cosmics_cfg'
27 self.process.GlobalTag.globaltag = self.config.globaltag
30 if hasattr(self.
config,
'inputDBTag')
and self.config.inputDBTag:
31 tag = self.config.inputDBTag
32 record = self.config.inputDBRcd
33 connect = self.config.connectStrDBTag
34 moduleName =
'customDB%s' % record
36 moduleName = moduleName,record = record,tag = tag,
39 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
41 moduleName =
'vDriftDB',record =
'DTMtimeRcd',tag =
'vDrift',
42 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB))
46 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics: label =
'cosmics'
48 moduleName =
'calibDB',record =
'DTTtrigRcd',tag =
'ttrig',label=label,
49 connect =
'sqlite_file:%s' % os.path.basename(self.
inputdb))
51 if hasattr(self.
config,
'runOnRAW')
and self.config.runOnRAW:
52 if hasattr(self.
config,
'runOnMC')
and self.config.runOnMC:
53 getattr(self.
process,self.config.digilabel).inputLabel =
'rawDataCollector'
56 if hasattr(self.
config,
'preselection')
and self.config.preselection:
57 pathsequence = self.config.preselection.split(
':')[0]
58 seqname = self.config.preselection.split(
':')[1]
59 self.process.load(pathsequence)
65 crab_cfg_parser.set(
'CMSSW',
'pset',self.
pset_name)
66 crab_cfg_parser.set(
'CMSSW',
'output_file',self.
outputfile)
67 crab_cfg_parser.remove_option(
'USER',
'additional_input_files')
71 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
perl if(1 lt scalar(@::datatypes))