casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
VLAEnum.h
Go to the documentation of this file.
00001 //# VLAEnum.h: Enumerators common to the VLA Module
00002 //# Copyright (C) 1999,2003
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 NRAO_VLAENUM_H
00030 #define NRAO_VLAENUM_H
00031 
00032 #include <casa/aips.h>
00033 #include <casa/namespace.h>
00034 namespace casa { //# NAMESPACE CASA - BEGIN
00035 class String;
00036 } //# NAMESPACE CASA - END
00037 
00038 
00039 // <summary>Enumerators common to the VLA module</summary>
00040 
00041 // <use visibility=export>
00042 
00043 // <reviewed reviewer="" date="yyyy/mm/dd" tests="tComponentEnum" demos="">
00044 // </reviewed>
00045 
00046 // <etymology>
00047 // This class contains the enumerator definitions used in the VLA  module 
00048 // </etymology>
00049 
00050 // <synopsis> 
00051 // This class does nothing.  It is merely a container for the enumerations used
00052 // by the VLA module.  These enumerations define the standard values that
00053 // enforce, at compile time, a stricter type checking than would be achieved by
00054 // using integers.
00055 // </synopsis>
00056 
00057 // <example>
00058 // </example>
00059 
00060 // <todo asof="1999/08/18">
00061 // <li> Nothing I can think of.
00062 // </todo>
00063 //
00064 
00065 class VLAEnum {
00066 public:
00067   // Names for all the IF's
00068   enum IF {
00069     // IF A is at freq 1 and normally is right-hand polarised
00070     IFA = 0,
00071     // IF B is at freq 2 and normally is right-hand polarised
00072     IFB,
00073     // IF C is at freq 1 and normally is left-hand polarised 
00074     IFC,
00075     // IF D is at freq 2 and normally is left-hand polarised 
00076     IFD
00077   };
00078 
00079   // Names for the different correlator data areas's
00080   enum CDA {
00081     // IF A is at freq 1 and normally is right-hand polarised
00082     CDA0 = 0,
00083     // IF B is at freq 2 and normally is right-hand polarised
00084     CDA1,
00085     // IF C is at freq 1 and normally is left-hand polarised 
00086     CDA2,
00087     // IF D is at freq 2 and normally is left-hand polarised 
00088     CDA3
00089   };
00090 
00091   // A list of the different correlator Modes. 
00092   // <note role=warning> 
00093   // Because enumerators cannot start with a numerical value the string
00094   // representation of the enumerator is different from the enumerator token.
00095   // </note>
00096   enum CorrMode {
00097     // Continuum mode. Four correlation products, at two spectral id's, using
00098     // IF's A,B,C and D. All other modes are spectral line.
00099     CONTINUUM = 0,
00100     // Spectral line mode with one correlation product, at one spectral id,
00101     // using IF A
00102     A,
00103     // Spectral line mode with one correlation product, at one spectral id,
00104     // using IF B
00105     B,
00106     // Spectral line mode with one correlation product, at one spectral id,
00107     // using IF C
00108     C,
00109     // Spectral line mode with one correlation product, at one spectral id,
00110     // using IF D
00111     D,
00112     // Spectral line mode with two correlation products, at two spectral id's,
00113     // using IF's A and B
00114     AB,
00115     // Spectral line mode with two correlation products, at one spectral id,
00116     // using IF's A and C
00117     AC,
00118     // Spectral line mode with two correlation products, at two spectral id's,
00119     // using IF's A and D
00120     AD,
00121     // Spectral line mode with two correlation products, at two spectral id's,
00122     // using IF's B and C
00123     BC,
00124     // Spectral line mode with two correlation products, at one spectral id,
00125     // using IF's B and D
00126     BD,
00127     // Spectral line mode with two correlation products, at two spectral id's,
00128     // using IF's C and D
00129     CD,
00130     // Spectral line mode with four correlation products, at two spectral id's,
00131     // using IF's A,B,C and D
00132     ABCD,
00133     // Spectral line mode with four correlation products, at one spectral id,
00134     // using IF's A and C
00135     PA,
00136     // Spectral line mode with four correlation products, at one spectral id,
00137     // using IF's B and D
00138     PB,
00139     OLDA,
00140     OLDB,
00141     OLDC,
00142     OLDD,
00143     // The number of valid modes in this enumerator
00144     NUMBER_MODES,
00145     // An unknown correlator mode
00146     UNKNOWN_MODE
00147   };
00148 
00149   // Convert the CorrMode enumerator to a string
00150   static String name(VLAEnum::CorrMode modeEnum);
00151 
00152   // Convert a given String to a CorrMode enumerator
00153   static VLAEnum::CorrMode corrMode(const String& modeString);
00154 };
00155 #endif