Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a very preliminary app for printing out the detailed configurat… #63

Merged
merged 5 commits into from
May 30, 2024

Conversation

bieryAtFnal
Copy link
Contributor

…ion of a specified application.

This new app (print_detailed_config_info) builds on the existing generate_modules_test app. (diff print_detailed_config_info.cxx generate_modules_test.cxx can be helpful...)

The new app is intended to be a stepping stone toward having a tool that can print out the generated configuration of a full system. As such, it may be subsumed into a different app later, but it still has value in the meantime, IMO.

@bieryAtFnal bieryAtFnal requested a review from eflumerf May 28, 2024 15:55
@bieryAtFnal
Copy link
Contributor Author

Here is sample output from the app:

print_detailed_config_info test-session ru-01 test/config/test-session.data.xml
ru-01 is of class ReadoutApplication
2024-May-29 09:08:25,054 LOG [dunedaq::appdal::ReadoutApplication::generate_modules(...) at /home/nfs/biery/dunedaq/23MayFDv5Test1108/sourcecode/appdal/src/ReadoutApplication.cpp:227] Processing ReadoutGroup rog-1
2024-May-29 09:08:25,055 LOG [dunedaq::appdal::ReadoutApplication::generate_modules(...) at /home/nfs/biery/dunedaq/23MayFDv5Test1108/sourcecode/appdal/src/ReadoutApplication.cpp:246] Processing ReadoutInterface ROInterface-1
2024-May-29 09:08:25,055 LOG [dunedaq::appdal::ReadoutApplication::generate_modules(...) at /home/nfs/biery/dunedaq/23MayFDv5Test1108/sourcecode/appdal/src/ReadoutApplication.cpp:262] Processing stream dummyStream-1, id 1, det_id 3
2024-May-29 09:08:25,055 LOG [dunedaq::appdal::ReadoutApplication::generate_modules(...) at /home/nfs/biery/dunedaq/23MayFDv5Test1108/sourcecode/appdal/src/ReadoutApplication.cpp:262] Processing stream dummyStream-2, id 2, det_id 3
Generated 5 modules
module tphandler-100
  Object:
    id: 'tphandler-100', class name: 'TriggerDataHandler'
    source_id: 100
    detector_id: 0
    emulation_mode: 0
    inputs: ("tp_input_@Queue", "internal_data_requests_for_100@QueueWithId")
    outputs: ("tps_ru-01@NetworkConnection", "tas_ru-01@NetworkConnection", "internal_fragments_@Queue")
    used_resources: ()
    geo_id: "(null)"
    module_configuration: "def-tp-handler@ReadoutModuleConf"
    enabled_source_ids: ()
    mandatory_source_ids: ()
    -----
    "module_configuration"     Object:
      id: 'def-tp-handler', class name: 'ReadoutModuleConf'
      template_for: "TriggerDataHandler"
      input_data_type: "TriggerPrimitive"
      generate_timesync: 0
      post_processing_delay_ticks: 0
      request_handler: "def-tp-request-handler@RequestHandler"
      latency_buffer: "def-latency-buf@LatencyBuffer"
      data_processor: "tp-processor@TPDataProcessor"
      -----
      "request_handler"       Object:
        id: 'def-tp-request-handler', class name: 'RequestHandler'
        handler_threads: 1
        request_timeout: 10000
        pop_limit_pct: 0.5
        pop_size_pct: 0.8
        warn_on_timeout: 1
        warn_on_empty_buffer: 1
        periodic_data_transmission_ms: 5
        data_recorder: "(null)"
      -----
      "latency_buffer"       Object:
        id: 'def-latency-buf', class name: 'LatencyBuffer'
        size: 139008
        numa_aware: 1
        numa_node: 1
        intrinsic_allocator: 1
        alignment_size: 4096
        preallocation: 1
      -----
      "data_processor"       Object:
        id: 'tp-processor', class name: 'TPDataProcessor'
        queue_sizes: 10000
        thread_names_prefix: "proc-"
        mask_processing: 0
        print_tp_info: 0
        algorithms: ("dummy-ta-maker@TriggerActivityMakerPrescalePlugin")
        channel_filter_conf: "(null)"
        -----
        "algorithms[0]"         Object:
          id: 'dummy-ta-maker', class name: 'TriggerActivityMakerPrescalePlugin'
          prescale: 1000
 input objects 
    Object:
      id: 'tp_input_', class name: 'Queue'
      data_type: "TriggerPrimitive"
      send_timeout_ms: 1
      recv_timeout_ms: 1
      capacity: 10000
      queue_type: "kFollyMPMCQueue"
    Object:
      id: 'internal_data_requests_for_100', class name: 'QueueWithId'
      data_type: "DataRequest"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollySPSCQueue"
      source_id: 100
 output objects 
    Object:
      id: 'tps_ru-01', class name: 'NetworkConnection'
      data_type: "TPSet"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      connection_type: "kPubSub"
      associated_service: "triggerPrimitives@Service"
    Object:
      id: 'tas_ru-01', class name: 'NetworkConnection'
      data_type: "TriggerActivity"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      connection_type: "kPubSub"
      associated_service: "triggerActivities@Service"
    Object:
      id: 'internal_fragments_', class name: 'Queue'
      data_type: "Fragment"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollyMPMCQueue"

module DLH-1
  Object:
    id: 'DLH-1', class name: 'FDDataLinkHandler'
    source_id: 1
    detector_id: 0
    emulation_mode: 1
    inputs: ("raw_input_1@QueueWithId", "internal_data_requests_for_1@QueueWithId")
    outputs: ("tp_input_@Queue", "internal_fragments_@Queue", "time_sync_1@NetworkConnection")
    used_resources: ()
    geo_id: "dummyGeoId-1@GeoId"
    module_configuration: "def-link-handler@ReadoutModuleConf"
    -----
    "geo_id"     Object:
      id: 'dummyGeoId-1', class name: 'GeoId'
      detector_id: 3
      crate_id: 1
      slot_id: 0
      stream_id: 0
    -----
    "module_configuration"     Object:
      id: 'def-link-handler', class name: 'ReadoutModuleConf'
      template_for: "FDDataLinkHandler"
      input_data_type: "WIBEthFrame"
      generate_timesync: 1
      post_processing_delay_ticks: 0
      request_handler: "def-data-request-handler@RequestHandler"
      latency_buffer: "def-latency-buf@LatencyBuffer"
      data_processor: "def-wib-processor@RawDataProcessor"
      -----
      "request_handler"       Object:
        id: 'def-data-request-handler', class name: 'RequestHandler'
        handler_threads: 1
        request_timeout: 10000
        pop_limit_pct: 0.5
        pop_size_pct: 0.8
        warn_on_timeout: 1
        warn_on_empty_buffer: 1
        periodic_data_transmission_ms: 0
        data_recorder: "(null)"
      -----
      "latency_buffer"       Object:
        id: 'def-latency-buf', class name: 'LatencyBuffer'
        size: 139008
        numa_aware: 1
        numa_node: 1
        intrinsic_allocator: 1
        alignment_size: 4096
        preallocation: 1
      -----
      "data_processor"       Object:
        id: 'def-wib-processor', class name: 'RawDataProcessor'
        queue_sizes: 10000
        thread_names_prefix: "postproc-"
        mask_processing: 0
        max_ticks_tot: 10000
        tpg_enabled: 1
        algorithm: "SimpleThreshold"
        threshold: 1900
        channel_mask: ()
        channel_map: "PD2HDChannelMap"
 input objects 
    Object:
      id: 'raw_input_1', class name: 'QueueWithId'
      data_type: "WIBEthFrame"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 10000
      queue_type: "kFollySPSCQueue"
      source_id: 1
    Object:
      id: 'internal_data_requests_for_1', class name: 'QueueWithId'
      data_type: "DataRequest"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollySPSCQueue"
      source_id: 1
 output objects 
    Object:
      id: 'tp_input_', class name: 'Queue'
      data_type: "TriggerPrimitive"
      send_timeout_ms: 1
      recv_timeout_ms: 1
      capacity: 10000
      queue_type: "kFollyMPMCQueue"
    Object:
      id: 'internal_fragments_', class name: 'Queue'
      data_type: "Fragment"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollyMPMCQueue"
    Object:
      id: 'time_sync_1', class name: 'NetworkConnection'
      data_type: "TimeSync"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      connection_type: "kPubSub"
      associated_service: "timeSyncs@Service"

module DLH-2
  Object:
    id: 'DLH-2', class name: 'FDDataLinkHandler'
    source_id: 2
    detector_id: 0
    emulation_mode: 1
    inputs: ("raw_input_2@QueueWithId", "internal_data_requests_for_2@QueueWithId")
    outputs: ("tp_input_@Queue", "internal_fragments_@Queue", "time_sync_2@NetworkConnection")
    used_resources: ()
    geo_id: "dummyGeoId-2@GeoId"
    module_configuration: "def-link-handler@ReadoutModuleConf"
    -----
    "geo_id"     Object:
      id: 'dummyGeoId-2', class name: 'GeoId'
      detector_id: 3
      crate_id: 1
      slot_id: 0
      stream_id: 1
    -----
    "module_configuration"     Object:
      id: 'def-link-handler', class name: 'ReadoutModuleConf'
      template_for: "FDDataLinkHandler"
      input_data_type: "WIBEthFrame"
      generate_timesync: 1
      post_processing_delay_ticks: 0
      request_handler: "def-data-request-handler@RequestHandler"
      latency_buffer: "def-latency-buf@LatencyBuffer"
      data_processor: "def-wib-processor@RawDataProcessor"
      -----
      "request_handler"       Object:
        id: 'def-data-request-handler', class name: 'RequestHandler'
        handler_threads: 1
        request_timeout: 10000
        pop_limit_pct: 0.5
        pop_size_pct: 0.8
        warn_on_timeout: 1
        warn_on_empty_buffer: 1
        periodic_data_transmission_ms: 0
        data_recorder: "(null)"
      -----
      "latency_buffer"       Object:
        id: 'def-latency-buf', class name: 'LatencyBuffer'
        size: 139008
        numa_aware: 1
        numa_node: 1
        intrinsic_allocator: 1
        alignment_size: 4096
        preallocation: 1
      -----
      "data_processor"       Object:
        id: 'def-wib-processor', class name: 'RawDataProcessor'
        queue_sizes: 10000
        thread_names_prefix: "postproc-"
        mask_processing: 0
        max_ticks_tot: 10000
        tpg_enabled: 1
        algorithm: "SimpleThreshold"
        threshold: 1900
        channel_mask: ()
        channel_map: "PD2HDChannelMap"
 input objects 
    Object:
      id: 'raw_input_2', class name: 'QueueWithId'
      data_type: "WIBEthFrame"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 10000
      queue_type: "kFollySPSCQueue"
      source_id: 2
    Object:
      id: 'internal_data_requests_for_2', class name: 'QueueWithId'
      data_type: "DataRequest"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollySPSCQueue"
      source_id: 2
 output objects 
    Object:
      id: 'tp_input_', class name: 'Queue'
      data_type: "TriggerPrimitive"
      send_timeout_ms: 1
      recv_timeout_ms: 1
      capacity: 10000
      queue_type: "kFollyMPMCQueue"
    Object:
      id: 'internal_fragments_', class name: 'Queue'
      data_type: "Fragment"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollyMPMCQueue"
    Object:
      id: 'time_sync_2', class name: 'NetworkConnection'
      data_type: "TimeSync"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      connection_type: "kPubSub"
      associated_service: "timeSyncs@Service"

module datareader-ru-01-0
  Object:
    id: 'datareader-ru-01-0', class name: 'FDFakeCardReader'
    inputs: ()
    outputs: ("raw_input_1@QueueWithId", "raw_input_2@QueueWithId")
    used_resources: ()
    configuration: "def-emu-nic-receiver-conf@NICReceiverConf"
    interfaces: ("ROInterface-1@ReadoutInterface")
    -----
    "configuration"     Object:
      id: 'def-emu-nic-receiver-conf', class name: 'NICReceiverConf'
      template_for: "FDFakeCardReader"
      emulation_mode: 1
      eal_args: ""
      emulation_conf: "stream-emu@StreamEmulationParameters"
      -----
      "emulation_conf"       Object:
        id: 'stream-emu', class name: 'StreamEmulationParameters'
        data_file_name: "/cvmfs/dunedaq.opensciencegrid.org/assets/files/d/d/1/wibeth_output_all_zeros.bin"
        tp_data_file_name: ""
        input_file_size_limit: 1000000
        set_t0: 1
        random_population_size: 100000
        frame_error_rate_hz: 0
        generate_periodic_adc_pattern: 1
        TP_rate_per_channel: 1
    -----
    "interfaces[0]"     Object:
      id: 'ROInterface-1', class name: 'ReadoutInterface'
      contains: ("dummyStream-1@DROStreamConf", "dummyStream-2@DROStreamConf")
      -----
      "contains[0]"       Object:
        id: 'dummyStream-1', class name: 'DROStreamConf'
        source_id: 1
        geo_id: "dummyGeoId-1@GeoId"
        stream_params: "dummyStream-1@StreamParameters"
        -----
        "geo_id"         Object:
          id: 'dummyGeoId-1', class name: 'GeoId'
          detector_id: 3
          crate_id: 1
          slot_id: 0
          stream_id: 0
        -----
        "stream_params"         Object:
          id: 'dummyStream-1', class name: 'StreamParameters'
          mode: "fix_rate"
      -----
      "contains[1]"       Object:
        id: 'dummyStream-2', class name: 'DROStreamConf'
        source_id: 2
        geo_id: "dummyGeoId-2@GeoId"
        stream_params: "dummyStream-1@StreamParameters"
        -----
        "geo_id"         Object:
          id: 'dummyGeoId-2', class name: 'GeoId'
          detector_id: 3
          crate_id: 1
          slot_id: 0
          stream_id: 1
        -----
        "stream_params"         Object:
          id: 'dummyStream-1', class name: 'StreamParameters'
          mode: "fix_rate"
 input objects 
 output objects 
    Object:
      id: 'raw_input_1', class name: 'QueueWithId'
      data_type: "WIBEthFrame"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 10000
      queue_type: "kFollySPSCQueue"
      source_id: 1
    Object:
      id: 'raw_input_2', class name: 'QueueWithId'
      data_type: "WIBEthFrame"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 10000
      queue_type: "kFollySPSCQueue"
      source_id: 2

module fragmentaggregator-ru-01
  Object:
    id: 'fragmentaggregator-ru-01', class name: 'FragmentAggregator'
    inputs: ("data_requests_for_ru-01@NetworkConnection", "internal_fragments_@Queue")
    outputs: ("internal_data_requests_for_100@QueueWithId", "internal_data_requests_for_1@QueueWithId", "internal_data_requests_for_2@QueueWithId")
    used_resources: ()
 input objects 
    Object:
      id: 'data_requests_for_ru-01', class name: 'NetworkConnection'
      data_type: "DataRequest"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      connection_type: "kSendRecv"
      associated_service: "dataRequests@Service"
    Object:
      id: 'internal_fragments_', class name: 'Queue'
      data_type: "Fragment"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollyMPMCQueue"
 output objects 
    Object:
      id: 'internal_data_requests_for_100', class name: 'QueueWithId'
      data_type: "DataRequest"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollySPSCQueue"
      source_id: 100
    Object:
      id: 'internal_data_requests_for_1', class name: 'QueueWithId'
      data_type: "DataRequest"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollySPSCQueue"
      source_id: 1
    Object:
      id: 'internal_data_requests_for_2', class name: 'QueueWithId'
      data_type: "DataRequest"
      send_timeout_ms: 10
      recv_timeout_ms: 10
      capacity: 1000
      queue_type: "kFollySPSCQueue"
      source_id: 2

@eflumerf
Copy link
Member

One comment, when I was looking at this last week, I thought about improving the options parsing in generate_modules_test and making this kind of thing a mode controlled by command-line flags (with the current behavior and command-line options being the default).

@bieryAtFnal bieryAtFnal merged commit a95de85 into develop May 30, 2024
1 check passed
@bieryAtFnal bieryAtFnal deleted the kbiery/draft_printout_app branch May 30, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants