casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VLAEnum.h
Go to the documentation of this file.
1 //# VLAEnum.h: Enumerators common to the VLA Module
2 //# Copyright (C) 1999,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 //#
27 //# $Id$
28 
29 #ifndef NRAO_VLAENUM_H
30 #define NRAO_VLAENUM_H
31 
32 #include <casa/aips.h>
33 #include <casa/namespace.h>
34 namespace casacore{
35 
36 class String;
37 }
38 
39 namespace casa { //# NAMESPACE CASA - BEGIN
40 } //# NAMESPACE CASA - END
41 
42 
43 // <summary>Enumerators common to the VLA module</summary>
44 
45 // <use visibility=export>
46 
47 // <reviewed reviewer="" date="yyyy/mm/dd" tests="tComponentEnum" demos="">
48 // </reviewed>
49 
50 // <etymology>
51 // This class contains the enumerator definitions used in the VLA module
52 // </etymology>
53 
54 // <synopsis>
55 // This class does nothing. It is merely a container for the enumerations used
56 // by the VLA module. These enumerations define the standard values that
57 // enforce, at compile time, a stricter type checking than would be achieved by
58 // using integers.
59 // </synopsis>
60 
61 // <example>
62 // </example>
63 
64 // <todo asof="1999/08/18">
65 // <li> Nothing I can think of.
66 // </todo>
67 //
68 
69 class VLAEnum {
70 public:
71  // Names for all the IF's
72  enum IF {
73  // IF A is at freq 1 and normally is right-hand polarised
74  IFA = 0,
75  // IF B is at freq 2 and normally is right-hand polarised
76  IFB,
77  // IF C is at freq 1 and normally is left-hand polarised
78  IFC,
79  // IF D is at freq 2 and normally is left-hand polarised
81  };
82 
83  // Names for the different correlator data areas's
84  enum CDA {
85  // IF A is at freq 1 and normally is right-hand polarised
86  CDA0 = 0,
87  // IF B is at freq 2 and normally is right-hand polarised
89  // IF C is at freq 1 and normally is left-hand polarised
91  // IF D is at freq 2 and normally is left-hand polarised
93  };
94 
95  // A list of the different correlator Modes.
96  // <note role=warning>
97  // Because enumerators cannot start with a numerical value the string
98  // representation of the enumerator is different from the enumerator token.
99  // </note>
100  enum CorrMode {
101  // Continuum mode. Four correlation products, at two spectral id's, using
102  // IF's A,B,C and D. All other modes are spectral line.
104  // Spectral line mode with one correlation product, at one spectral id,
105  // using IF A
106  A,
107  // Spectral line mode with one correlation product, at one spectral id,
108  // using IF B
109  B,
110  // Spectral line mode with one correlation product, at one spectral id,
111  // using IF C
112  C,
113  // Spectral line mode with one correlation product, at one spectral id,
114  // using IF D
115  D,
116  // Spectral line mode with two correlation products, at two spectral id's,
117  // using IF's A and B
118  AB,
119  // Spectral line mode with two correlation products, at one spectral id,
120  // using IF's A and C
121  AC,
122  // Spectral line mode with two correlation products, at two spectral id's,
123  // using IF's A and D
124  AD,
125  // Spectral line mode with two correlation products, at two spectral id's,
126  // using IF's B and C
127  BC,
128  // Spectral line mode with two correlation products, at one spectral id,
129  // using IF's B and D
130  BD,
131  // Spectral line mode with two correlation products, at two spectral id's,
132  // using IF's C and D
133  CD,
134  // Spectral line mode with four correlation products, at two spectral id's,
135  // using IF's A,B,C and D
137  // Spectral line mode with four correlation products, at one spectral id,
138  // using IF's A and C
139  PA,
140  // Spectral line mode with four correlation products, at one spectral id,
141  // using IF's B and D
142  PB,
147  // The number of valid modes in this enumerator
149  // An unknown correlator mode
151  };
152 
153  // Convert the CorrMode enumerator to a string
154  static casacore::String name(VLAEnum::CorrMode modeEnum);
155 
156  // Convert a given casacore::String to a CorrMode enumerator
157  static VLAEnum::CorrMode corrMode(const casacore::String& modeString);
158 };
159 #endif
Spectral line mode with two correlation products, at one spectral id, using IF&#39;s B and D...
Definition: VLAEnum.h:130
Spectral line mode with two correlation products, at two spectral id&#39;s, using IF&#39;s C and D...
Definition: VLAEnum.h:133
Spectral line mode with two correlation products, at two spectral id&#39;s, using IF&#39;s A and D...
Definition: VLAEnum.h:124
static VLAEnum::CorrMode corrMode(const casacore::String &modeString)
Convert a given casacore::String to a CorrMode enumerator.
IF D is at freq 2 and normally is left-hand polarised.
Definition: VLAEnum.h:92
Spectral line mode with two correlation products, at two spectral id&#39;s, using IF&#39;s A and B...
Definition: VLAEnum.h:118
Spectral line mode with one correlation product, at one spectral id, using IF B.
Definition: VLAEnum.h:109
Spectral line mode with one correlation product, at one spectral id, using IF A.
Definition: VLAEnum.h:106
IF A is at freq 1 and normally is right-hand polarised.
Definition: VLAEnum.h:74
Spectral line mode with four correlation products, at one spectral id, using IF&#39;s A and C...
Definition: VLAEnum.h:139
IF C is at freq 1 and normally is left-hand polarised.
Definition: VLAEnum.h:78
IF B is at freq 2 and normally is right-hand polarised.
Definition: VLAEnum.h:76
Spectral line mode with two correlation products, at one spectral id, using IF&#39;s A and C...
Definition: VLAEnum.h:121
Spectral line mode with four correlation products, at one spectral id, using IF&#39;s B and D...
Definition: VLAEnum.h:142
Spectral line mode with one correlation product, at one spectral id, using IF D.
Definition: VLAEnum.h:115
Continuum mode.
Definition: VLAEnum.h:103
Spectral line mode with four correlation products, at two spectral id&#39;s, using IF&#39;s A...
Definition: VLAEnum.h:136
An unknown correlator mode.
Definition: VLAEnum.h:150
IF
Names for all the IF&#39;s.
Definition: VLAEnum.h:72
Enumerators common to the VLA module.
Definition: VLAEnum.h:69
static casacore::String name(VLAEnum::CorrMode modeEnum)
Convert the CorrMode enumerator to a string.
The number of valid modes in this enumerator.
Definition: VLAEnum.h:148
Spectral line mode with two correlation products, at two spectral id&#39;s, using IF&#39;s B and C...
Definition: VLAEnum.h:127
IF B is at freq 2 and normally is right-hand polarised.
Definition: VLAEnum.h:88
CorrMode
A list of the different correlator Modes.
Definition: VLAEnum.h:100
IF D is at freq 2 and normally is left-hand polarised.
Definition: VLAEnum.h:80
IF C is at freq 1 and normally is left-hand polarised.
Definition: VLAEnum.h:90
CDA
Names for the different correlator data areas&#39;s.
Definition: VLAEnum.h:84
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Spectral line mode with one correlation product, at one spectral id, using IF C.
Definition: VLAEnum.h:112
IF A is at freq 1 and normally is right-hand polarised.
Definition: VLAEnum.h:86
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42