diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py index e0a690c3174b5ce687de9d3b26fdc87b9feaf72a..d334b1a5dab42e763c29c970b073c75e7f66ccf3 100644 --- a/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py +++ b/HLT/Trigger/TrigTransforms/TrigTransform/python/trigRecoExe.py @@ -212,21 +212,21 @@ class trigRecoExecutor(athenaExecutor): matchedOutputFileNames.append(file) return matchedOutputFileNames - #run athenaHLT-select-PEB-stream.py to split a stream out of the BS file + #run trigbs_extractStream.py to split a stream out of the BS file #renames the split file afterwards def _splitBSfile(self, outputStream, allStreamsFileName, splitFileName): msg.info('Splitting stream %s from BS file' % outputStream) splitStreamFailure=0 try: - cmd = 'athenaHLT-select-PEB-stream.py -s ' + outputStream + ' ' + allStreamsFileName + cmd = 'trigbs_extractStream.py -s ' + outputStream + ' ' + allStreamsFileName msg.info('running command for splitting (in original asetup env): %s' % cmd) splitStreamFailure = subprocess.call(cmd, shell=True) - msg.debug('athenaHLT-select-PEB-stream.py splitting return code %s' % (splitStreamFailure) ) + msg.debug('trigbs_extractStream.py splitting return code %s' % (splitStreamFailure) ) except OSError as e: raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'), - 'Exception raised when selecting stream with athenaHLT-select-PEB-stream.py in file {0}: {1}'.format(allStreamsFileName, e)) + 'Exception raised when selecting stream with trigbs_extractStream.py in file {0}: {1}'.format(allStreamsFileName, e)) if splitStreamFailure != 0: - msg.error('athenaHLT-select-PEB-stream.py returned error (%s) no split BS file created' % splitStreamFailure) + msg.error('trigbs_extractStream.py returned error (%s) no split BS file created' % splitStreamFailure) return 1 else: #know that the format will be of the form ####._athenaHLT.####.data @@ -237,7 +237,7 @@ class trigRecoExecutor(athenaExecutor): self._renamefile(matchedOutputFileName[0], splitFileName) return 0 else: - msg.error('athenaHLT-select-PEB-stream.py did not created expected file (%s)' % expectedStreamFileName) + msg.error('trigbs_extractStream.py did not created expected file (%s)' % expectedStreamFileName) return 1 #rename a created file - used to overwrite filenames from athenaHLT into the requested argument name @@ -366,14 +366,14 @@ class trigRecoExecutor(athenaExecutor): # 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 athenaHLT-select-PEB-stream.py in file') + # '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 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): raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'), - 'Did not produce any BS file when selecting stream with athenaHLT-select-PEB-stream.py in file') + 'Did not produce any BS file when selecting stream with trigbs_extractStream.py in file') else: msg.info('Stream "All" requested, so not splitting BS file') self._renamefile(matchedOutputFileNames[0], argInDict.value[0]) diff --git a/HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT-select-PEB-stream.py b/Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_extractStream.py similarity index 100% rename from HLT/Trigger/TrigControl/TrigCommon/bin/athenaHLT-select-PEB-stream.py rename to Trigger/TrigTools/TrigByteStreamTools/bin/trigbs_extractStream.py diff --git a/HLT/Trigger/TrigControl/TrigCommon/doc/athenaHLT-select-PEB-stream.txt b/Trigger/TrigTools/TrigByteStreamTools/doc/trigbs_extractStream.txt similarity index 78% rename from HLT/Trigger/TrigControl/TrigCommon/doc/athenaHLT-select-PEB-stream.txt rename to Trigger/TrigTools/TrigByteStreamTools/doc/trigbs_extractStream.txt index 0d8f4a7310db06ec2128213dd7185693d087e97b..1d4eee06a936f5a78970197892b71c7bc765b700 100644 --- a/HLT/Trigger/TrigControl/TrigCommon/doc/athenaHLT-select-PEB-stream.txt +++ b/Trigger/TrigTools/TrigByteStreamTools/doc/trigbs_extractStream.txt @@ -1,16 +1,16 @@ The script -athenaHLT-select-PEB-stream.py +trigbs_extractStream.py allows to select from a bytestream file events which belong to a given stream and to write them to a bytestream output file which obeys the same conventions as the files produced in P1. -athenaHLT-select-PEB-stream.py -h +trigbs_extractStream.py -h gives a list of options which can be used: -./athenaHLT-select-PEB-stream.py -h -global "./athenaHLT-select-PEB-stream.py" options: -[DFPadhlnpsv] | --[dump-options,help,lumi-block,max-events,option-file,output-dir,progress-bar,project-tag,start-event,stream-name,verbosity] [arguments]+ +./trigbs_extractStream.py -h +global "./trigbs_extractStream.py" options: -[DFPadhlnpsv] | --[dump-options,help,lumi-block,max-events,option-file,output-dir,progress-bar,project-tag,start-event,stream-name,verbosity] [arguments]+ [Global options] @@ -50,9 +50,9 @@ Typical workflow for developers: The <athenaHLT-output-file> will contain all events which have triggered, including also DataScouting events. -3) Generate a P1 stream file with "athenaHLT-select-PEB-stream.py" from the athenaHLT output file +3) Generate a P1 stream file with "trigbs_extractStream.py" from the athenaHLT output file -> athenaHLT-select-PEB-stream.py -s <my-preferred-stream> <athenaHLT-output-file> +> trigbs_extractStream.py -s <my-preferred-stream> <athenaHLT-output-file> There will be an output file produced of the form @@ -69,9 +69,9 @@ All input events have to be for the same run number, but can have different lumi Some Remarks: ------------- -1) athenaHLT-select-PEB-stream.py allows to read multiple input files +1) trigbs_extractStream.py allows to read multiple input files -> athenaHLT-select-PEB-stream.py <file1> <file2> ... <fileN> +> trigbs_extractStream.py <file1> <file2> ... <fileN> All events have to be however from the same run. Events from different runs are skipped and an ERROR message is printed. @@ -81,10 +81,10 @@ All events have to be however from the same run. Events from different runs are 4) For repeated running with the same options a standard option file can be generated: -athenaHLT-select-PEB-stream.py -D <various options> <input files> > my-opt-file.py +trigbs_extractStream.py -D <various options> <input files> > my-opt-file.py and the run can be repeated with -athenaHLT-select-PEB-stream.py -F my-opt-file.py +trigbs_extractStream.py -F my-opt-file.py The file my-opt-file.py can be also edited and modified with Python commands. diff --git a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_BStoBStoESDAOD_mt1_build.py b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_BStoBStoESDAOD_mt1_build.py index 38c051550fa7fb55851e4f5c5332d5bb475e2c41..f02fd4c7483dec70276bd47e9a7db5422aef16bf 100755 --- a/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_BStoBStoESDAOD_mt1_build.py +++ b/Trigger/TrigValidation/TrigAnalysisTest/test/test_trigAna_BStoBStoESDAOD_mt1_build.py @@ -30,7 +30,7 @@ BStoBS.args = ' -c "{:s}"'.format(BStoBSPreExec) # Extract the Main stream data filterBS = ExecStep.ExecStep('FilterBS') filterBS.type = 'other' -filterBS.executable = 'athenaHLT-select-PEB-stream.py' +filterBS.executable = 'trigbs_extractStream.py' filterBS.input = '' filterBS.args = '-s Main ' + findFile('data_test.*.Single_Stream.daq.RAW.*.data') diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py index f197cf8f7c2964109eabafcca04adab8e80d41bc..371bda8684c53fd30d751a0d5b8d611c4faae89f 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_build.py @@ -19,7 +19,7 @@ def filterBS(stream_name): '''Extract ByteStream data for a given stream from a file with multiple streams''' filterStep = ExecStep.ExecStep('FilterBS_'+stream_name) filterStep.type = 'other' - filterStep.executable = 'athenaHLT-select-PEB-stream.py' + filterStep.executable = 'trigbs_extractStream.py' filterStep.input = '' filterStep.args = '-s ' + stream_name + ' ' + findFile('*_HLTMPPy_output.*.data') return filterStep diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py index d8fab1bab1d981238f9d574913ddd3ae3f2e5e34..bf04221d9833fbaa4f77b16756415c37a4941650 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_decodeBS_grid.py @@ -32,7 +32,7 @@ def filterBS(stream_name): '''Extract ByteStream data for a given stream from a file with multiple streams''' filterStep = ExecStep.ExecStep('FilterBS_'+stream_name) filterStep.type = 'other' - filterStep.executable = 'athenaHLT-select-PEB-stream.py' + filterStep.executable = 'trigbs_extractStream.py' filterStep.input = '' filterStep.args = '-s ' + stream_name + ' ' + findFile('*_HLTMPPy_output.*.data') return filterStep diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py index b0c9cd512790df0ffe9cc2595aa6ac490dab6143..2e653ce39fa6933d25fe0cdc9761966727a94e4a 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py @@ -24,7 +24,7 @@ hlt.args += ' -o output' # Extract the physics_Main stream out of the BS file with many streams filter_bs = ExecStep.ExecStep('FilterBS') filter_bs.type = 'other' -filter_bs.executable = 'athenaHLT-select-PEB-stream.py' +filter_bs.executable = 'trigbs_extractStream.py' filter_bs.input = '' filter_bs.args = '-s Main ' + findFile('*_HLTMPPy_output.*.data') diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py index f45e1fb9c5734bb51f1dcbbf92c21cab9aa67a70..515305747f9a1be58c32abd7a549a5422c180178 100755 --- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py +++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py @@ -33,7 +33,7 @@ hlt.args += ' -o output' # Extract the physics_Main stream out of the BS file with many streams filter_bs = ExecStep.ExecStep('FilterBS') filter_bs.type = 'other' -filter_bs.executable = 'athenaHLT-select-PEB-stream.py' +filter_bs.executable = 'trigbs_extractStream.py' filter_bs.input = '' filter_bs.args = '-s Main ' + findFile('*_HLTMPPy_output.*.data')