diff --git a/DaVinciExamples/example_data/FEST_November_2021_dst_newPacking.yaml b/DaVinciExamples/example_data/FEST_November_2021_dst_newPacking.yaml index 9ea172486f76b58f6210806090f1d5f1962c6694..3b23cd0753335f77810b496481b4c676f85d46d9 100644 --- a/DaVinciExamples/example_data/FEST_November_2021_dst_newPacking.yaml +++ b/DaVinciExamples/example_data/FEST_November_2021_dst_newPacking.yaml @@ -11,6 +11,6 @@ geometry_version: trunk histo_file: v2_example_histos.root ntuple_file: v2_example_ntuples.root input_process: Hlt2 -stream: default +input_stream: default print_freq: 1000 input_raw_format: 0.5 diff --git a/DaVinciExamples/example_data/Run255620.yaml b/DaVinciExamples/example_data/Run255620.yaml index 68011d95c5e2507206268b35d9bd5bc0d3d101bc..fad1fbd3ba317b0235265ff1b35012badaecd297 100644 --- a/DaVinciExamples/example_data/Run255620.yaml +++ b/DaVinciExamples/example_data/Run255620.yaml @@ -11,7 +11,7 @@ evt_max : 10000 ntuple_file: "Raw_DV_Ks_example.root" input_raw_format: 0.5 -input_process: 'Hlt2' +input_process: Hlt2 conditions_version: AlignmentV9_2023_03_16_VPSciFiRich geometry_version: trunk python_logging_level: 3 diff --git a/DaVinciExamples/example_data/Upgrade_LbToLcmunu.yaml b/DaVinciExamples/example_data/Upgrade_LbToLcmunu.yaml index 47c49be94700d7df05b3513d80193bada8dd0a59..ddc7dc62dff3fe046498bf65fd33caf6f45f3e7b 100644 --- a/DaVinciExamples/example_data/Upgrade_LbToLcmunu.yaml +++ b/DaVinciExamples/example_data/Upgrade_LbToLcmunu.yaml @@ -12,6 +12,6 @@ input_raw_format: 0.5 lumi: false ntuple_file: 'mytuple.root' print_freq: 1 -input_process: 'Hlt2' -stream: 'default' +input_process: Hlt2 +input_stream: default evt_max: -1 diff --git a/DaVinciExamples/example_data/spruce_b2jpsik_opt.yaml b/DaVinciExamples/example_data/spruce_b2jpsik_opt.yaml index dd4b699d72aaddde6b7ff0459866de46f5c8aee5..9483dea72f58b62f4838bc4fed84e69253597f97 100644 --- a/DaVinciExamples/example_data/spruce_b2jpsik_opt.yaml +++ b/DaVinciExamples/example_data/spruce_b2jpsik_opt.yaml @@ -11,5 +11,5 @@ conddb_tag: sim-20201218-vc-md100 dddb_tag: dddb-20201211 conditions_version: master geometry_version: trunk -input_process: Turbo +input_process: TurboPass diff --git a/DaVinciExamples/example_data/test_passthrough_thor_lines.yaml b/DaVinciExamples/example_data/test_passthrough_thor_lines.yaml index c1a4a5a75747fa5379a2c470551242e196659bc5..5f0c14f16e63243979df8775b9da9a82dcc4cf45 100644 --- a/DaVinciExamples/example_data/test_passthrough_thor_lines.yaml +++ b/DaVinciExamples/example_data/test_passthrough_thor_lines.yaml @@ -10,5 +10,5 @@ conditions_version: master geometry_version: trunk histo_file: passthrough_histos.root ntuple_file: passthrough_tuple.root -input_process: Turbo +input_process: TurboPass print_freq: 1000 diff --git a/DaVinciExamples/example_data/test_tistos.yaml b/DaVinciExamples/example_data/test_tistos.yaml index 23fcd93818a6fe391eaa10808ad7d8bf100a2314..e05cf331aa2b78d35db258f56650f70b255255dd 100644 --- a/DaVinciExamples/example_data/test_tistos.yaml +++ b/DaVinciExamples/example_data/test_tistos.yaml @@ -12,5 +12,5 @@ ntuple_file: tuple_tistos.root evt_max: -1 write_fsr: False print_freq: 1000 -input_process: 'Hlt2' +input_process: Hlt2 diff --git a/DaVinciExamples/example_options/example_tupling_allfunctors.yaml b/DaVinciExamples/example_options/example_tupling_allfunctors.yaml index dbfd66fc6821d5bda7be75ce6d3a4098c92509a2..4ef0a614e74d302026dc1189683690eef62de8ea 100644 --- a/DaVinciExamples/example_options/example_tupling_allfunctors.yaml +++ b/DaVinciExamples/example_options/example_tupling_allfunctors.yaml @@ -12,5 +12,5 @@ lumi: false ntuple_file: 'DV_example_allFunctors_ntp.root' print_freq: 1 - input_process: 'Spruce' - stream: 'default' \ No newline at end of file + input_process: Spruce + input_stream: default \ No newline at end of file diff --git a/DaVinciExamples/example_options/example_tupling_from_spruce.yaml b/DaVinciExamples/example_options/example_tupling_from_spruce.yaml index 3d11b90e719d19dc5e02291fc222e5efc6072586..63d6445c121e3759a0e30066fef3ccf556180001 100644 --- a/DaVinciExamples/example_options/example_tupling_from_spruce.yaml +++ b/DaVinciExamples/example_options/example_tupling_from_spruce.yaml @@ -1,5 +1,4 @@ -evt_pre_filters: - Hlt2TopoLineFilter: "HLT_PASS('Hlt2Topo2BodyLineDecision')" +Hlt2TopoLineFilter: "HLT_PASS('Hlt2Topo2BodyLineDecision')" ntuple_file: "DV_example_sprucing_ntp.root" histo_file: "DV_example_sprucing_his.root" print_freq: 1 \ No newline at end of file diff --git a/DaVinciExamples/example_options/example_tupling_relation_isovariables.yaml b/DaVinciExamples/example_options/example_tupling_relation_isovariables.yaml index 00ba2f5099248c4aef3f9edd6950a65f5027694b..c0aba813a750874074cec5111c22df2923f91d92 100644 --- a/DaVinciExamples/example_options/example_tupling_relation_isovariables.yaml +++ b/DaVinciExamples/example_options/example_tupling_relation_isovariables.yaml @@ -4,4 +4,4 @@ ntuple_file: davinci_ntuple_ft.root print_freq: 1 data_type: Upgrade simulation: true -input_process: Turbo \ No newline at end of file +input_process: TurboPass \ No newline at end of file diff --git a/DaVinciExamples/tests/qmtest/debugging.qms/test_example-PrintDecayTree.qmt b/DaVinciExamples/tests/qmtest/debugging.qms/test_example-PrintDecayTree.qmt index b363c5e8a5faf464fac662c882970f5fa94a978d..ff36625d84a8c3f25000e339dce9c0a2cb07f104 100755 --- a/DaVinciExamples/tests/qmtest/debugging.qms/test_example-PrintDecayTree.qmt +++ b/DaVinciExamples/tests/qmtest/debugging.qms/test_example-PrintDecayTree.qmt @@ -16,7 +16,7 @@ <argument name="extra_options_yaml"><text> evt_max: 100 print_freq: 1 - input_process: Turbo + input_process: TurboPass msg_svc_format: "% F%40W%S%7W%R%T %0W%M" </text></argument> <argument name="timeout"><integer>3600</integer></argument> diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt index a60c51bf139734217a35f67c8b171e6b254f6788..974e3f1fd5f177c8bb55d9c988f460baa561572c 100755 --- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt +++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All.qmt @@ -39,8 +39,8 @@ lumi: false ntuple_file: 'DV_example_allFunctors_ntp.root' print_freq: 1 - input_process: 'Spruce' - stream: 'default' + input_process: Spruce + input_stream: default </text></argument> <argument name="timeout"><integer>1000</integer></argument> <argument name="args"><set> diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All_olddst.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All_olddst.qmt index 49e2b5402d86696cf0bfeb340bc55696c5564728..4d006fd1093a6f349c984c186ff09417a2c5463a 100755 --- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All_olddst.qmt +++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_All_olddst.qmt @@ -39,8 +39,8 @@ lumi: false ntuple_file: 'DV_example_allFunctors_ntp_old.root' print_freq: 1 - input_process: 'Spruce' - stream: 'default' + input_process: Spruce + input_stream: default </text></argument> <argument name="timeout"><integer>1000</integer></argument> <argument name="args"><set> diff --git a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_relation_isovariables.qmt b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_relation_isovariables.qmt index 76d0b95dac68d5d689569fd247cbc48efe014386..0294af92add006738db0e9d22049656c80a8d71c 100644 --- a/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_relation_isovariables.qmt +++ b/DaVinciExamples/tests/qmtest/tupling.qms/test_davinci_tupling_relation_isovariables.qmt @@ -25,7 +25,7 @@ print_freq: 1 data_type: Upgrade simulation: true - input_process: Turbo + input_process: TurboPass </text></argument> <argument name="timeout"><integer>3600</integer></argument> <argument name="reference"><text>$DAVINCIEXAMPLESROOT/tests/refs/test_davinci_tupling_relation_isovariables.ref</text></argument> diff --git a/DaVinciTests/python/DaVinciTests/mc/option_davinci-issue-97_bkgcat_mc-truth.yaml b/DaVinciTests/python/DaVinciTests/mc/option_davinci-issue-97_bkgcat_mc-truth.yaml index b9fd913c7f09917131219a1b017f8637bdca8e66..cd3ad220a6c9d06049d68572e31e9ae9f7982c18 100644 --- a/DaVinciTests/python/DaVinciTests/mc/option_davinci-issue-97_bkgcat_mc-truth.yaml +++ b/DaVinciTests/python/DaVinciTests/mc/option_davinci-issue-97_bkgcat_mc-truth.yaml @@ -5,8 +5,8 @@ annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/test_davinci-i data_type: Upgrade input_type: ROOT simulation: true -input_process: 'Hlt2' -stream: 'default' +input_process: Hlt2 +input_stream: default conddb_tag: sim-20210617-vc-mu100 dddb_tag: dddb-20210617 diff --git a/DaVinciTests/tests/qmtest/functors.qms/test_thor_functors.qmt b/DaVinciTests/tests/qmtest/functors.qms/test_thor_functors.qmt index cff3c526eacb9cb158b2d412b9c40be34b895b63..c8ed9be8c26a4a61d737c364bab2a0de6f4cae2e 100755 --- a/DaVinciTests/tests/qmtest/functors.qms/test_thor_functors.qmt +++ b/DaVinciTests/tests/qmtest/functors.qms/test_thor_functors.qmt @@ -22,7 +22,7 @@ evt_max: -1 print_freq: 1 msg_svc_format: "% F%60W%S%7W%R%T %0W%M" - input_process: Turbo + input_process: TurboPass </text></argument> <argument name="timeout"><integer>3600</integer></argument> <argument name="args"><set> diff --git a/DaVinciTutorials/options.yaml b/DaVinciTutorials/options.yaml index c7aea6413bc1f5fa6df4d779891b1879fb51a475..876d99711c0c5dcda5b9755614f35b07a5171f51 100644 --- a/DaVinciTutorials/options.yaml +++ b/DaVinciTutorials/options.yaml @@ -4,7 +4,7 @@ annsvc_config: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/hlt2_passthrou input_type: ROOT evt_max: 100 ntuple_file: davinci_ntuple.root -input_process: 'Turbo' +input_process: TurboPass print_freq: 1 data_type: Upgrade simulation: true diff --git a/Phys/DaVinci/python/DaVinci/LbExec.py b/Phys/DaVinci/python/DaVinci/LbExec.py index 3ae34e4aba5516de7132d2915815503446e7b53d..15f02a202934aaa39d85c6914f81888871523c4b 100644 --- a/Phys/DaVinci/python/DaVinci/LbExec.py +++ b/Phys/DaVinci/python/DaVinci/LbExec.py @@ -28,11 +28,8 @@ class Options(DefaultOptions): where their keyword arguments are globally bound to the user-specified values. This way, users do not have to manually configure these functions themselves. - The following user-required parameters need to be set in this class: - - input_process (str): Input process type, see `GaudiConf.LbExec.options.InputProcessTypes` values. - The optional parameters that need to be set are : - - stream (str): Stream name. Default is "default" (Note: for `input_process=Hlt2` the stream must be strictly empty. The default value is overwritten in this case.) + - input_stream (str): Stream name. Default is "default" (Note: for `input_process=Hlt2` the stream must be strictly empty. The default value is overwritten in this case.) - lumi (bool): Flag to store luminosity information. Default is False. - evt_pre_filters (dict[str,str]): Event pre-filter code. Default is None. - annsvc_config (str): Path to the configuration file from sprucing or Hlt2. Default is None. @@ -40,8 +37,7 @@ class Options(DefaultOptions): - merge_genfsr (bool): Flag to merge the full stream record. Default is False. - metainfo_additional_tags: (list): Additional central tags for `PyConf.filecontent_metadata.metainfo_repos`. Default is []. """ - input_process: InputProcessTypes - stream: Optional[str] = 'default' + input_stream: Optional[str] = 'default' lumi: bool = False evt_pre_filters: Optional[dict[str, str]] = None annsvc_config: Optional[str] = None @@ -62,9 +58,9 @@ class Options(DefaultOptions): """ input_process = values.get("input_process") if input_process not in { - InputProcessTypes.Spruce, InputProcessTypes.Turbo + InputProcessTypes.Spruce, InputProcessTypes.TurboPass }: - values['stream'] = '' + values['input_stream'] = '' return values @@ -84,17 +80,17 @@ class Options(DefaultOptions): This way users do not have to manually configure these functions themselves. """ default_raw_event.global_bind(raw_event_format=self.input_raw_format) - default_raw_banks.global_bind(stream=self.stream) + default_raw_banks.global_bind(stream=self.input_stream) upfront_decoder.global_bind( - input_process=self.input_process, stream=self.stream) + input_process=self.input_process, stream=self.input_stream) reconstruction.global_bind(input_process=self.input_process) get_tes_root.global_bind(input_process=self.input_process) get_odin.global_bind( - input_process=self.input_process, stream=self.stream) - make_odin.global_bind(stream=self.stream) + input_process=self.input_process, stream=self.input_stream) + make_odin.global_bind(stream=self.input_stream) get_hlt_reports.global_bind( - input_process=self.input_process, stream=self.stream) + input_process=self.input_process, stream=self.input_stream) get_mc_track_info.global_bind(input_process=self.input_process) with super().apply_binds(): yield diff --git a/Phys/DaVinci/python/DaVinci/algorithms.py b/Phys/DaVinci/python/DaVinci/algorithms.py index d69bb246df0441474b64f3f2f05e169066c291c8..a1018b98db6d286cf9e1de1d20f856736c916dd1 100644 --- a/Phys/DaVinci/python/DaVinci/algorithms.py +++ b/Phys/DaVinci/python/DaVinci/algorithms.py @@ -138,8 +138,8 @@ def apply_filters(options, algs_dict): # This filter will skip events with empty DstData but a positive line decision. # It will only be applied to the input_process where DstData bank is produced (Hlt2, Turbo, Spruce). - if options.input_process in {"Turbo", "Spruce", "Hlt2"}: - algs_list += [dstdata_filter(options.stream)] + if options.input_process in {"TurboPass", "Spruce", "Hlt2"}: + algs_list += [dstdata_filter(options.input_stream)] if options.evt_pre_filters: evt_pre_filters = [] diff --git a/Phys/DaVinci/tests/config/test_algorithms.py b/Phys/DaVinci/tests/config/test_algorithms.py index 397e9abc45740ce975f29609ae44d6068a5ff551..32be042f15f7127fc3c3276a95446c611b278b2a 100644 --- a/Phys/DaVinci/tests/config/test_algorithms.py +++ b/Phys/DaVinci/tests/config/test_algorithms.py @@ -45,14 +45,14 @@ def test_add_hlt2_filter(): evt_max=1, simulation=True, input_process="Hlt2", - stream="default", + input_stream="default", ) #Note here that we need to manually apply a bind to the PyConf functions # as they are not automatically configured in the pytests. # When running DV, the PyConf functions are globally configured and one must avoid # "binding" as much as possible. with default_raw_event.bind(raw_event_format=options.input_raw_format),\ - get_hlt_reports.bind(input_process=options.input_process, stream=options.stream): + get_hlt_reports.bind(input_process=options.input_process, stream=options.input_stream): test_filter = create_lines_filter( "test_filter_{hash}", lines=['Hlt2TESTLine']) assert test_filter.fullname.startswith("VoidFilter/test_filter") @@ -68,10 +68,10 @@ def test_add_spruce_filter(): evt_max=1, simulation=True, input_process="Spruce", - stream="default", + input_stream="default", ) with default_raw_event.bind(raw_event_format=options.input_raw_format),\ - get_hlt_reports.bind(input_process=options.input_process, stream=options.stream): + get_hlt_reports.bind(input_process=options.input_process, stream=options.input_stream): test_filter = create_lines_filter( "test_filter_{hash}", lines=["SpruceTESTLine"]) assert test_filter.fullname.startswith("VoidFilter/test_filter") @@ -89,7 +89,7 @@ def test_add_void_filter(): simulation=True, ) with get_hlt_reports.bind( - input_process=options.input_process, stream=options.stream): + input_process=options.input_process, stream=options.input_stream): test_filter = add_filter("test_filter_{hash}", "VOIDTEST_Filter") assert "VoidFilter" in test_filter.fullname @@ -135,16 +135,16 @@ def test_configured_funtuple(): } options = Options( data_type="Upgrade", - input_process="Turbo", + input_process="TurboPass", evt_max=1, input_raw_format=0.5, simulation=True, ) with default_raw_event.bind(raw_event_format=options.input_raw_format),\ - upfront_decoder.bind(input_process=options.input_process, stream=options.stream),\ - get_hlt_reports.bind(input_process=options.input_process, stream=options.stream),\ + upfront_decoder.bind(input_process=options.input_process, stream=options.input_stream),\ + get_hlt_reports.bind(input_process=options.input_process, stream=options.input_stream),\ get_odin.bind(input_process=options.input_process, - stream=options.stream): + stream=options.input_stream): test_dict = configured_FunTuple(config) assert any("FunTupleBase_Particles/Tuple_TestTuple" in alg.fullname for alg in test_dict["TestTuple"]) @@ -163,7 +163,7 @@ def test_get_odin(): ) with default_raw_event.bind(raw_event_format=options.input_raw_format): odin = get_odin( - input_process=options.input_process, stream=options.stream) + input_process=options.input_process, stream=options.input_stream) assert re.fullmatch("/Event/createODIN_[0-9a-f]*/ODIN", odin.location) is not None @@ -177,10 +177,10 @@ def test_get_decreports(): input_raw_format=0.5, evt_max=1, simulation=True, - input_process="Turbo", - stream="TurboSP", + input_process="TurboPass", + input_stream="TurboSP", ) with default_raw_event.bind(raw_event_format=options.input_raw_format),\ - get_hlt_reports.bind(input_process=options.input_process, stream=options.stream): + get_hlt_reports.bind(input_process=options.input_process, stream=options.input_stream): decreports = get_decreports("Hlt2") assert decreports.location == "/Event/Hlt2/DecReports" diff --git a/doc/guide/running.rst b/doc/guide/running.rst index 93553c0a4a4f6978d6dc7f099a6e4457f99c2c4e..ef2d11043d3aab57855b2f9cc1efc4e0dc273f14 100644 --- a/doc/guide/running.rst +++ b/doc/guide/running.rst @@ -50,14 +50,14 @@ Also make a file named ``options.yaml`` containing: .. code-block:: yaml - + input_files: - root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/hlt2_passthrough_thor_lines.dst annsvc_config: root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/hlt2_passthrough_thor_lines.tck.json input_type: ROOT evt_max: 100 ntuple_file: davinci_ntuple.root - input_process: Turbo + input_process: TurboPass print_freq: 1 data_type: Upgrade simulation: true