From 6e59fdb1a953b386a9934b2acbbd5edc631a2021 Mon Sep 17 00:00:00 2001
From: Ger van Diepen <diepen@astron.nl>
Date: Wed, 23 Mar 2011 07:19:59 +0000
Subject: [PATCH] bug 1660: Added a test program

---
 RTCP/Storage/src/MeasurementSetFormat.cc   |  8 ++++----
 RTCP/Storage/test/tMeasurementSetFormat.cc | 19 +++++++++++++++++++
 RTCP/Storage/test/tMeasurementSetFormat.sh |  2 ++
 3 files changed, 25 insertions(+), 4 deletions(-)
 create mode 100644 RTCP/Storage/test/tMeasurementSetFormat.cc
 create mode 100755 RTCP/Storage/test/tMeasurementSetFormat.sh

diff --git a/RTCP/Storage/src/MeasurementSetFormat.cc b/RTCP/Storage/src/MeasurementSetFormat.cc
index c2f856eb704..fa0de5564b7 100644
--- a/RTCP/Storage/src/MeasurementSetFormat.cc
+++ b/RTCP/Storage/src/MeasurementSetFormat.cc
@@ -169,10 +169,10 @@ void MeasurementSetFormat::createMSTables(const string &MSname, unsigned subband
 
     // Create the tables containing the beam info.
     BeamTables::create (*itsMS,
-			itsPS->getString("AntennaSetName"),
-			itsPS->getString("AntennaSetFileName"),
-			itsPS->getString("AntennaFieldDir"),
-			itsPS->getString("iHBADeltaDir"));
+                        itsPS->antennaSet(),
+                        "/home/diepen/data/AntennaSets.conf",
+                        "/home/diepen/data/AntennaFields",
+                        "/home/diepen/data/iHBADeltas");
 
   } catch (AipsError& x) {
     THROW(StorageException,"AIPS/CASA error: " << x.getMesg());
diff --git a/RTCP/Storage/test/tMeasurementSetFormat.cc b/RTCP/Storage/test/tMeasurementSetFormat.cc
new file mode 100644
index 00000000000..91533431532
--- /dev/null
+++ b/RTCP/Storage/test/tMeasurementSetFormat.cc
@@ -0,0 +1,19 @@
+//#  tMeasurementSetFormat.cc: Test program for class MeasurementSetFormat
+//#
+//#  Copyright (C) 2011
+//#  ASTRON (Netherlands Foundation for Research in Astronomy)
+//#  P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
+//#
+//#  $Id$
+
+#include <lofar_config.h>
+#include <Storage/MeasurementSetFormat.h>
+
+using namespace LOFAR;
+
+int main()
+{
+  Parset parset("tMeasurementSetFormat.parset");
+  MeasurementSetFormat msf(parset);
+  msf.addSubband ("tMeasurementSetFormat_tmp.ms", 0, false);
+}
diff --git a/RTCP/Storage/test/tMeasurementSetFormat.sh b/RTCP/Storage/test/tMeasurementSetFormat.sh
new file mode 100755
index 00000000000..c23d0e97991
--- /dev/null
+++ b/RTCP/Storage/test/tMeasurementSetFormat.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+./runctest.sh tMeasurementSetFormat 2>&1 > tMeasurementSetFormat.log
-- 
GitLab