![]() |
![]() |
Functions | |
def | addMonitoring |
def | stepALCAPRODUCER |
def | validateProcess |
def Utils::addMonitoring | ( | process | ) |
_addMonitoring_ Add the monitoring services to the process provided in order to write out performance summaries to the framework job report
Definition at line 26 of file Utils.py.
00027 : 00028 """ 00029 _addMonitoring_ 00030 00031 Add the monitoring services to the process provided 00032 in order to write out performance summaries to the framework job report 00033 """ 00034 import FWCore.ParameterSet.Config as cms 00035 00036 process.SimpleMemoryCheck = cms.Service("SimpleMemoryCheck", 00037 jobReportOutputOnly = cms.untracked.bool(True) 00038 ) 00039 process.Timing = cms.Service("Timing", 00040 summaryOnly = cms.untracked.bool(True) 00041 ) 00042 00043 return process 00044
def Utils::stepALCAPRODUCER | ( | skims | ) |
_stepALCAPRODUCER_ Creates and returns the configuration string for the ALCAPRODUCER step starting from the list of AlcaReco path to be run.
Definition at line 9 of file Utils.py.
00010 : 00011 """ 00012 _stepALCAPRODUCER_ 00013 00014 Creates and returns the configuration string for the ALCAPRODUCER step 00015 starting from the list of AlcaReco path to be run. 00016 00017 """ 00018 00019 step = '' 00020 if len(skims) >0: 00021 step = ',ALCAPRODUCER:' 00022 for skim in skims: 00023 step += (skim+"+") 00024 step = step.rstrip('+') 00025 return step
def Utils::validateProcess | ( | process | ) |
_validateProcess_ Check attributes of process are appropriate for production This method returns nothing but will throw a RuntimeError for any issues it finds likely to cause problems in the production system
Definition at line 45 of file Utils.py.
00046 : 00047 """ 00048 _validateProcess_ 00049 00050 Check attributes of process are appropriate for production 00051 This method returns nothing but will throw a RuntimeError for any issues it finds 00052 likely to cause problems in the production system 00053 00054 """ 00055 00056 schedule=process.schedule_() 00057 paths=process.paths_() 00058 endpaths=process.endpaths_() 00059 00060 # check output mods are in paths and have appropriate settings 00061 for outputModName in process.outputModules_().keys(): 00062 outputMod = getattr(process, outputModName) 00063 if not hasattr(outputMod, 'dataset'): 00064 msg = "Process contains output module without dataset PSET: %s \n" % outputModName 00065 msg += " You need to add this PSET to this module to set dataTier and filterName\n" 00066 raise RuntimeError, msg 00067 ds=getattr(outputMod,'dataset') 00068 if not hasattr(ds, "dataTier"): 00069 msg = "Process contains output module without dataTier parameter: %s \n" % outputModName 00070 msg += " You need to add an untracked parameter to the dataset PSET of this module to set dataTier\n" 00071 raise RuntimeError, msg 00072 00073 # check module in path or whatever (not sure of exact syntax for endpath) 00074 omRun=False 00075 00076 if schedule==None: 00077 for path in paths: 00078 if outputModName in getattr(process,path).moduleNames(): 00079 omRun=True 00080 for path in endpaths: 00081 if outputModName in getattr(process,path).moduleNames(): 00082 omRun=True 00083 else: 00084 for path in schedule: 00085 if outputModName in path.moduleNames(): 00086 omRun=True 00087 if omRun==False: 00088 msg = "Output Module %s not in endPath" % outputModName 00089 raise RuntimeError, msg 00090 00091