Skip to content

Commit

Permalink
Add further cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dsarmany committed Nov 21, 2024
1 parent 03cda38 commit e33bd0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/multio/action/scale/Scale.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ Scale::Scale(const ComponentConfiguration& compConf) :
const auto mappings = compConf.parsedConfig().has("mapping-definition")
? compConf.parsedConfig().getSubConfigurations("mapping-definition")
: throw eckit::SeriousBug{"Scaling information not specified in plan", Here()};
;

if (!mappings.empty()) {
for (const auto& mapping : mappings) {
auto matcher = mapping.getSubConfiguration("case");
paramsToScale_.insert(matcher.getString("param-is"));
}
}
std::cout << paramsToScale_ << std::endl;
eckit::Log::info() << paramsToScale_ << std::endl;
}

void Scale::executeImpl(message::Message msg) {
Expand Down Expand Up @@ -102,4 +101,4 @@ template message::Message Scale::ScaleMessage<float>(message::Message&&) const;
template message::Message Scale::ScaleMessage<double>(message::Message&&) const;


} // namespace multio::action
} // namespace multio::action
3 changes: 2 additions & 1 deletion src/multio/action/scale/Scale.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace multio::action {
class Scale final : public ChainedAction {
public:
explicit Scale(const ComponentConfiguration& compConf); // Constructor declaration
void executeImpl(message::Message) override;

void executeImpl(message::Message msg) override;

private:
ScaleScaling scaling_;
Expand Down
3 changes: 2 additions & 1 deletion src/multio/action/scale/Scaling.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ScaleScaling {
public:
explicit ScaleScaling(const config::ComponentConfiguration& compConf);
double getScalingFactor(const std::string paramID) const;

template <typename Precision>
void applyScaling(message::Message& msg) const {
if (hasScaling_) {
Expand Down Expand Up @@ -66,4 +67,4 @@ class ScaleScaling {
}
};

} // namespace multio::action
} // namespace multio::action

0 comments on commit e33bd0d

Please sign in to comment.