CalPointingTable.h

Go to the documentation of this file.
00001 
00002 /*
00003  * ALMA - Atacama Large Millimeter Array
00004  * (c) European Southern Observatory, 2002
00005  * (c) Associated Universities Inc., 2002
00006  * Copyright by ESO (in the framework of the ALMA collaboration),
00007  * Copyright by AUI (in the framework of the ALMA collaboration),
00008  * All rights reserved.
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  * 
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY, without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00023  * MA 02111-1307  USA
00024  *
00025  * Warning!
00026  *  -------------------------------------------------------------------- 
00027  * | This is generated code!  Do not modify this file.                  |
00028  * | If you do, all changes will be lost when the file is re-generated. |
00029  *  --------------------------------------------------------------------
00030  *
00031  * File CalPointingTable.h
00032  */
00033  
00034 #ifndef CalPointingTable_CLASS
00035 #define CalPointingTable_CLASS
00036 
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040 #include <set>
00041 using std::string;
00042 using std::vector;
00043 using std::map;
00044 
00045 
00046 
00047 #include <ArrayTime.h>
00048 using  asdm::ArrayTime;
00049 
00050 #include <Temperature.h>
00051 using  asdm::Temperature;
00052 
00053 #include <Angle.h>
00054 using  asdm::Angle;
00055 
00056 #include <Tag.h>
00057 using  asdm::Tag;
00058 
00059 #include <Frequency.h>
00060 using  asdm::Frequency;
00061 
00062 
00063 
00064 
00065         
00066 
00067         
00068 #include "CReceiverBand.h"
00069 using namespace ReceiverBandMod;
00070         
00071 
00072         
00073 
00074         
00075 
00076         
00077 
00078         
00079 #include "CAntennaMake.h"
00080 using namespace AntennaMakeMod;
00081         
00082 
00083         
00084 #include "CAtmPhaseCorrection.h"
00085 using namespace AtmPhaseCorrectionMod;
00086         
00087 
00088         
00089 
00090         
00091 
00092         
00093 #include "CPointingModelMode.h"
00094 using namespace PointingModelModeMod;
00095         
00096 
00097         
00098 #include "CPointingMethod.h"
00099 using namespace PointingMethodMod;
00100         
00101 
00102         
00103 
00104         
00105 #include "CPolarizationType.h"
00106 using namespace PolarizationTypeMod;
00107         
00108 
00109         
00110 
00111         
00112 
00113         
00114 
00115         
00116 
00117         
00118 
00119         
00120 
00121         
00122 
00123         
00124 
00125         
00126 
00127         
00128 
00129         
00130 
00131         
00132 
00133         
00134 
00135         
00136 
00137         
00138 
00139         
00140 
00141         
00142 
00143         
00144 
00145 
00146 
00147 #include <ConversionException.h>
00148 #include <DuplicateKey.h>
00149 #include <UniquenessViolationException.h>
00150 #include <NoSuchRow.h>
00151 #include <DuplicateKey.h>
00152 using asdm::DuplicateKey;
00153 using asdm::ConversionException;
00154 using asdm::NoSuchRow;
00155 using asdm::DuplicateKey;
00156 
00157 #ifndef WITHOUT_ACS
00158 #include <asdmIDLC.h>
00159 using asdmIDL::CalPointingTableIDL;
00160 #endif
00161 
00162 #include <Representable.h>
00163 
00164 namespace asdm {
00165 
00166 //class asdm::ASDM;
00167 //class asdm::CalPointingRow;
00168 
00169 class ASDM;
00170 class CalPointingRow;
00437 class CalPointingTable : public Representable {
00438         friend class ASDM;
00439 
00440 public:
00441 
00442 
00448         static vector<string> getKeyName();
00449 
00450 
00451         virtual ~CalPointingTable();
00452         
00458         ASDM &getContainer() const;
00459         
00465         unsigned int size() ;
00466         
00472         string getName() const;
00473         
00479          static const vector<string>& getAttributesNames();
00480 
00484         Entity getEntity() const;
00485 
00490         void setEntity(Entity e);
00491                 
00499         string toXML()  ;
00500 
00501 #ifndef WITHOUT_ACS
00502         // Conversion Methods
00508         CalPointingTableIDL *toIDL() ;
00509 #endif
00510 
00511 #ifndef WITHOUT_ACS
00512 
00518         void fromIDL(CalPointingTableIDL x) ;
00519 #endif
00520         
00521         //
00522         // ====> Row creation.
00523         //
00524         
00529         CalPointingRow *newRow();
00530         
00531         
00577         CalPointingRow *newRow(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, Temperature ambientTemperature, AntennaMakeMod::AntennaMake antennaMake, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, vector<Angle > direction, vector<Frequency > frequencyRange, PointingModelModeMod::PointingModelMode pointingModelMode, PointingMethodMod::PointingMethod pointingMethod, int numReceptor, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Angle > > collOffsetRelative, vector<vector<Angle > > collOffsetAbsolute, vector<vector<Angle > > collError, vector<vector<bool > > collOffsetTied, vector<double > reducedChiSquared);
00578         
00579 
00580 
00593          CalPointingRow *newRow(CalPointingRow *row); 
00594 
00595         //
00596         // ====> Append a row to its table.
00597         //
00598  
00599         
00612         CalPointingRow* add(CalPointingRow* x) ; 
00613 
00614  
00615 
00616 
00617 
00618         //
00619         // ====> Methods returning rows.
00620         //
00621                 
00627         vector<CalPointingRow *> get() ;
00628         
00629 
00630 
00631  
00632         
00648         CalPointingRow* getRowByKey(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId);
00649 
00650                 
00651 
00652 
00653 
00701         CalPointingRow* lookup(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, Temperature ambientTemperature, AntennaMakeMod::AntennaMake antennaMake, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, vector<Angle > direction, vector<Frequency > frequencyRange, PointingModelModeMod::PointingModelMode pointingModelMode, PointingMethodMod::PointingMethod pointingMethod, int numReceptor, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Angle > > collOffsetRelative, vector<vector<Angle > > collOffsetAbsolute, vector<vector<Angle > > collError, vector<vector<bool > > collOffsetTied, vector<double > reducedChiSquared); 
00702 
00703 
00704 private:
00705 
00714         CalPointingTable (ASDM & container);
00715 
00716         ASDM & container;
00717         
00718         bool archiveAsBin; // If true archive binary else archive XML
00719         bool fileAsBin ; // If true file binary else file XML   
00720         
00721         Entity entity;
00722         
00723 
00724 
00728         static string tableName;
00729         
00733         static const vector<string> attributesNames;
00734         
00738         static vector<string> initAttributesNames();
00739 
00740 
00744         static vector<string> key;
00745 
00746 
00754         CalPointingRow* checkAndAdd(CalPointingRow* x) ;
00755 
00756 
00757 
00758 // A data structure to store the pointers on the table's rows.
00759 
00760 // In all cases we maintain a private vector of CalPointingRow s.
00761    vector<CalPointingRow * > privateRows;
00762    
00763 
00764                         
00765         vector<CalPointingRow *> row;
00766 
00767         
00768         void error() ; //throw(ConversionException);
00769 
00770         
00777         void fromXML(string xmlDoc) ;
00778                 
00783         void setFromMIMEFile(const string& directory);
00784         void setFromXMLFile(const string& directory);
00785         
00793         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00794   
00795         
00802          void setFromMIME(const string & mimeMsg);
00803         
00807         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00808         
00818           void toFile(string directory);
00819           
00828          void setFromFile(const string& directory);     
00829  
00830 };
00831 
00832 } // End namespace asdm
00833 
00834 #endif /* CalPointingTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines