Public Member Functions | |
def | __init__ |
def | initCrab |
def | initProcess |
def | run |
def | writeCfg |
Public Attributes | |
config | |
crab_cfg | |
dir | |
outputfile | |
process | |
project | |
pset_name | |
pset_template | |
task |
Definition at line 6 of file DTVDriftSegmentCalibration.py.
def DTVDriftSegmentCalibration::DTVDriftSegmentCalibration::__init__ | ( | self, | |
run, | |||
dir, | |||
config | |||
) |
Definition at line 7 of file DTVDriftSegmentCalibration.py.
00008 : 00009 self.pset_name = 'dtVDriftSegmentCalibration_cfg.py' 00010 self.outputfile = 'DTVDriftHistos.root' 00011 self.config = config 00012 self.dir = dir 00013 00014 self.pset_template = 'CalibMuon.DTCalibration.dtVDriftSegmentCalibration_cfg' 00015 if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: 00016 self.pset_template = 'CalibMuon.DTCalibration.dtVDriftSegmentCalibration_cosmics_cfg' 00017 00018 self.process = None 00019 self.crab_cfg = None 00020 self.initProcess() 00021 self.initCrab() 00022 self.task = CrabTask(self.dir,self.crab_cfg)
def DTVDriftSegmentCalibration::DTVDriftSegmentCalibration::initCrab | ( | self | ) |
Definition at line 62 of file DTVDriftSegmentCalibration.py.
00063 : 00064 crab_cfg_parser = loadCrabCfg() 00065 loadCrabDefault(crab_cfg_parser,self.config) 00066 crab_cfg_parser.set('CMSSW','pset',self.pset_name) 00067 crab_cfg_parser.set('CMSSW','output_file',self.outputfile) 00068 crab_cfg_parser.remove_option('USER','additional_input_files') 00069 if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB: 00070 addCrabInputFile(crab_cfg_parser,self.config.inputTTrigDB) 00071 00072 if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB: 00073 addCrabInputFile(crab_cfg_parser,self.config.inputVDriftDB) 00074 00075 self.crab_cfg = crab_cfg_parser
def DTVDriftSegmentCalibration::DTVDriftSegmentCalibration::initProcess | ( | self | ) |
Definition at line 23 of file DTVDriftSegmentCalibration.py.
00024 : 00025 self.process = loadCmsProcess(self.pset_template) 00026 self.process.GlobalTag.globaltag = self.config.globaltag 00027 self.process.dtVDriftSegmentCalibration.rootFileName = self.outputfile 00028 # Add tTrig and vDrift DB's, if requested 00029 if hasattr(self.config,'inputTTrigDB') and self.config.inputTTrigDB: 00030 label = '' 00031 if hasattr(self.config,'runOnCosmics') and self.config.runOnCosmics: label = 'cosmics' 00032 addPoolDBESSource(process = self.process, 00033 moduleName = 'tTrigDB',record = 'DTTtrigRcd',tag = 'ttrig',label = label, 00034 connect = 'sqlite_file:%s' % os.path.basename(self.config.inputTTrigDB)) 00035 00036 if hasattr(self.config,'inputVDriftDB') and self.config.inputVDriftDB: 00037 addPoolDBESSource(process = self.process, 00038 moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift', 00039 connect = 'sqlite_file:%s' % os.path.basename(self.config.inputVDriftDB)) 00040 00041 if hasattr(self.config,'inputDBTag') and self.config.inputDBTag: 00042 tag = self.config.inputDBTag 00043 record = self.config.inputDBRcd 00044 connect = self.config.connectStrDBTag 00045 moduleName = 'customDB%s' % record 00046 addPoolDBESSource(process = self.process, 00047 moduleName = moduleName,record = record,tag = tag, 00048 connect = connect) 00049 00050 # Prepend paths with unpacker if running on RAW 00051 if hasattr(self.config,'runOnRAW') and self.config.runOnRAW: 00052 if hasattr(self.config,'runOnMC') and self.config.runOnMC: 00053 getattr(self.process,self.config.digilabel).inputLabel = 'rawDataCollector' 00054 prependPaths(self.process,self.config.digilabel) 00055 00056 # Prepend paths with custom selection sequence 00057 if hasattr(self.config,'preselection') and self.config.preselection: 00058 pathsequence = self.config.preselection.split(':')[0] 00059 seqname = self.config.preselection.split(':')[1] 00060 self.process.load(pathsequence) 00061 prependPaths(self.process,seqname)
def DTVDriftSegmentCalibration::DTVDriftSegmentCalibration::run | ( | self | ) |
Definition at line 80 of file DTVDriftSegmentCalibration.py.
def DTVDriftSegmentCalibration::DTVDriftSegmentCalibration::writeCfg | ( | self | ) |
Definition at line 76 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.
Definition at line 80 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.
Definition at line 7 of file DTVDriftSegmentCalibration.py.