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

JCF: Issue #534: deal with loopbacks in application plots #535

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.