CalLibraryParse.h

Go to the documentation of this file.
00001 //# CalLibraryParse.h: Class to hold results from cal library parser
00002 //# Copyright (C) 1994,1995,1997,1998,1999,2000,2001,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 #ifndef CALLIB_CALLIBRARYPARSE_H
00028 #define CALLIB_CALLIBRARYPARSE_H
00029 
00030 #include <casacore/casa/aips.h>
00031 #include <casacore/casa/BasicSL/String.h>
00032 #include <casacore/casa/Containers/Record.h>
00033 
00034 namespace casa {
00035 
00036 // <motivation>
00037 // It is necessary to be able to give a cal library filename for 
00038 // instructions for on-the-fly calibration.
00039 // This can be given in a CLI or set in a GUI file browser.
00040 // </motivation>
00041 
00042 // <summary>
00043 // Class to hold values from cal library file parser
00044 // </summary>
00045 
00046 // <use visibility=local>
00047 
00048 // <etymology>
00049 // CalLibraryParse is the class used to parse a cal library.
00050 // </etymology>
00051 
00052 // <synopsis>
00053 // CalLibraryParse is used by the parser of cal library files.
00054 // The parser is written in Bison and Flex in files CalLibraryGram.yy and .ll.
00055 // The statements in there use the routines in this file to complete
00056 // a Record with default and specified calibration parameters.
00057 //
00058 // The class MSFieldParse only contains information about a table
00059 // used in the table command. Global variables (like a list and a vector)
00060 // are used in MSFieldParse.cc to hold further information.
00061 //
00062 // Global functions are used to operate on the information.
00063 // The main function is the global function callibSetParams.
00064 // It parses the given calibration library file and completes
00065 // the given Record.  This is, in fact, the only function to 
00066 // be used by a user.
00067 // </synopsis>
00068 
00069 class CalLibraryParse
00070 {
00071     public:
00072         CalLibraryParse();
00073         ~CalLibraryParse();
00074 
00075         static CalLibraryParse* thisCalLibParser;
00076         const Record* record();
00077 
00078         void reset();
00079         void addStringParam(String key, String val);
00080         void addBoolParam(String key, Bool val);
00081         void addMapParam(String mapname, Int val);
00082         void addMapParam(Int val);
00083         void addMap();
00084         void addCaltable();
00085 
00086     private:
00087         void resetCaltable();
00088         void resetParamRecord();
00089         void addDefaultMap(String key);
00090         void issueKeywordWarning(String key);
00091 
00092         Record* callibRec_;     // holds (entire) cal library parsing results
00093         Record paramRec_;
00094         String caltableName_;
00095         String mapName_;
00096         Vector<Int> mapList_;
00097         Bool calwt_;
00098 };
00099 
00100 }
00101 
00102 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1