casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
GBTSPFiller.h
Go to the documentation of this file.
00001 //# GBTSPFiller: A GBTBackendFiller for Spectral Processor data
00002 //# Copyright (C) 2000,2001,2002
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_GBTSPFILLER_H
00030 #define NRAO_GBTSPFILLER_H
00031 
00032 //#! Includes go here
00033 #include <casa/aips.h>
00034 #include <nrao/FITS/GBTAntennaFile.h>
00035 #include <nrao/FITS/GBTScanLogReader.h>
00036 #include <nrao/GBTFillers/GBTBackendFiller.h>
00037 
00038 #include <casa/Utilities/Regex.h>
00039 #include <casa/BasicSL/String.h>
00040 #include <tables/Tables/ScalarColumn.h>
00041 
00042 //# Forward Declarations
00043 namespace casa { //# NAMESPACE CASA - BEGIN
00044 template <class T> class Block;
00045 template <class T> class RORecordFieldPtr;
00046 } //# NAMESPACE CASA - END
00047 
00048 #include <casa/namespace.h>
00049 
00050 class GBTBackendTable;
00051 class GBTMSTypeFiller;
00052 class GBTMSTypeDataFiller;
00053 class GBTMSTypeSampFiller;
00054 class GBTMSTypeStateFiller;
00055 class GBTIFFiller;
00056 class GBTGOFiller;
00057 class GBTRcvrCalFiller;
00058 class GBTStateTable;
00059 
00060 // <summary>
00061 // A GBTBackendFiller for Spectral Processor data
00062 // </summary>
00063 
00064 // <use visibility=local>
00065 
00066 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
00067 // </reviewed>
00068 
00069 // <prerequisite>
00070 //   <li> <linkto class=GBTBackendFiller>GBTBackendFIller</linkto>
00071 //   <li> The GBT Spectral Processor FITS file format.
00072 // </prerequisite>
00073 //
00074 // <etymology>
00075 // This fills GBT Spectral Processor data to a MS, hence GBTSPFiller.
00076 // </etymology>
00077 //
00078 // <synopsis>
00079 // </synopsis>
00080 //
00081 // <example>
00082 // </example>
00083 //
00084 // <motivation>
00085 // There exist Spectral Processor data at the GBT which needs to be filled.
00086 // </motivation>
00087 //
00088 // <todo asof="yyyy/mm/dd">
00089 //   <li> Probably many things.
00090 // </todo>
00091 
00092 class GBTSPFiller : public GBTBackendFiller
00093 {
00094 public:
00095     // construct one
00096     GBTSPFiller(const String &msName, const Regex &object);
00097     
00098     ~GBTSPFiller();
00099 
00100     virtual GBTScanLogReader::BACKENDS type() {return GBTScanLogReader::SP;}
00101 
00102     // fill a given backend file and DAP files
00103     virtual Bool fill(const String &backendFile,
00104                       const Block<String> &dapFiles,
00105                       const String &ifManagerFile,
00106                       const Block<String> &rxCalInfoFiles,
00107                       const GBTGOFile &goFile,
00108                       const String &antennaFile,
00109                       const GBTStateTable &masterState,
00110                       const GBTLO1File &LO1A,
00111                       const GBTLO1File &LO1B,
00112                       const GBTMSFillOptions &fillOptions);
00113 
00114 private:
00115     GBTBackendTable *spTab_p;
00116     String msName_p;
00117     Regex object_p;
00118 
00119     ScalarColumn<Int> ifId_p, gbtStateId_p, samplerId_p;
00120 
00121     // the associated tables
00122     GBTMSTypeDataFiller *typeDataTab_p;
00123     GBTMSTypeFiller *typeTab_p;
00124     GBTMSTypeStateFiller *typeStateTab_p;
00125     GBTMSTypeSampFiller *typeSampTab_p;
00126 
00127     Table *gbtPointingTab_p, *gbtFocusTab_p;
00128 
00129     // IF filler
00130     GBTIFFiller *ifFiller_p;
00131 
00132     // ANTENNA file
00133     GBTAntennaFile antennaFile_p;
00134 
00135     // RX CAL INFO files filler
00136     GBTRcvrCalFiller *rxCalFiller_p;
00137 
00138     // GO (user interface) filler
00139     GBTGOFiller *GOFiller_p;
00140 
00141     void attachColumns();
00142 
00143     void handleColumns();
00144 
00145     // extract the start time at the current row of the data table
00146     MVTime rowTime(const RORecordFieldPtr<Int> &utdateField,
00147                    const RORecordFieldPtr<Double> &utcstartField,
00148                    Double tdur);
00149 
00150     // unset and unavailable
00151     GBTSPFiller();
00152     GBTSPFiller(const GBTSPFiller &);
00153     GBTSPFiller &operator=(const GBTSPFiller &);
00154 };
00155 
00156 #endif
00157