48 |
|
if debug==1 : self.debug_wrapper='--debug' |
49 |
|
|
50 |
|
self.scriptName = cfg_params.get('CRAB.jobtype').upper()+'.sh' |
51 |
+ |
|
52 |
+ |
self.pset = cfg_params.get('CMSSW.pset','None') |
53 |
|
|
54 |
|
return |
55 |
|
|
223 |
|
Returns part of the script that runs writeCfg.py on the WN |
224 |
|
""" |
225 |
|
# FUTURE: This function tests the CMSSW version. Can be simplified as we drop support for old versions |
226 |
< |
txt = "# Rewrite cfg for this job\n" |
227 |
< |
|
228 |
< |
if (self.CMSSW_major >= 2 and self.CMSSW_minor >= 1) or self.CMSSW_major > 2: # py in, py out for 2_1_x |
229 |
< |
txt += "echo $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.py pset.py\n" |
230 |
< |
txt += "python $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.py pset.py\n" |
231 |
< |
elif self.CMSSW_major >= 2: # cfg in, py out for 2_0_x |
232 |
< |
txt += "echo $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.py\n" |
233 |
< |
txt += "python $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.py\n" |
234 |
< |
else: # cfg in, cfg out for 1_x_y |
235 |
< |
txt += "echo $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.cfg\n" |
236 |
< |
txt += "python $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.cfg\n" |
226 |
> |
txt='' |
227 |
> |
if str(self.pset).upper() != 'NONE': |
228 |
> |
txt += "# Rewrite cfg for this job\n" |
229 |
> |
|
230 |
> |
if (self.CMSSW_major >= 2 and self.CMSSW_minor >= 1) or self.CMSSW_major > 2: # py in, py out for 2_1_x |
231 |
> |
txt += "echo $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.py pset.py\n" |
232 |
> |
txt += "python $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.py pset.py\n" |
233 |
> |
elif self.CMSSW_major >= 2: # cfg in, py out for 2_0_x |
234 |
> |
txt += "echo $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.py\n" |
235 |
> |
txt += "python $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.py\n" |
236 |
> |
else: # cfg in, cfg out for 1_x_y |
237 |
> |
txt += "echo $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.cfg\n" |
238 |
> |
txt += "python $RUNTIME_AREA/writeCfg.py "+str(self.debug_wrapper)+" pset.cfg pset.cfg\n" |
239 |
|
|
240 |
|
return txt |