Skip to content

Commit

Permalink
Take values from configuration if not in message metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dsarmany committed Nov 26, 2024
1 parent 904b1b8 commit 9bf71f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/multio/action/statistics/TemporalStatistics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ void TemporalStatistics::updateData(message::Message& msg, const StatisticsConfi
}

void TemporalStatistics::updateWindow(const message::Message& msg, const StatisticsConfiguration& cfg) {
LOG_DEBUG_LIB(::multio::LibMultio) << cfg.logPrefix() << " *** Update Window " << std::endl;
LOG_DEBUG_LIB(multio::LibMultio) << cfg.logPrefix() << " *** Update Window " << std::endl;
window_.updateWindow(window_.endPoint(), periodUpdater_->updateWinEndTime(window_.endPoint()));
for (auto& stat : statistics_) {
stat->updateWindow(msg.payload().data(), msg.size(), msg, cfg);
}

return;
}

Expand Down
8 changes: 4 additions & 4 deletions src/multio/action/statistics/cfg/StatisticsConfiguration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ namespace multio::action {

using message::glossary;

StatisticsConfiguration::StatisticsConfiguration( const message::Message& msg, const StatisticsOptions& opt ):
StatisticsConfiguration::StatisticsConfiguration(const message::Message& msg, const StatisticsOptions& opt) :
opt_{opt},
date_{0},
time_{0},
level_{0},
timeStep_{0},
stepFreq_{0},
timeStep_{opt.timeStep()},
stepFreq_{opt.stepFreq()},
step_{0},
param_{"none"},
levType_{"none"},
Expand All @@ -31,7 +31,7 @@ StatisticsConfiguration::StatisticsConfiguration( const message::Message& msg, c
bitmapPresent_{false},
missingValue_{std::numeric_limits<double>::quiet_NaN()},
key_{"unknown"},
logPrefix_{opt_.logPrefix()}{
logPrefix_{opt_.logPrefix()} {

// Associate local procedure pointers
computeEpoch_ = std::bind(&StatisticsConfiguration::computeEpoch, this);
Expand Down

0 comments on commit 9bf71f6

Please sign in to comment.