Go to the documentation of this file.00001
00002
00003 """
00004 _recoTLR_
00005
00006 Util to retrieve the appropriate set of reco top-level patches
00007 from the Configuration/GlobalRuns package based on the release name
00008
00009 """
00010
00011
00012
00013 def getRelease():
00014 import os
00015
00016 try:
00017 release=os.environ['CMSSW_VERSION']
00018 except:
00019 msg='No CMSSW_VERSION envvar defined'
00020 raise RuntimeError,msg
00021
00022 sp=release.split('_')
00023 if len(sp)<2:
00024 raise RuntimeError,'Unexpected release name'+release
00025
00026 return ''.join(sp[1:3])+'X'
00027
00028
00029
00030
00031
00032 def getCustomProcess(process,myname):
00033 rel=getRelease()
00034 try:
00035 _temp=__import__('Configuration.GlobalRuns.reco_TLR_'+rel,globals(),locals(),[myname])
00036 except ImportError,ex:
00037 msg= 'Unable to import reco TLR configuration ' + str(ex)
00038 raise RuntimeError,msg
00039
00040 return getattr(_temp,myname)(process)
00041
00042
00043
00044 import sys
00045 def customisePPData(process):
00046 myname=sys._getframe().f_code.co_name
00047 return getCustomProcess(process,myname)
00048
00049 def customiseVALSKIM(process):
00050 myname=sys._getframe().f_code.co_name
00051 return getCustomProcess(process,myname)
00052
00053
00054 def customisePPMC(process):
00055 myname=sys._getframe().f_code.co_name
00056 return getCustomProcess(process,myname)
00057
00058
00059 def customiseCosmicData(process):
00060 myname=sys._getframe().f_code.co_name
00061 return getCustomProcess(process,myname)
00062
00063
00064 def customiseCosmicMC(process):
00065 myname=sys._getframe().f_code.co_name
00066 return getCustomProcess(process,myname)
00067
00068
00069 def customiseExpress(process):
00070 myname=sys._getframe().f_code.co_name
00071 return getCustomProcess(process,myname)
00072
00073
00074 def customisePrompt(process):
00075 myname=sys._getframe().f_code.co_name
00076 return getCustomProcess(process,myname)
00077
00078
00079 def customiseExpressHI(process):
00080 myname=sys._getframe().f_code.co_name
00081 return getCustomProcess(process,myname)
00082
00083
00084 def customisePromptHI(process):
00085 myname=sys._getframe().f_code.co_name
00086 return getCustomProcess(process,myname)