Skip to content

Commit ead4526

Browse files
committed
If --rntuple_out present when building workflow use .rntpl
When --rntuple_out is in the command for the workflow creation, use .rntpl as the default extension for the file names.
1 parent 9b2c675 commit ead4526

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Configuration/PyReleaseValidation/python/WorkFlowRunner.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,20 +186,23 @@ def closeCmd(i,ID):
186186
# Disable input for premix stage1 to allow combined stage1+stage2 workflow
187187
# Disable input for premix stage2 in FastSim to allow combined stage1+stage2 workflow (in FS, stage2 does also GEN)
188188
# Ugly hack but works
189+
extension = '.root'
190+
if '--rntuple_out' in cmd:
191+
extension = '.rntpl'
189192
if istep!=1 and not '--filein' in cmd and not 'premix_stage1' in cmd and not ("--fast" in cmd and "premix_stage2" in cmd):
190193
steps = cmd.split("-s ")[1].split(" ")[0] ## relying on the syntax: cmsDriver -s STEPS --otherFlags
191194
if "ALCA" not in steps:
192-
cmd+=' --filein file:step%s.root '%(istep-1,)
195+
cmd+=' --filein file:step%s%s '%(istep-1,extension)
193196
elif "ALCA" in steps and "RECO" in steps:
194-
cmd+=' --filein file:step%s.root '%(istep-1,)
197+
cmd+=' --filein file:step%s%s '%(istep-1,extension)
195198
elif self.recoOutput:
196199
cmd+=' --filein %s'%(self.recoOutput)
197200
else:
198-
cmd+=' --filein file:step%s.root '%(istep-1,)
201+
cmd+=' --filein file:step%s%s '%(istep-1,extension)
199202
if not '--fileout' in com:
200-
cmd+=' --fileout file:step%s.root '%(istep,)
203+
cmd+=' --fileout file:step%s%s '%(istep,extension)
201204
if "RECO" in cmd:
202-
self.recoOutput = "file:step%d.root"%(istep)
205+
self.recoOutput = "file:step%d%s"%(istep,extension)
203206
if self.jobReport:
204207
cmd += ' --suffix "-j JobReport%s.xml " ' % istep
205208
if (self.nThreads > 1) and ('HARVESTING' not in cmd) and ('ALCAHARVEST' not in cmd):

0 commit comments

Comments
 (0)