Skip to content
Snippets Groups Projects

Sprucing Bandwidth Example

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Ross John Hunter

    Options file for running sprucing line on HLT2 FULL-stream min. bias output, as done in LHCbPR bandwidth tests

    To launch it in the stack, run with Moore/run gaudirun.py /path/to/spruce_snippet.py

    file_size = ls -lh --si my_spruce_output.dst b/w [GB/s] = input_rate (59 kHz for this HLT2 output file) [kHz] x file_size [MB] / options.evt_max

    Edited
    sprucing_snippet.py 1.71 KiB
    from Moore import options, run_moore
    from RecoConf.global_tools import stateProvider_with_simplified_geom
    from RecoConf.reconstruction_objects import reconstruction
    from RecoConf.calorimeter_reconstruction import make_digits
    from Moore.persistence.hlt2_tistos import list_of_full_stream_lines
    from Hlt2Conf.sprucing_settings.fixed_line_configs import lines_for_TISTOS_BW_March2024 as lines_for_TISTOS
    # from Hlt2Conf.lines.semileptonic.spruce_semileptonic import spruce_xib0toxicplustaunu_xicplustopkpi_tautoenunu_line as line_to_run
    from Hlt2Conf.lines.semileptonic import sprucing_lines # use whole module to account for overlap
    from Moore.streams import DETECTORS, Stream, Streams
    
    options.set_input_and_conds_from_testfiledb('expected_2024_min_bias_hlt2_full_stream_v2')
    options.input_type = "MDF"
    options.evt_max = 1000
    make_digits.global_bind(calo_raw_bank=False)
    
    options.input_raw_format = 0.5
    options.input_process = 'Hlt2'
    options.output_file = "my_spruce_output-dummystream.dst"
    options.output_type = 'ROOT'
    options.output_manifest_file = "my_spruce_output-dummystream.tck.json"
    
    def make_streams():
        streams = [
            Stream(
                "dummystream",
                lines=[builder() for builder in sprucing_lines.values()], # whole module
                # lines=[line_to_run()] # single line
                detectors=[]) # usual case - no detector raw banks
                # detectors=DETECTORS) # if persisting detector raw banks
        ]
        return Streams(streams=streams)
    
    public_tools = [stateProvider_with_simplified_geom()]
    with reconstruction.bind(
            from_file=True,
            spruce=True), list_of_full_stream_lines.bind(lines=lines_for_TISTOS):
        config = run_moore(options, make_streams, public_tools, exclude_incompatible=True)
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment