Index: branches/alma/external/atnf/PKSIO/PKSMS2reader.h
===================================================================
--- branches/alma/external/atnf/PKSIO/PKSMS2reader.h	(revision 1453)
+++ branches/alma/external/atnf/PKSIO/PKSMS2reader.h	(revision 1757)
@@ -2,29 +2,32 @@
 //# PKSMS2reader.h: Class to read Parkes Multibeam data from a v2 MS.
 //#---------------------------------------------------------------------------
-//# Copyright (C) 2000-2006
-//# Associated Universities, Inc. Washington DC, USA.
-//#
-//# This library is free software; you can redistribute it and/or modify it
-//# under the terms of the GNU Library General Public License as published by
-//# the Free Software Foundation; either version 2 of the License, or (at your
-//# option) any later version.
-//#
-//# This library is distributed in the hope that it will be useful, but WITHOUT
+//# livedata - processing pipeline for single-dish, multibeam spectral data.
+//# Copyright (C) 2000-2009, Australia Telescope National Facility, CSIRO
+//#
+//# This file is part of livedata.
+//#
+//# livedata is free software: you can redistribute it and/or modify it under
+//# the terms of the GNU General Public License as published by the Free
+//# Software Foundation, either version 3 of the License, or (at your option)
+//# any later version.
+//#
+//# livedata is distributed in the hope that it will be useful, but WITHOUT
 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-//# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
-//# License for more details.
-//#
-//# You should have received a copy of the GNU Library General Public License
-//# along with this library; if not, write to the Free Software Foundation,
-//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
-//#
-//# Correspondence concerning AIPS++ should be addressed as follows:
-//#        Internet email: aips2-request@nrao.edu.
-//#        Postal address: AIPS++ Project Office
-//#                        National Radio Astronomy Observatory
-//#                        520 Edgemont Road
-//#                        Charlottesville, VA 22903-2475 USA
-//#
-//# $Id$
+//# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+//# more details.
+//#
+//# You should have received a copy of the GNU General Public License along
+//# with livedata.  If not, see <http://www.gnu.org/licenses/>.
+//#
+//# Correspondence concerning livedata may be directed to:
+//#        Internet email: mcalabre@atnf.csiro.au
+//#        Postal address: Dr. Mark Calabretta
+//#                        Australia Telescope National Facility, CSIRO
+//#                        PO Box 76
+//#                        Epping NSW 1710
+//#                        AUSTRALIA
+//#
+//# http://www.atnf.csiro.au/computing/software/livedata.html
+//# $Id: PKSMS2reader.h,v 19.18 2009-09-29 07:33:38 cal103 Exp $
 //#---------------------------------------------------------------------------
 //# Original: 2000/08/03, Mark Calabretta, ATNF
@@ -35,4 +38,5 @@
 
 #include <atnf/PKSIO/PKSreader.h>
+#include <atnf/PKSIO/PKSrecord.h>
 
 #include <casa/aips.h>
@@ -46,9 +50,9 @@
 #include <tables/Tables/ScalarColumn.h>
 
+#include <casa/namespace.h>
+
 // <summary>
 // Class to read Parkes Multibeam data from a v2 MS.
 // </summary>
-
-#include <casa/namespace.h>
 
 class PKSMS2reader : public PKSreader
@@ -64,4 +68,5 @@
     virtual Int open(
         const String msName,
+        const String antenna,
         Vector<Bool> &beams,
         Vector<Bool> &IFs,
@@ -79,10 +84,11 @@
         Vector<Double> &antPosition,
         String &obsMode,
+        String &bunit,
         Float  &equinox,
-        String &freqRef,
+        //String &freqRef,
+        String &dopplerFrame,
         Double &mjd,
         Double &refFreq,
-        Double &bandwidth,
-        String &fluxunit);
+        Double &bandwidth);
 
     // Get frequency parameters for each IF.
@@ -101,5 +107,8 @@
         const Bool getSpectra = True,
         const Bool getXPol    = False,
-        const Bool getFeedPos = False);
+        const Bool getFeedPos = False,
+        const Bool getPointing = False,
+        const Int  coordSys   = 0);
+
 
     // Find the range of the data selected in time and position.
@@ -111,4 +120,5 @@
 
     // Read the next data record.
+/**
     virtual Int read(
         Int             &scanNo,
@@ -153,4 +163,7 @@
         Complex         &xCalFctr,
         Vector<Complex> &xPol);
+**/
+    virtual Int read(PKSrecord &pksrec);
+
 
     // Read the next data record, just the basics.
@@ -168,6 +181,9 @@
 
   private:
+    Vector<String> splitAntennaSelectionString( const String s );
+    void setupAntennaList( const String s ) ;
+
     Bool   cHaveBaseLin, cHaveCalFctr, cHaveSrcVel, cHaveTsys, cHaveXCalFctr,
-           cMSopen, cHaveTcal, cHaveDataCol, cATF, cHaveSysCal, cHaveCorrectedDataCol;
+           cMSopen, cHaveTcal, cHaveDataCol, cALMA, cHaveSysCal, cHaveCorrectedDataCol;
     Int    cCycleNo, cIdx, cNRow, cScanNo;
     Double cTime, lastmjd;
@@ -175,6 +191,10 @@
     Vector<Bool>   cBeams, cIFs;
     Vector<Slicer> cDataSel;
+    String         cDirRef, cTelName;
     MeasurementSet cPKSMS;
     Table          cSysCalTab, tmptab, tmptab2;
+
+    //Vector<String> cAntenna;
+    Vector<Int> cAntId;
 
     ROScalarColumn<Int>     cScanNoCol;
@@ -197,4 +217,5 @@
     ROScalarColumn<Int>     cSpWinIdCol;
     ROArrayColumn<Double>   cChanFreqCol;
+    ROScalarColumn<Double>   cTotBWCol;
     ROScalarColumn<Double>  cWeatherTimeCol;
     ROScalarColumn<Float>   cTemperatureCol;
@@ -204,4 +225,5 @@
     ROScalarColumn<Int>     cBeamNoCol;
     ROArrayColumn<Double>   cPointingCol;
+    ROScalarColumn<Double>  cPointingTimeCol;
     ROArrayColumn<Float>    cTsysCol;
     ROArrayColumn<Float>    cSigmaCol;
@@ -211,4 +233,5 @@
     ROArrayColumn<Float>    cFloatDataCol;
     ROArrayColumn<Bool>     cFlagCol;
+    ROScalarColumn<Bool>    cFlagRowCol;
     ROScalarColumn<Complex> cXCalFctrCol;
     ROArrayColumn<Complex>  cDataCol;
