diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py index d334b1a5dab42e763c29c970b073c75e7f66ccf3..8092b546b682ac8702356b36c846bfb66266f914 100644 --- a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py +++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py @@ -361,14 +361,14 @@ class trigRecoExecutor(athenaExecutor): elif(len(matchedOutputFileNames)): msg.info('Single BS file found: will split (if requested) and rename file') - #TODO (ATR-20974) First check if we want to produce the COST BS output - #if 'COST' in self.conf.dataDictionary: - # splitFailed = self._splitBSfile('Cost', matchedOutputFileNames[0],self.conf.dataDictionary['COST'].value[0]) - # if(splitFailed): - # raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'), - # 'Did not produce any BS file when selecting stream with trigbs_extractStream.py in file') - - # If a stream (not All) is selected then slim the output to the particular stream out of the original BS file with many streams + #First check if we want to produce the COST DRAW output + if 'DRAW_TRIGCOST' in self.conf.dataDictionary: + splitFailed = self._splitBSfile('CostMonitoring', matchedOutputFileNames[0],self.conf.dataDictionary['DRAW_TRIGCOST'].value[0]) + if(splitFailed): + raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'), + 'Did not produce any BS file when selecting CostMonitoring stream with trigbs_extractStream.py in file') + + # If a stream (not All) is selected, then slim the orignal (many stream) BS output to the particular stream if 'streamSelection' in self.conf.argdict and self.conf.argdict['streamSelection'].value != "All": splitFailed = self._splitBSfile(self.conf.argdict['streamSelection'].value, matchedOutputFileNames[0], argInDict.value[0]) if(splitFailed): diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py index 43c2037e4b75e1d0101b0eb9d3057af1309bbd09..24448b4622a9ee024daf57f7c62798e1da19f48e 100755 --- a/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py +++ b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py @@ -50,7 +50,7 @@ def getTransform(): exe = 'setsid athenaHLT.py', # setsid is needed to fix the process-group id of child processes to be the same as mother process; discussed in https://its.cern.ch/jira/browse/ATR-20513 substep = 'b2r', tryDropAndReload = False, - inData = ['BS_RDO', 'RDO'], outData = ['BS', 'BS_TRIGCOST', 'HIST_HLTMON','HIST_DEBUGSTREAMMON'], + inData = ['BS_RDO', 'RDO'], outData = ['BS', 'DRAW_TRIGCOST', 'HIST_HLTMON','HIST_DEBUGSTREAMMON'], perfMonFile = 'ntuple_BSRDOtoRAW.pmon.gz', literalRunargs = ['writeBS = runArgs.writeBS', 'from AthenaCommon.AthenaCommonFlags import jobproperties as jps', @@ -65,10 +65,11 @@ def getTransform(): #runs in athena and will succeed if input BS file has costmon enabled executorSet.add(trigCostExecutor(name = 'RAWtoCOST', skeletonFile = 'TrigCostMonitor/readTrigCost.py', substep = 'r2c', - inData = ['BS_TRIGCOST'], outData = ['NTUP_TRIGCOST','NTUP_TRIGRATE','NTUP_TRIGEBWGHT'], + inData = ['DRAW_TRIGCOST'], outData = ['NTUP_TRIGCOST','NTUP_TRIGRATE','NTUP_TRIGEBWGHT'], perfMonFile = 'ntuple_RAWtoCOST.pmon.gz', - literalRunargs = ['BSRDOInput = runArgs.inputBSFile', - 'EvtMax = runArgs.maxEvents'])) + literalRunargs = ['from AthenaCommon.AthenaCommonFlags import jobproperties as jps', + 'jps.AthenaCommonFlags.FilesInput.set_Value_and_Lock(runArgs.inputDRAW_TRIGCOSTFile)', + 'jps.AthenaCommonFlags.EvtMax.set_Value_and_Lock(runArgs.maxEvents)'])) #add default reconstruction steps # eventually to be replaced by: @@ -190,17 +191,14 @@ def addTrigCostArgs(parser): # Use arggroup to get these arguments in their own sub-section (of --help) parser.defineArgGroup('TrigCost', 'Specific options related to the trigger costmon steps in trigger reprocessings') - #without a outputBS_TRIGCOSTFile name specified then it will not be possible to run any further COST mon if the BS is slimmed to a specific stream - parser.add_argument('--outputBS_TRIGCOSTFile', nargs='+', - type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='output', runarg=True, type='bs'), - help='Output bytestream file of COST stream', group='TrigCost') - #input BS file for the TRIGCOST step (name just to be unique identifier) - parser.add_argument('--inputBS_TRIGCOSTFile', nargs='+', - type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='input', runarg=True, type='bs'), - help='Input bytestream file of COST stream', group='TrigCost') - #For prodsys to make sure uses inputBS_TRIGCOSTFile rather than inputBSFile when running the r2c step - parser.add_argument('--prodSysBSTRIGCOST', type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True), - help='For prodsys to make sure uses inputBS_TRIGCOSTFile rather than inputBSFile when running the r2c step', group='TrigCost') + #without a outputDRAW_TRIGCOSTFile name specified then it will not be possible to run any further COST analysis if the BS is slimmed to a specific stream + parser.add_argument('--outputDRAW_TRIGCOSTFile', nargs='+', + type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='output', runarg=True), + help='Output bytestream file of CostMonitoring stream', group='TrigCost') + #input BS file for the TRIGCOST step (name just to be unique identifier for prodSys) + parser.add_argument('--inputDRAW_TRIGCOSTFile', nargs='+', + type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='input', runarg=True), + help='Input bytestream file of CostMonitoring stream', group='TrigCost') #NTUP_TRIG is used for COST monitoring - used in the reco release parser.add_argument('--outputNTUP_TRIGFile', nargs='+', type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', runarg=True, countable=False),