diff --git a/base/SolutionInterval.cc b/base/SolutionInterval.cc index e16940dd5103172f9a1000d183dd35c468b2714b..91e3aa7181f097d5f336d5aeee03be8f42ff102e 100644 --- a/base/SolutionInterval.cc +++ b/base/SolutionInterval.cc @@ -10,14 +10,12 @@ using dp3::steps::InputStep; namespace dp3 { namespace base { -SolutionInterval::SolutionInterval(InputStep& input, - const std::size_t n_solution, +SolutionInterval::SolutionInterval(const std::size_t n_solution, const std::size_t buffer_size, common::NSTimer timer) : buffer_size_(buffer_size), n_solution_(n_solution), timer_(timer), - input_(input), buffer_index_(0), buffers_(buffer_size), original_flags_(buffer_size), @@ -32,10 +30,6 @@ void SolutionInterval::PushBack(const DPBuffer& buffer) { buffers_[buffer_index_].copy(buffer); - input_.fetchUVW(buffer, buffers_[buffer_index_], timer_); - input_.fetchWeights(buffer, buffers_[buffer_index_], timer_); - input_.fetchFullResFlags(buffer, buffers_[buffer_index_], timer_); - original_flags_[buffer_index_].assign(buffer.getFlags()); original_weights_[buffer_index_].assign(buffer.getWeights()); // Ensure that the copies are independent of the data in 'buffer'.. diff --git a/base/SolutionInterval.h b/base/SolutionInterval.h index 815395c9c58342e5ec9354c805fd46c6b48ef01c..046570106075e67936e14091dd5da4d7f357dc58 100644 --- a/base/SolutionInterval.h +++ b/base/SolutionInterval.h @@ -23,8 +23,8 @@ class DPBuffer; class SolutionInterval { public: - SolutionInterval(steps::InputStep& input, std::size_t n_solution, - std::size_t buffer_size, common::NSTimer timer); + SolutionInterval(std::size_t n_solution, std::size_t buffer_size, + common::NSTimer timer); ~SolutionInterval(); // Copy a buffer and append it to the Solution Interval. @@ -57,7 +57,6 @@ class SolutionInterval { const std::size_t n_solution_; common::NSTimer timer_; ///< Timer from the step that is using it for metrics - steps::InputStep& input_; ///< Input of DP3 std::size_t buffer_index_; ///< Current index where to insert the next buffer std::vector<DPBuffer> buffers_; ///< Vector of DPBuffer copies diff --git a/base/test/unit/tSolutionInterval.cc b/base/test/unit/tSolutionInterval.cc index 4f7e4f75fb51775ab9f4a6633abb5a4539bbda38..0b986a4e468f98e97d65d6d89e1765b3ac28e1fd 100644 --- a/base/test/unit/tSolutionInterval.cc +++ b/base/test/unit/tSolutionInterval.cc @@ -61,13 +61,12 @@ BOOST_AUTO_TEST_SUITE(solutioninterval) /// Test if buffer inserted is the same BOOST_AUTO_TEST_CASE(insertion) { - MockInput input; NSTimer timer; size_t n_solution = 0; size_t buffer_size = 1; DPBuffer buffer = InitBuffer(); - SolutionInterval solInt(input, n_solution, buffer_size, timer); + SolutionInterval solInt(n_solution, buffer_size, timer); BOOST_TEST(solInt.Size() == 0U); solInt.PushBack(buffer); @@ -86,13 +85,12 @@ BOOST_AUTO_TEST_CASE(insertion) { /// Test that the limit cannot be exceeded BOOST_AUTO_TEST_CASE(limit) { - MockInput input; NSTimer timer; size_t n_solution = 0; size_t buffer_size = 1; DPBuffer buffer = InitBuffer(); - SolutionInterval solInt(input, n_solution, buffer_size, timer); + SolutionInterval solInt(n_solution, buffer_size, timer); solInt.PushBack(buffer); BOOST_CHECK_THROW(solInt.PushBack(buffer), std::runtime_error); @@ -100,13 +98,12 @@ BOOST_AUTO_TEST_CASE(limit) { /// Test if buffer is a copy and can be changed BOOST_AUTO_TEST_CASE(copy) { - MockInput input; NSTimer timer; size_t n_solution = 0; size_t buffer_size = 1; DPBuffer buffer = InitBuffer(); - SolutionInterval solInt(input, n_solution, buffer_size, timer); + SolutionInterval solInt(n_solution, buffer_size, timer); solInt.PushBack(buffer); BOOST_TEST(&solInt[0] != &buffer); @@ -121,13 +118,12 @@ BOOST_AUTO_TEST_CASE(copy) { /// Copy a buffer, change a weight and test if it is restored BOOST_AUTO_TEST_CASE(restore) { - MockInput input; NSTimer timer; size_t n_solution = 0; size_t buffer_size = 1; DPBuffer buffer = InitBuffer(); - SolutionInterval solInt(input, n_solution, buffer_size, timer); + SolutionInterval solInt(n_solution, buffer_size, timer); solInt.PushBack(buffer); // Overwrite the values in the buffer diff --git a/steps/DDECal.cc b/steps/DDECal.cc index d7cbfa4e6e06dbbab7f04f077bb6276826689bbf..bf39ec6d20c2fb7be9c4ad84fe7d63120ddb23de 100644 --- a/steps/DDECal.cc +++ b/steps/DDECal.cc @@ -656,8 +656,7 @@ bool DDECal::process(const DPBuffer& bufin) { // Create a new solution interval if needed if (itsSolIntBuffers.empty() || itsSolIntBuffers.back().Size() == itsRequestedSolInt) { - itsSolIntBuffers.emplace_back(itsInput, itsNSolInts, itsRequestedSolInt, - itsTimer); + itsSolIntBuffers.emplace_back(itsNSolInts, itsRequestedSolInt, itsTimer); } const size_t currentIntervalIndex = itsSolIntBuffers.back().Size(); diff --git a/steps/DDECal.h b/steps/DDECal.h index 2cc7cfc975533719a82c224ebfa76c7f5046e9d9..a701de89b39fcd7056efb5cdd82d02cce3313385 100644 --- a/steps/DDECal.h +++ b/steps/DDECal.h @@ -41,7 +41,8 @@ class DDECal : public Step { const std::string& prefix); common::Fields getRequiredFields() const override { - return kDataField | kFlagsField | kWeightsField | kUvwField; + return kDataField | kFlagsField | kWeightsField | kUvwField | + kFullResFlagsField; } common::Fields getProvidedFields() const override {