casa
$Rev:20696$
|
00001 // -*- C++ -*- 00002 //# CTMainColInterface.h: The generic interface for tables that can be used with MSSelection 00003 //# Copyright (C) 1996,1997,1998,1999,2001 00004 //# Associated Universities, Inc. Washington DC, USA. 00005 //# 00006 //# This library is free software; you can redistribute it and/or modify it 00007 //# under the terms of the GNU Library General Public License as published by 00008 //# the Free Software Foundation; either version 2 of the License, or (at your 00009 //# option) any later version. 00010 //# 00011 //# This library is distributed in the hope that it will be useful, but WITHOUT 00012 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00014 //# License for more details. 00015 //# 00016 //# You should have received a copy of the GNU Library General Public License 00017 //# along with this library; if not, write to the Free Software Foundation, 00018 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00019 //# 00020 //# Correspondence concerning AIPS++ should be addressed as follows: 00021 //# Internet email: aips2-request@nrao.edu. 00022 //# Postal address: AIPS++ Project Office 00023 //# National Radio Astronomy Observatory 00024 //# 520 Edgemont Road 00025 //# Charlottesville, VA 22903-2475 USA 00026 //# 00027 //# 00028 //# $Id$ 00029 00030 #ifndef CT_CTMAINCOLINTERFACE_H 00031 #define CT_CTMAINCOLINTERFACE_H 00032 00033 #include <casa/aips.h> 00034 #include <casa/BasicSL/String.h> 00035 #include <casa/Arrays/Vector.h> 00036 #include <casa/Arrays/Matrix.h> 00037 #include <casa/Arrays/Cube.h> 00038 #include <casa/Containers/OrderedMap.h> 00039 #include <casa/Containers/MapIO.h> 00040 #include <tables/Tables/ExprNode.h> 00041 #include <ms/MeasurementSets/MeasurementSet.h> 00042 #include <ms/MeasurementSets/MSMainEnums.h> 00043 #include <ms/MeasurementSets/MSSelectionError.h> 00044 #include <ms/MeasurementSets/MSSelectableTable.h> 00045 #include <synthesis/CalTables/CTMainColumns.h> 00046 namespace casa { //# NAMESPACE CASA - BEGIN 00047 00048 00049 class CTMainColInterface: public MSSelectableMainColumn 00050 { 00051 public: 00052 CTMainColInterface():MSSelectableMainColumn(), ctCols_p(NULL) {}; 00053 CTMainColInterface(const Table& ctAsTable): MSSelectableMainColumn(ctAsTable) 00054 {init(ctAsTable);} 00055 00056 virtual ~CTMainColInterface() {if (ctCols_p) delete ctCols_p;}; 00057 00058 virtual void init(const Table& ctAsTable) 00059 {MSSelectableMainColumn::init(ctAsTable);ct_p = NewCalTable(ctAsTable); ctCols_p=new ROCTMainColumns(ct_p);} 00060 00061 virtual const ROArrayColumn<Bool>& flag() {return ctCols_p->flag();} 00062 00063 virtual const Bool flagRow(const Int& i) {return allTrue(ctCols_p->flag()(i));} 00064 00065 // For now, return timeEPQuant() even for exposureQuant. 00066 virtual const ROScalarQuantColumn<Double>& exposureQuant() {return ctCols_p->timeEPQuant();}; 00067 virtual const ROScalarQuantColumn<Double>& timeQuant() {return ctCols_p->timeQuant();} 00068 00069 // This is not an MS 00070 virtual const MeasurementSet *asMS(){return NULL;}; 00071 private: 00072 NewCalTable ct_p; 00073 ROCTMainColumns *ctCols_p; 00074 00075 }; 00076 00077 } //# NAMESPACE CASA - END 00078 00079 #endif