From b926def924fc120ce17a0b7c788dbb1120e3438a Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Tue, 1 Jun 2021 14:04:37 +0200
Subject: [PATCH] TMSS-821: Move last_block to processingFeedback as it is only
 needed there

---
 RTCP/Cobalt/CoInterface/src/LTAFeedback.cc | 7 +++----
 RTCP/Cobalt/CoInterface/src/LTAFeedback.h  | 7 ++++---
 RTCP/Cobalt/GPUProc/src/rtcp.cc            | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/RTCP/Cobalt/CoInterface/src/LTAFeedback.cc b/RTCP/Cobalt/CoInterface/src/LTAFeedback.cc
index d4d28ed3fe5..9ae322b05d5 100644
--- a/RTCP/Cobalt/CoInterface/src/LTAFeedback.cc
+++ b/RTCP/Cobalt/CoInterface/src/LTAFeedback.cc
@@ -44,9 +44,8 @@ namespace LOFAR
     std::string LTAFeedback::feedback_version(boost::str(boost::format("%02d.%02d.%02d") %
                                         major_version % minor_version % patch_number));
       
-    LTAFeedback::LTAFeedback(const ObservationSettings &settings, ssize_t last_block):
-      settings(settings),
-      last_block(last_block)
+    LTAFeedback::LTAFeedback(const ObservationSettings &settings):
+      settings(settings)
     {
     }
 
@@ -235,7 +234,7 @@ namespace LOFAR
     }
 
 
-    ParameterSet LTAFeedback::processingFeedback() const
+    ParameterSet LTAFeedback::processingFeedback(ssize_t last_block) const
     {
       ParameterSet ps;
 
diff --git a/RTCP/Cobalt/CoInterface/src/LTAFeedback.h b/RTCP/Cobalt/CoInterface/src/LTAFeedback.h
index 0d68f085c4e..2c21183ef48 100644
--- a/RTCP/Cobalt/CoInterface/src/LTAFeedback.h
+++ b/RTCP/Cobalt/CoInterface/src/LTAFeedback.h
@@ -33,8 +33,7 @@ namespace LOFAR
     class LTAFeedback
     {
     public:
-      // Generate feedback for these parset settings, given that "last_block" was the last block processed.
-      LTAFeedback(const ObservationSettings &settings, ssize_t last_block);
+      LTAFeedback(const ObservationSettings &settings);
 
       // Subset name of each correlated and beamFormed file, respectively.
       static std::string correlatedPrefix(size_t fileno);
@@ -51,8 +50,10 @@ namespace LOFAR
       // \note Details about the meaning of the different meta-data parameters
       // can be found in the XSD that describes the Submission Information
       // Package (sip) for the LTA.
+      //
+      // "last_block" is the last block processed.
       // \see http://proposal.astron.nl/schemas/LTA-SIP.xsd
-      ParameterSet                processingFeedback() const;
+      ParameterSet                processingFeedback(ssize_t last_block) const;
 
       // Return the LTA feedback parameters.
       // \note Details about the meaning of the different meta-data parameters
diff --git a/RTCP/Cobalt/GPUProc/src/rtcp.cc b/RTCP/Cobalt/GPUProc/src/rtcp.cc
index fa8c5ca5b74..c44e86d0a46 100644
--- a/RTCP/Cobalt/GPUProc/src/rtcp.cc
+++ b/RTCP/Cobalt/GPUProc/src/rtcp.cc
@@ -622,7 +622,7 @@ int main(int argc, char **argv)
     // send processing feedback
     ToBus bus("otdb.task.feedback.processing", broker_feedback());
 
-    LTAFeedback fb(ps.settings, last_block);
+    LTAFeedback fb(ps.settings);
 
     Protocols::TaskFeedbackProcessing msg(
       "Cobalt/GPUProc/rtcp",
@@ -630,7 +630,7 @@ int main(int argc, char **argv)
       "Processing feedback",
       str(format("%s") % ps.settings.momID),
       str(format("%s") % ps.settings.observationID),
-      fb.processingFeedback());
+      fb.processingFeedback(last_block));
 
     bus.send(msg);
 
-- 
GitLab