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,
'inputDBTag')
and self.config.inputDBTag:
30 tag = self.config.inputDBTag
31 record = self.config.inputDBRcd
32 connect = self.config.connectStrDBTag
33 moduleName =
'customDB%s' % record
35 moduleName = moduleName,record = record,tag = tag,
38 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
40 moduleName =
'vDriftDB',record =
'DTMtimeRcd',tag =
'vDrift',
41 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB))
43 if hasattr(self.
config,
'inputT0DB')
and self.config.inputT0DB:
45 moduleName =
't0DB',record =
'DTT0Rcd',tag =
't0',
46 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputT0DB))
50 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics: label =
'cosmics'
52 moduleName =
'calibDB',record =
'DTTtrigRcd',tag =
'ttrig',label = label,
53 connect =
'sqlite_file:%s' % os.path.basename(self.
inputdb))
56 if hasattr(self.
config,
'runOnRAW')
and self.config.runOnRAW:
57 if hasattr(self.
config,
'runOnMC')
and self.config.runOnMC:
58 getattr(self.
process,self.config.digilabel).inputLabel =
'rawDataCollector'
61 if hasattr(self.
config,
'preselection')
and self.config.preselection:
62 pathsequence = self.config.preselection.split(
':')[0]
63 seqname = self.config.preselection.split(
':')[1]
64 self.process.load(pathsequence)
70 crab_cfg_parser.set(
'CMSSW',
'pset',self.
pset_name)
71 crab_cfg_parser.set(
'CMSSW',
'output_file',self.
outputfile)
72 crab_cfg_parser.remove_option(
'USER',
'additional_input_files')
76 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
79 if hasattr(self.
config,
'inputT0DB')
and self.config.inputT0DB:
if(c.getParameter< edm::InputTag >("puppiValueMap").label().size()!=0)