Skip to content

Commit aca8d21

Browse files
authored
Merge pull request #47699 from Dr15Jones/rntupleInConfigBuilder_update
Allow RelVal workflows to use RNTuple
2 parents 37bee35 + accd673 commit aca8d21

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

Configuration/Applications/python/ConfigBuilder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ def _addOutputUsingOutputDefinition(self):
619619
defaultFileName=self._options.outfile_name
620620
else:
621621
defaultFileName=self._options.outfile_name.replace('.root','_in'+theTier+'.root')
622+
defaultFileName=defaultFileName.replace('.rntpl','_in'+theTier+'.rntpl')
622623

623624
theFileName=self._options.dirout+anyOf(['fn','fileName'],outDefDict,defaultFileName)
624625
if not theFileName.endswith('.root'):
@@ -698,6 +699,7 @@ def _addOutputUsingTier(self):
698699
theFileName=self._options.outfile_name
699700
else:
700701
theFileName=self._options.outfile_name.replace('.root','_in'+streamType+'.root')
702+
theFileName=theFileName.replace('.rntpl','_in'+streamType+'.rntpl')
701703
theFilterName=self._options.filtername
702704
if streamType=='ALCARECO':
703705
theFilterName = 'StreamALCACombined'
@@ -725,7 +727,9 @@ def _createOutputModuleInAddOutput(self, tier, streamType, eventContent, fileNam
725727
CppType='PoolOutputModule'
726728
if self._options.timeoutOutput:
727729
CppType='TimeoutPoolOutputModule'
728-
if streamType=='DQM' and tier=='DQMIO': CppType='DQMRootOutputModule'
730+
if streamType=='DQM' and tier=='DQMIO':
731+
CppType='DQMRootOutputModule'
732+
fileName = fileName.replace('.rntpl', '.root')
729733
if not ignoreNano and "NANOAOD" in streamType : CppType='NanoAODOutputModule'
730734
if self._options.rntuple_out and CppType == 'PoolOutputModule':
731735
CppType='RNTupleOutputModule'

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)