Skip to content

Commit

Permalink
DPL: Remove use of obsolete reconfiguration mechanism in ECS (#13539)
Browse files Browse the repository at this point in the history
  • Loading branch information
knopers8 authored Oct 1, 2024
1 parent d9e8f04 commit 7380cae
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
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 @@ -461,10 +435,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"};
}

0 comments on commit 7380cae

Please sign in to comment.