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

DPL: Remove use of obsolete reconfiguration mechanism in ECS #13539

Merged
merged 1 commit into from
Oct 1, 2024
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
4 changes: 0 additions & 4 deletions Framework/Core/include/Framework/O2ControlLabels.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const extern DataProcessorLabel uniqueProxyLabel;
// Thus, AliECS will not perform host and port allocation automatically. It takes priority over `uniqueProxyLabel`.
const extern DataProcessorLabel preserveRawChannelsLabel;

// This label makes AliECS templates add the property `qcConfiguration` to the tasks, allowing them
// to reconfigure in init with a freshly templated config.
const extern DataProcessorLabel qcReconfigurable;

} // namespace ecs
} // namespace o2::framework

Expand Down
30 changes: 0 additions & 30 deletions Framework/Core/src/O2ControlHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@ bool shouldPreserveRawChannels(const DeviceSpec& spec)
return std::find(spec.labels.begin(), spec.labels.end(), ecs::preserveRawChannelsLabel) != spec.labels.end();
}

bool isQcReconfigurable(const DeviceSpec& spec)
{
return std::find(spec.labels.begin(), spec.labels.end(), ecs::qcReconfigurable) != spec.labels.end();
}

bool isCritical(const DeviceSpec& spec)
{
// DPL's expendable Data Processor corresponds to a non-critical task in ECS
Expand All @@ -220,27 +215,6 @@ bool isCritical(const DeviceSpec& spec)
return std::find(spec.labels.begin(), spec.labels.end(), DataProcessorLabel{"expendable"}) == spec.labels.end();
}

void dumpProperties(std::ostream& dumpOut, const DeviceExecution& execution, const DeviceSpec& spec, const std::string& indLevel)
{
// get the argument `--config`
std::string configPath;
auto it = std::find_if(execution.args.begin(), execution.args.end(), [](char* v) { return v != nullptr && strcmp(v, "--config") == 0; });

// get the next argument and find `/o2/components/` in it, then take what comes after in the string.
if (it != execution.args.end()) {
std::string configParam = *(++it);
std::string prefix = "/o2/components/"; // keep only the path to the config file, i.e. stuff after "/o2/components/"
size_t pos = configParam.find(prefix);
if (pos != std::string::npos) {
configPath = configParam.substr(pos + prefix.length());
}
}

dumpOut << indLevel << "properties:\n";
std::string qcConfigFullCommand = configPath.empty() ? "\"\"" : "\"{{ ToPtree(config.Get('" + configPath + "'), 'json') }}\"";
dumpOut << indLevel << indScheme << "qcConfiguration: " << qcConfigFullCommand << "\n";
}

void dumpCommand(std::ostream& dumpOut, const DeviceExecution& execution, std::string indLevel)
{
dumpOut << indLevel << "shell: true\n";
Expand Down Expand Up @@ -454,10 +428,6 @@ void dumpTask(std::ostream& dumpOut, const DeviceSpec& spec, const DeviceExecuti
}
}

if (implementation::isQcReconfigurable(spec)) {
implementation::dumpProperties(dumpOut, execution, spec, indLevel);
}

dumpOut << indLevel << "command:\n";
implementation::dumpCommand(dumpOut, execution, indLevel + indScheme);
}
Expand Down
1 change: 0 additions & 1 deletion Framework/Core/src/O2ControlLabels.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ namespace o2::framework::ecs

const DataProcessorLabel uniqueProxyLabel = {"ecs-unique-proxy"};
const DataProcessorLabel preserveRawChannelsLabel = {"ecs-preserve-raw-channels"};
const DataProcessorLabel qcReconfigurable = {"qc-reconfigurable"};
}
Loading