Skip to content

Commit

Permalink
Merge pull request #535 from DUNE-DAQ/johnfreeman/issue534_subscriber…
Browse files Browse the repository at this point in the history
…_issue

JCF: Issue #534: deal with loopbacks in application plots
  • Loading branch information
jcfreeman2 authored Nov 6, 2024
2 parents 261c31e + 83227ef commit e83e3c0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
22 changes: 19 additions & 3 deletions apps/GraphBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ namespace daqconf {

if (match) {

incoming_matched.push_back(incoming.first);
outgoing_matched.push_back(outgoing.first);
bool low_level_plot = m_root_object_kind == ObjectKind::kApplication || m_root_object_kind == ObjectKind::kModule;

for (auto& receiver : incoming.second) {
for (auto& sender : outgoing.second) {
Expand All @@ -275,7 +274,24 @@ namespace daqconf {
continue;
} else if (m_objects_for_graph.at(sender).kind != m_objects_for_graph.at(receiver).kind) {
continue;
}
} else if (low_level_plot && incoming.first.find("NetworkConnection") != std::string::npos) {

// Don't want to directly link modules in an
// application if the data is transferred over network
continue;
}

if (!low_level_plot || incoming.first.find(".*") == std::string::npos) {
if (std::ranges::find(incoming_matched, incoming.first) == incoming_matched.end()) {
incoming_matched.push_back(incoming.first);
}
}

if (!low_level_plot || outgoing.first.find(".*") == std::string::npos) {
if (std::ranges::find(outgoing_matched, outgoing.first) == outgoing_matched.end()) {
outgoing_matched.push_back(outgoing.first);
}
}

const EnhancedObject::ReceivingInfo receiving_info {incoming.first, receiver};

Expand Down
11 changes: 11 additions & 0 deletions docs/ConfigPlotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,15 @@ Note that while `dot` is available on the np04 cluster's system, it's not necess

## Examples

### A Module Level Trigger application

This MLT application plot is taken from the `local-1x1-config` in the daqsystemtest repo (as of Nov-6-2024). Notice that the `DataSubscriberModule` instance would receive, among other `tcs_.*` messages received over the network, `tcs_random-tc-generator` messages sent by the `RandomTCMakerModule` instance in the same application:

![image](create_config_plot/mlt_plot.png)

### A full Session

This is the full session associated with the `local-1x1-config` in the daqsystemtest repo. Notice here you can see the loopback effect for the MLT application described above:

![image](create_config_plot/session_plot.png)

Binary file modified docs/create_config_plot/mlt_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/create_config_plot/session_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e83e3c0

Please sign in to comment.