casacore
Loading...
Searching...
No Matches
MCEarthMagnetic.h
Go to the documentation of this file.
1//# MCEarthMagnetic.h: MEarthMagnetic conversion routines
2//# Copyright (C) 1998,1999,2000,2002,2004
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: 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#ifndef MEASURES_MCEARTHMAGNETIC_H
27#define MEASURES_MCEARTHMAGNETIC_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Arrays/ArrayFwd.h>
32#include <casacore/measures/Measures/MEarthMagnetic.h>
33#include <casacore/measures/Measures/MeasBase.h>
34#include <casacore/measures/Measures/MeasRef.h>
35#include <casacore/measures/Measures/MCBase.h>
36#include <casacore/measures/Measures/MConvertBase.h>
37#include <casacore/measures/Measures/MeasMath.h>
38
39#include <mutex>
40
41namespace casacore { //# NAMESPACE CASACORE - BEGIN
42
43//# Forward Declarations
44class MCEarthMagnetic;
45class MVPosition;
46class EarthField;
47class String;
48
49//# Typedefs
50
51// <summary> MEarthMagnetic conversion routines </summary>
52
53// <use visibility=local>
54
55// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMEarthMagnetic" demos="">
56// </reviewed>
57
58// <prerequisite>
59// <li> <linkto class=Measure>Measure</linkto> class
60// <li> <linkto class=MCBase>MCBase</linkto> base class
61// <li> <linkto class=MConvertBase>overall conversion</linkto> class
62// </prerequisite>
63//
64// <etymology>
65// Measure, Convert and EarthMagnetic
66// </etymology>
67//
68// <synopsis>
69// Contains state machinery and caching for actual conversions
70// </synopsis>
71//
72// <example>
73// See <linkto module=Measures>Measures</linkto> module description for
74// conversion examples.
75// </example>
76//
77// <motivation>
78// </motivation>
79//
80// <todo asof="1998/04/21">
81// <li> Use MCDirection routines directly
82// </todo>
83
84class MCEarthMagnetic : public MCBase {
85
86public:
87
88 //# Friends
89 // Conversion of data
90 friend class MeasConvert<MEarthMagnetic>;
91
92 //# Constructors
93 // Default constructor
95
96 //# Destructor
98
99 //# Member functions
100 // Show the state of the conversion engine (mainly for debugging purposes)
102
103private:
104 //# Enumerations
105 // The list of actual routines provided.
106 // <note role=warning> Each <src>AA_BB</src> in the list points to routine
107 // that can be used in the FromTo list in the getConvert routine.
108 // In addition the type to which each is converted should be in the
109 // ToRef array, again in the proper order. </note>
162
163 //# Typedefs
164
165 //# Operators
166
167 //# General Member Functions
168
169 //# Enumerations
170
171 //# Cached Data
175
176 //# State machine data
177 // Transition list
179 // Transition matrix
181 // Object to ensure safe multi-threaded lazy single initialization
182 static std::once_flag theirInitOnceFlag;
183
184 //# Constructors
185 // Copy constructor (not implemented)
187 // Assignment (not implemented)
189
190 //# Member functions
191
192 // Create conversion function pointer
193 virtual void getConvert(MConvertBase &mc,
194 const MRBase &inref,
195 const MRBase &outref);
196
197 // Create help structures for Measure conversion routines
198 virtual void initConvert(uInt which, MConvertBase &mc);
199
200 // Delete the pointers used in the MeasConvert help structure cache
201 virtual void clearConvert();
202
203 // Routines to convert EarthMagnetics from one reference frame to another
204 virtual void doConvert(MeasValue &in,
205 MRBase &inref,
206 MRBase &outref,
207 const MConvertBase &mc);
208 // Conversion routine to cater for inheritance question
210 MRBase &inref,
211 MRBase &outref,
212 const MConvertBase &mc);
213
214private:
215 // Fill the global state. Called using theirInitOnce.
216 static void doFillState();
217};
218
219
220} //# NAMESPACE CASACORE - END
221
222#endif
223
MCEarthMagnetic(const MCEarthMagnetic &other)
Copy constructor (not implemented)
virtual void doConvert(MeasValue &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Routines to convert EarthMagnetics from one reference frame to another.
Routes
The list of actual routines provided.
@ R_MODEL0
General for Models.
@ R_IGRF
Individual models.
static uInt ToRef_p[N_Routes][3]
Transition list.
MCEarthMagnetic & operator=(const MCEarthMagnetic &other)
Assignment (not implemented)
static String showState()
Show the state of the conversion engine (mainly for debugging purposes)
static void doFillState()
Fill the global state.
MCEarthMagnetic()
Default constructor.
void doConvert(MVEarthMagnetic &in, MRBase &inref, MRBase &outref, const MConvertBase &mc)
Conversion routine to cater for inheritance question.
virtual void initConvert(uInt which, MConvertBase &mc)
Create help structures for Measure conversion routines.
virtual void clearConvert()
Delete the pointers used in the MeasConvert help structure cache.
static std::once_flag theirInitOnceFlag
Object to ensure safe multi-threaded lazy single initialization.
static uInt FromTo_p[MEarthMagnetic::N_Types][MEarthMagnetic::N_Types]
Transition matrix.
virtual void getConvert(MConvertBase &mc, const MRBase &inref, const MRBase &outref)
Create conversion function pointer.
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49