1 from tools
import loadCmsProcess,loadCrabCfg,loadCrabDefault,addCrabInputFile,writeCfg,prependPaths
2 from addPoolDBESSource
import addPoolDBESSource
8 self.
pset_name =
'dtVDriftMeanTimerCalibration_cfg.py' 13 self.
pset_template =
'CalibMuon.DTCalibration.dtVDriftMeanTimerCalibration_cfg' 14 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics:
15 self.
pset_template =
'CalibMuon.DTCalibration.dtVDriftMeanTimerCalibration_cosmics_cfg' 25 self.process.GlobalTag.globaltag = self.config.globaltag
26 self.process.dtVDriftMeanTimerCalibration.rootFileName = self.
outputfile 28 if hasattr(self.
config,
'inputDBTag')
and self.config.inputDBTag:
29 tag = self.config.inputDBTag
30 record = self.config.inputDBRcd
31 connect = self.config.connectStrDBTag
32 moduleName =
'customDB%s' % record
34 moduleName = moduleName,record = record,tag = tag,
37 if hasattr(self.
config,
'inputTTrigDB')
and self.config.inputTTrigDB:
39 if hasattr(self.
config,
'runOnCosmics')
and self.config.runOnCosmics: label =
'cosmics' 41 moduleName =
'tTrigDB',record =
'DTTtrigRcd',tag =
'ttrig',label = label,
42 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputTTrigDB))
44 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
46 moduleName =
'vDriftDB',record =
'DTMtimeRcd',tag =
'vDrift',
47 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB))
49 if hasattr(self.
config,
'inputT0DB')
and self.config.inputT0DB:
51 moduleName =
't0DB',record =
'DTT0Rcd',tag =
't0',
52 connect =
'sqlite_file:%s' % os.path.basename(self.config.inputT0DB))
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' 62 if hasattr(self.
config,
'preselection')
and self.config.preselection:
63 pathsequence = self.config.preselection.split(
':')[0]
64 seqname = self.config.preselection.split(
':')[1]
65 self.process.load(pathsequence)
71 crab_cfg_parser.set(
'CMSSW',
'pset',self.
pset_name)
72 crab_cfg_parser.set(
'CMSSW',
'output_file',self.
outputfile)
73 crab_cfg_parser.remove_option(
'USER',
'additional_input_files')
74 if hasattr(self.
config,
'inputTTrigDB')
and self.config.inputTTrigDB:
77 if hasattr(self.
config,
'inputVDriftDB')
and self.config.inputVDriftDB:
80 if hasattr(self.
config,
'inputT0DB')
and self.config.inputT0DB:
def __init__(self, run, dir, config)