From 3c7a8ba31172b9ebc897b1e145b6617fa5c57cc1 Mon Sep 17 00:00:00 2001
From: Ger van Diepen <diepen@astron.nl>
Date: Tue, 26 Apr 2011 09:24:15 +0000
Subject: [PATCH] bug 1656: Added synonyms msin.name and msout.name (for
 SAS/MAC)

---
 CEP/DP3/DPPP/src/DPRun.cc   | 13 +++++++++++--
 CEP/DP3/DPPP/test/tNDPPP.cc |  4 ++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/CEP/DP3/DPPP/src/DPRun.cc b/CEP/DP3/DPPP/src/DPRun.cc
index 1ef81d73bcb..7f105936f97 100644
--- a/CEP/DP3/DPPP/src/DPRun.cc
+++ b/CEP/DP3/DPPP/src/DPRun.cc
@@ -138,8 +138,17 @@ namespace LOFAR {
       DPStep::ShPtr firstStep;
       DPStep::ShPtr lastStep;
       // Get input and output MS name.
-      string inName  = parset.getString ("msin");
-      string outName = parset.getString ("msout");
+      // Those parameters were always called msin and msout.
+      // However, SAS/MAC cannot handle a parameter and a group with the same
+      // name, hence it uses msin.name and msout.name.
+      string inName = parset.getString ("msin.name", "");
+      if (inName.empty()) {
+        inName = parset.getString ("msin");
+      }
+      string outName = parset.getString ("msout.name", "");
+      if (outName.empty()) {
+        outName = parset.getString ("msout");
+      }
       // Get the steps.
       vector<string> steps = parset.getStringVector ("steps");
       // Currently the input MS must be given.
diff --git a/CEP/DP3/DPPP/test/tNDPPP.cc b/CEP/DP3/DPPP/test/tNDPPP.cc
index 2dbfb99ed5e..3791171a959 100644
--- a/CEP/DP3/DPPP/test/tNDPPP.cc
+++ b/CEP/DP3/DPPP/test/tNDPPP.cc
@@ -224,11 +224,11 @@ void testAvg1()
   {
     // Average in a single step.
     ofstream ostr("tNDPPP_tmp.parset");
-    ostr << "msin=tNDPPP_tmp.MS" << endl;
+    ostr << "msin.name=tNDPPP_tmp.MS" << endl;
     // Give start and end time as actual, hence no missing timeslots.
     ostr << "msin.starttime=03-Aug-2000/13:22:20" << endl;
     ostr << "msin.endtime=03-Aug-2000/13:31:45" << endl;
-    ostr << "msout=tNDPPP_tmp.MS2" << endl;
+    ostr << "msout.name=tNDPPP_tmp.MS2" << endl;
     ostr << "msout.overwrite=true" << endl;
     ostr << "steps=[avg,count]" << endl;
     ostr << "avg.type=average" << endl;
-- 
GitLab