LCOV - code coverage report
Current view: top level - synthesis/CalTables - CalSetMetaInfo.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 13 0.0 %
Date: 2024-10-28 15:53:10 Functions: 0 4 0.0 %

          Line data    Source code
       1             : //# SolvableVisCalMetaInfo.h: Definitions of interface for SolvableVisCalMetaInfo
       2             : //# Copyright (C) 1996,1997,2000,2001,2002,2003
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be adressed as follows:
      20             : //#        Internet email: casa-feedback@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //# $Id$
      27             : 
      28             : #ifndef CALTABLES_CALSETMETAINFO_H
      29             : #define CALTABLES_CALSETMETAINFO_H
      30             : 
      31             : #include <casacore/casa/aips.h>
      32             : #include <casacore/ms/MeasurementSets/MSAntennaColumns.h>
      33             : #include <casacore/ms/MeasurementSets/MSAntenna.h>
      34             : #include <casacore/ms/MeasurementSets/MSFieldColumns.h>
      35             : #include <casacore/ms/MeasurementSets/MSField.h>
      36             : #include <casacore/ms/MeasurementSets/MSSpWindowColumns.h>
      37             : #include <casacore/ms/MeasurementSets/MSSpectralWindow.h>
      38             : 
      39             : // #include <casa/Logging/LogMessage.h>
      40             : // #include <casa/Logging/LogSink.h>
      41             : // #include <casa/Logging/LogIO.h>
      42             : 
      43             : namespace casa { //# NAMESPACE CASA - BEGIN
      44             : 
      45             : // **********************************************************
      46             : //  CalSetMetaInfo
      47             : //
      48             : 
      49             : class CalSetMetaInfo {
      50             : public:
      51             : 
      52             :   CalSetMetaInfo():
      53             :     antTableName("ANTENNA"), fieldTableName("FIELD"), spwTableName("SPECTRAL_WINDOW"),
      54             :     calTableMSAC(NULL), calTableMSFC(NULL), calTableMSSpC(NULL),
      55             :     calAntTable(NULL), calFieldTable(NULL), calSpwTable(NULL)  
      56             :   {rootName="";};
      57             : 
      58             :   CalSetMetaInfo(const casacore::String& root);
      59             :   
      60             :   ~CalSetMetaInfo()   {cleanUp();};
      61             : 
      62           0 :   void setRootName(const casacore::String& root) {rootName=root;};
      63           0 :   casacore::String fullSubTableName(casacore::String& subTableName,const casacore::String& base){
      64           0 :     return casacore::Table(base).rwKeywordSet().asTable(subTableName).tableName();};
      65           0 :   casacore::String fullSubTableName(casacore::String& subTableName){
      66           0 :     return fullSubTableName(subTableName,rootName);};
      67             : 
      68             :   void reset(const casacore::String& root);
      69             :   casacore::String getAntName(casacore::Int ant);
      70             :   casacore::String getFieldName(casacore::Int field);
      71             :   casacore::String getSpwName(casacore::Int spw);
      72             :   casacore::Double  getSpwRefFreq(casacore::Int spw);
      73             :   // casacore::Vector<casacore::Double>  getSpwChanWidth(casacore::Int spw);
      74             :   casacore::Double  getSpwTotalBandwidth(casacore::Int spw);
      75             : 
      76             :   casacore::Vector<casacore::String> getFieldNames();
      77             :   casacore::Vector<casacore::String> getAntNames();
      78             :   casacore::Vector<casacore::String> getSpwNames();
      79             :   casacore::Vector<casacore::Double> getSpwRefFreqs();
      80             :   casacore::Bool verify(CalSetMetaInfo& otherCSMI);
      81             : 
      82             :   void copyMetaTables(const casacore::String& target);
      83             : 
      84             : protected:
      85             : 
      86           0 :   void cleanUp()
      87             :   {
      88           0 :     if (calTableMSAC  != NULL) {delete calTableMSAC;  calTableMSAC  = NULL;}
      89           0 :     if (calTableMSFC  != NULL) {delete calTableMSFC;  calTableMSFC  = NULL;}
      90           0 :     if (calTableMSSpC != NULL) {delete calTableMSSpC; calTableMSSpC = NULL;}
      91             : 
      92           0 :     if (calAntTable   != NULL) {delete calAntTable;   calAntTable   = NULL;}
      93           0 :     if (calFieldTable != NULL) {delete calFieldTable; calFieldTable = NULL;}
      94           0 :     if (calSpwTable   != NULL) {delete calSpwTable;   calSpwTable   = NULL;}
      95           0 :   }
      96             : private:
      97             :   casacore::String rootName, antTableName, fieldTableName, spwTableName;
      98             :   casacore::MSAntennaColumns *calTableMSAC;
      99             :   casacore::MSFieldColumns *calTableMSFC;
     100             :   casacore::MSSpWindowColumns *calTableMSSpC;
     101             :   casacore::MSAntenna *calAntTable;
     102             :   casacore::MSField *calFieldTable;
     103             :   casacore::MSSpectralWindow *calSpwTable;
     104             : };
     105             : 
     106             : 
     107             : 
     108             : 
     109             : } //# NAMESPACE CASA - END
     110             : 
     111             : #endif

Generated by: LCOV version 1.16