casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CTInterface.h
Go to the documentation of this file.
00001 //# CTInterface.h: Class to present a CalTable with MS interface
00002 //# Copyright (C) 1996,1997,1998,1999,2001
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id$
00028 
00029 #ifndef CT_CTINTERFACE_H
00030 #define CT_CTINTERFACE_H
00031 
00032 #include <casa/aips.h>
00033 #include <casa/BasicSL/String.h>
00034 #include <ms/MeasurementSets/MSSelectableTable.h>
00035 #include <ms/MeasurementSets/MSMainEnums.h>
00036 #include <synthesis/CalTables/NewCalTable.h>
00037 #include <synthesis/CalTables/CTEnums.h>
00038 #include <synthesis/CalTables/CTMainColInterface.h>
00039 //#include <ms/MeasurementSets/MSDataDescription.h>
00040 #include <tables/Tables/SetupNewTab.h>
00041 #include <tables/Tables/TableDesc.h>
00042 namespace casa { //# NAMESPACE CASA - BEGIN
00043 
00044   class CTInterface: public MSSelectableTable
00045   {
00046   public:
00047     CTInterface():fakeDDSubTable(), ctMainCols_p(NULL) {};
00048     CTInterface(const Table& table);
00049 
00050     virtual ~CTInterface();
00051     virtual const CTObservation& observation()        {return asCT()->observation();}
00052     virtual const CTAntenna& antenna()                {return asCT()->antenna();}
00053     virtual const CTField& field()                    {return asCT()->field();}
00054     virtual const CTSpectralWindow& spectralWindow()  {return asCT()->spectralWindow();}
00055     virtual Bool isMS()                               {return False;};
00056 
00057     virtual const MSDataDescription& dataDescription();
00058     virtual String columnName(MSMainEnums::PredefinedColumns nameEnum);
00059     //    virtual const MSObservation& observation();
00060 
00061     virtual const MeasurementSet* asMS() 
00062     {
00063       //{throw(AipsError("asMS() called from CTInterface class"));}
00064       //cerr << "asMS() called from CTInterface class" << endl;
00065       //return static_cast<const MeasurementSet *>(table());
00066       return NULL;
00067     }
00068     virtual const NewCalTable* asCT();
00069     virtual MSSelectableMainColumn* mainColumns()
00070     {ctMainCols_p = new CTMainColInterface(*table_p); return ctMainCols_p;};
00071   private:
00072     MSDataDescription fakeDDSubTable;
00073     void makeDDSubTable();
00074     CTMainColInterface *ctMainCols_p;
00075   };
00076 } //# NAMESPACE CASA - END
00077 
00078 #endif