LCOV - code coverage report
Current view: top level - synthesis/CalTables - CalDescRecord.cc (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 0 97 0.0 %
Date: 2023-11-02 14:27:30 Functions: 0 26 0.0 %

          Line data    Source code
       1             : //# CalDescRecord.cc: Implementation of CalDescRecord.h
       2             : //# Copyright (C) 1996,1997,1998,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 addressed as follows:
      20             : //#        Internet email: aips2-request@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             : 
      29             : #include <synthesis/CalTables/CalDescRecord.h>
      30             : #include <msvis/MSVis/MSCalEnums.h>
      31             : #include <casacore/casa/Arrays.h>
      32             : 
      33             : using namespace casacore;
      34             : namespace casa { //# NAMESPACE CASA - BEGIN
      35             : 
      36             : //----------------------------------------------------------------------------
      37             : 
      38           0 : CalDescRecord::CalDescRecord() : itsRecord()
      39             : {
      40             : // Null constructor
      41             : // Output to private data:
      42             : //    itsRecord        Record          Underlying record object
      43             : //
      44           0 : };
      45             : 
      46             : //----------------------------------------------------------------------------
      47             : 
      48           0 : CalDescRecord::CalDescRecord (const Record& inpRec) : itsRecord (inpRec)
      49             : {
      50             : // Construct from an input record
      51             : // Input:
      52             : //    inpRec           Record          Input record
      53             : // Output to private data:
      54             : //    itsRecord        Record          Underlying record object
      55             : //
      56           0 : };
      57             : 
      58             : //----------------------------------------------------------------------------
      59             : 
      60           0 : const Record& CalDescRecord::record()
      61             : {
      62             : // Return as record
      63             : // Output:
      64             : //    record           const Record&   Return underlying record object
      65             : // Input from private data:
      66             : //    itsRecord        Record          Underlying record object
      67             : //
      68           0 :   return itsRecord;
      69             : };
      70             : 
      71             : //----------------------------------------------------------------------------
      72             : 
      73           0 : void CalDescRecord::addRec (const Record& newRec)
      74             : {
      75             : // Add to underlying record object
      76             : // Input:
      77             : //    newRec           Record          Record to be added
      78             : // Output to private data:
      79             : //    itsRecord        Record          Underlying record object
      80             : //
      81           0 :   itsRecord.merge (newRec, RecordInterface::OverwriteDuplicates);
      82           0 : };
      83             : 
      84             : //----------------------------------------------------------------------------
      85             : 
      86           0 : void CalDescRecord::defineNumSpw (const Int& numSpw)
      87             : {
      88             : // Define the NUM_SPW field value
      89             : // Input:
      90             : //    numSpw           const Int&            NUM_SPW value
      91             : // Output to private data:
      92             : //    itsRecord        Record                Underlying record object
      93             : //
      94           0 :   Record newRec;
      95           0 :   newRec.define (MSC::fieldName (MSC::NUM_SPW), numSpw);
      96           0 :   addRec (newRec);
      97           0 : };
      98             : 
      99             : //----------------------------------------------------------------------------
     100             : 
     101           0 : void CalDescRecord::defineNumChan (const Array <Int>& numChan)
     102             : {
     103             : // Define the NUM_CHAN field value
     104             : // Input:
     105             : //    numChan          const Array <Int>&    NUM_CHAN value
     106             : // Output to private data:
     107             : //    itsRecord        Record                Underlying record object
     108             : //
     109           0 :   Record newRec;
     110           0 :   newRec.define (MSC::fieldName (MSC::NUM_CHAN), numChan);
     111           0 :   addRec (newRec);
     112           0 : };
     113             : 
     114             : //----------------------------------------------------------------------------
     115             : 
     116           0 : void CalDescRecord::defineNumReceptors (const Int& numReceptors)
     117             : {
     118             : // Define the NUM_RECEPTORS field value
     119             : // Input:
     120             : //    numReceptors     const Int&            NUM_RECEPTORS value
     121             : // Output to private data:
     122             : //    itsRecord        Record                Underlying record object
     123             : //
     124           0 :   Record newRec;
     125           0 :   newRec.define (MSC::fieldName (MSC::NUM_RECEPTORS), numReceptors);
     126           0 :   addRec (newRec);
     127           0 : };
     128             : 
     129             : //----------------------------------------------------------------------------
     130             : 
     131           0 : void CalDescRecord::defineNJones (const Int& nJones)
     132             : {
     133             : // Define the N_JONES field value
     134             : // Input:
     135             : //    nJones           const Int&            N_JONES value
     136             : // Output to private data:
     137             : //    itsRecord        Record                Underlying record object
     138             : //
     139           0 :   Record newRec;
     140           0 :   newRec.define (MSC::fieldName (MSC::N_JONES), nJones);
     141           0 :   addRec (newRec);
     142           0 : };
     143             : 
     144             : //----------------------------------------------------------------------------
     145             : 
     146           0 : void CalDescRecord::defineSpwId (const Array <Int>& spwId)
     147             : {
     148             : // Define the SPECTRAL_WINDOW_ID field value
     149             : // Input:
     150             : //    spwId            const Array <Int>&    SPECTRAL_WINDOW_ID value
     151             : // Output to private data:
     152             : //    itsRecord        Record                Underlying record object
     153             : //
     154           0 :   Record newRec;
     155           0 :   newRec.define (MSC::fieldName (MSC::SPECTRAL_WINDOW_ID), spwId);
     156           0 :   addRec (newRec);
     157           0 : };
     158             : 
     159             : //----------------------------------------------------------------------------
     160             : 
     161           0 : void CalDescRecord::defineChanFreq (const Array <Double>& chanFreq)
     162             : {
     163             : // Define the CHAN_FREQ field value
     164             : // Input:
     165             : //    chanFreq         const Array <Double>&   CHAN_FREQ value
     166             : // Output to private data:
     167             : //    itsRecord        Record                  Underlying record object
     168             : //
     169           0 :   Record newRec;
     170           0 :   newRec.define (MSC::fieldName (MSC::CHAN_FREQ), chanFreq);
     171           0 :   addRec (newRec);
     172           0 : };
     173             : 
     174             : //----------------------------------------------------------------------------
     175             : 
     176           0 : void CalDescRecord::defineChanWidth (const Array <Double>& chanWidth)
     177             : {
     178             : // Define the CHAN_WIDTH field value
     179             : // Input:
     180             : //    chanWidth        const Array <Double>&   CHAN_WIDTH value
     181             : // Output to private data:
     182             : //    itsRecord        Record                  Underlying record object
     183             : //
     184           0 :   Record newRec;
     185           0 :   newRec.define (MSC::fieldName (MSC::CHAN_WIDTH), chanWidth);
     186           0 :   addRec (newRec);
     187           0 : };
     188             : 
     189             : //----------------------------------------------------------------------------
     190             : 
     191           0 : void CalDescRecord::defineChanRange (const Array <Int>& chanRange)
     192             : {
     193             : // Define the CHAN_RANGE field value
     194             : // Input:
     195             : //    chanRange        const Array <Int>&      CHAN_RANGE value
     196             : // Output to private data:
     197             : //    itsRecord        Record                  Underlying record object
     198             : //
     199           0 :   Record newRec;
     200           0 :   newRec.define (MSC::fieldName (MSC::CHAN_RANGE), chanRange);
     201           0 :   addRec (newRec);
     202           0 : };
     203             : 
     204             : //----------------------------------------------------------------------------
     205             : 
     206           0 : void CalDescRecord::definePolznType (const Array <String>& polznType)
     207             : {
     208             : // Define the POLARIZATION_TYPE field value
     209             : // Input:
     210             : //    polznType        const Array <String>&   POLARIZATION_TYPE value
     211             : // Output to private data:
     212             : //    itsRecord        Record                  Underlying record object
     213             : //
     214           0 :   Record newRec;
     215           0 :   newRec.define (MSC::fieldName (MSC::POLARIZATION_TYPE), polznType);
     216           0 :   addRec (newRec);
     217           0 : };
     218             : 
     219             : //----------------------------------------------------------------------------
     220             : 
     221           0 : void CalDescRecord::defineJonesType (const String& jonesType)
     222             : {
     223             : // Define the JONES_TYPE field value
     224             : // Input:
     225             : //    jonesType        const String&         JONES_TYPE value
     226             : // Output to private data:
     227             : //    itsRecord        Record                Underlying record object
     228             : //
     229           0 :   Record newRec;
     230           0 :   newRec.define (MSC::fieldName (MSC::JONES_TYPE), jonesType);
     231           0 :   addRec (newRec);
     232           0 : };
     233             : 
     234             : //----------------------------------------------------------------------------
     235             : 
     236           0 : void CalDescRecord::defineMSName (const String& msName)
     237             : {
     238             : // Define the MS_NAME field value
     239             : // Input:
     240             : //    msName           const String&         MS_NAME value
     241             : // Output to private data:
     242             : //    itsRecord        Record                Underlying record object
     243             : //
     244           0 :   Record newRec;
     245           0 :   newRec.define (MSC::fieldName (MSC::MS_NAME), msName);
     246           0 :   addRec (newRec);
     247           0 : };
     248             : 
     249             : //----------------------------------------------------------------------------
     250             : 
     251           0 : void CalDescRecord::getNumSpw (Int& numSpw)
     252             : {
     253             : // Get the NUM_SPW field value
     254             : // Output:
     255             : //    numSpw           Int&                  NUM_SPW value
     256             : // Input from private data:
     257             : //    itsRecord        Record                Underlying record object
     258             : //
     259           0 :   record().get (MSC::fieldName (MSC::NUM_SPW), numSpw);
     260           0 : };
     261             : 
     262             : //----------------------------------------------------------------------------
     263             : 
     264           0 : void CalDescRecord::getNumChan (Array <Int>& numChan)
     265             : {
     266             : // Get the NUM_CHAN field value
     267             : // Output:
     268             : //    numChan          Array <Int>&          NUM_CHAN value
     269             : // Input from private data:
     270             : //    itsRecord        Record                Underlying record object
     271             : //
     272           0 :   record().get (MSC::fieldName (MSC::NUM_CHAN), numChan);
     273           0 : };
     274             : 
     275             : //----------------------------------------------------------------------------
     276             : 
     277           0 : void CalDescRecord::getNumReceptors (Int& numReceptors)
     278             : {
     279             : // Get the NUM_RECEPTORS field value
     280             : // Output:
     281             : //    numReceptors     Int&                  NUM_RECEPTORS value
     282             : // Input from private data:
     283             : //    itsRecord        Record                Underlying record object
     284             : //
     285           0 :   record().get (MSC::fieldName (MSC::NUM_RECEPTORS), numReceptors);
     286           0 : };
     287             : 
     288             : //----------------------------------------------------------------------------
     289             : 
     290           0 : void CalDescRecord::getNJones (Int& nJones)
     291             : {
     292             : // Get the N_JONES field value
     293             : // Output:
     294             : //    nJones           Int&                  N_JONES value
     295             : // Input from private data:
     296             : //    itsRecord        Record                Underlying record object
     297             : //
     298           0 :   record().get (MSC::fieldName (MSC::N_JONES), nJones);
     299           0 : };
     300             : 
     301             : //----------------------------------------------------------------------------
     302             : 
     303           0 : void CalDescRecord::getSpwId (Array <Int>& spwId)
     304             : {
     305             : // Get the SPECTRAL_WINDOW_ID field value
     306             : // Output:
     307             : //    spwId            Array <Int>&          SPECTRAL_WINDOW_ID value
     308             : // Input from private data:
     309             : //    itsRecord        Record                Underlying record object
     310             : //
     311           0 :   record().get (MSC::fieldName (MSC::SPECTRAL_WINDOW_ID), spwId);
     312           0 : };
     313             : 
     314             : //----------------------------------------------------------------------------
     315             : 
     316           0 : void CalDescRecord::getChanFreq (Array <Double>& chanFreq)
     317             : {
     318             : // Get the CHAN_FREQ field value
     319             : // Output:
     320             : //    chanFreq         Array <Double>&       CHAN_FREQ value
     321             : // Input from private data:
     322             : //    itsRecord        Record                Underlying record object
     323             : //
     324           0 :   record().get (MSC::fieldName (MSC::CHAN_FREQ), chanFreq);
     325           0 : };
     326             : 
     327             : //----------------------------------------------------------------------------
     328             : 
     329           0 : void CalDescRecord::getChanWidth (Array <Double>& chanWidth)
     330             : {
     331             : // Get the CHAN_WIDTH field value
     332             : // Output:
     333             : //    chanWidth        Array <Double>&       CHAN_WIDTH value
     334             : // Input from private data:
     335             : //    itsRecord        Record                Underlying record object
     336             : //
     337           0 :   record().get (MSC::fieldName (MSC::CHAN_WIDTH), chanWidth);
     338           0 : };
     339             : 
     340             : //----------------------------------------------------------------------------
     341             : 
     342           0 : void CalDescRecord::getChanRange (Array <Int>& chanRange)
     343             : {
     344             : // Get the CHAN_RANGE field value
     345             : // Output:
     346             : //    chanRange        Array <Int>&          CHAN_RANGE value
     347             : // Input from private data:
     348             : //    itsRecord        Record                Underlying record object
     349             : //
     350           0 :   record().get (MSC::fieldName (MSC::CHAN_RANGE), chanRange);
     351           0 : };
     352             : 
     353             : //----------------------------------------------------------------------------
     354             : 
     355           0 : void CalDescRecord::getPolznType (Array <String>& polznType)
     356             : {
     357             : // Get the POLARIZATION_TYPE field value
     358             : // Output:
     359             : //    polznType        Array <String>&       POLARIZATION_TYPE value
     360             : // Input from private data:
     361             : //    itsRecord        Record                Underlying record object
     362             : //
     363           0 :   record().get (MSC::fieldName (MSC::POLARIZATION_TYPE), polznType);
     364           0 : };
     365             : 
     366             : //----------------------------------------------------------------------------
     367             : 
     368           0 : void CalDescRecord::getJonesType (String& jonesType)
     369             : {
     370             : // Get the JONES_TYPE field value
     371             : // Output:
     372             : //    jonesType        String&               JONES_TYPE value
     373             : // Input from private data:
     374             : //    itsRecord        Record                Underlying record object
     375             : //
     376           0 :   record().get (MSC::fieldName (MSC::JONES_TYPE), jonesType);
     377           0 : };
     378             : 
     379             : //----------------------------------------------------------------------------
     380             : 
     381           0 : void CalDescRecord::getMSName (String& msName)
     382             : {
     383             : // Get the MS_NAME field value
     384             : // Output:
     385             : //    msName           String&               MS_NAME value
     386             : // Input from private data:
     387             : //    itsRecord        Record                Underlying record object
     388             : //
     389           0 :   record().get (MSC::fieldName (MSC::MS_NAME), msName);
     390           0 : };
     391             : 
     392             : //----------------------------------------------------------------------------
     393             : 
     394             : } //# NAMESPACE CASA - END
     395             : 

Generated by: LCOV version 1.16