CalAtmosphereTable.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 CalAtmosphereTable.h
00032  */
00033  
00034 #ifndef CalAtmosphereTable_CLASS
00035 #define CalAtmosphereTable_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 <Humidity.h>
00054 using  asdm::Humidity;
00055 
00056 #include <Tag.h>
00057 using  asdm::Tag;
00058 
00059 #include <Length.h>
00060 using  asdm::Length;
00061 
00062 #include <Frequency.h>
00063 using  asdm::Frequency;
00064 
00065 #include <Pressure.h>
00066 using  asdm::Pressure;
00067 
00068 
00069 
00070 
00071         
00072 #include "CReceiverBand.h"
00073 using namespace ReceiverBandMod;
00074         
00075 
00076         
00077 
00078         
00079 
00080         
00081 
00082         
00083 
00084         
00085 
00086         
00087 
00088         
00089 
00090         
00091 
00092         
00093 
00094         
00095 
00096         
00097 
00098         
00099 
00100         
00101 #include "CPolarizationType.h"
00102 using namespace PolarizationTypeMod;
00103         
00104 
00105         
00106 
00107         
00108 
00109         
00110 #include "CSyscalMethod.h"
00111 using namespace SyscalMethodMod;
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 
00148 #include <ConversionException.h>
00149 #include <DuplicateKey.h>
00150 #include <UniquenessViolationException.h>
00151 #include <NoSuchRow.h>
00152 #include <DuplicateKey.h>
00153 using asdm::DuplicateKey;
00154 using asdm::ConversionException;
00155 using asdm::NoSuchRow;
00156 using asdm::DuplicateKey;
00157 
00158 #ifndef WITHOUT_ACS
00159 #include <asdmIDLC.h>
00160 using asdmIDL::CalAtmosphereTableIDL;
00161 #endif
00162 
00163 #include <Representable.h>
00164 
00165 namespace asdm {
00166 
00167 //class asdm::ASDM;
00168 //class asdm::CalAtmosphereRow;
00169 
00170 class ASDM;
00171 class CalAtmosphereRow;
00452 class CalAtmosphereTable : public Representable {
00453         friend class ASDM;
00454 
00455 public:
00456 
00457 
00463         static vector<string> getKeyName();
00464 
00465 
00466         virtual ~CalAtmosphereTable();
00467         
00473         ASDM &getContainer() const;
00474         
00480         unsigned int size() ;
00481         
00487         string getName() const;
00488         
00494          static const vector<string>& getAttributesNames();
00495 
00499         Entity getEntity() const;
00500 
00505         void setEntity(Entity e);
00506                 
00514         string toXML()  ;
00515 
00516 #ifndef WITHOUT_ACS
00517         // Conversion Methods
00523         CalAtmosphereTableIDL *toIDL() ;
00524 #endif
00525 
00526 #ifndef WITHOUT_ACS
00527 
00533         void fromIDL(CalAtmosphereTableIDL x) ;
00534 #endif
00535         
00536         //
00537         // ====> Row creation.
00538         //
00539         
00544         CalAtmosphereRow *newRow();
00545         
00546         
00610         CalAtmosphereRow *newRow(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numFreq, int numLoad, int numReceptor, vector<vector<float > > forwardEffSpectrum, vector<Frequency > frequencyRange, Pressure groundPressure, Humidity groundRelHumidity, vector<Frequency > frequencySpectrum, Temperature groundTemperature, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<float > > powerSkySpectrum, vector<vector<vector<float > > > powerLoadSpectrum, SyscalMethodMod::SyscalMethod syscalType, vector<vector<Temperature > > tAtmSpectrum, vector<vector<Temperature > > tRecSpectrum, vector<vector<Temperature > > tSysSpectrum, vector<vector<float > > tauSpectrum, vector<Temperature > tAtm, vector<Temperature > tRec, vector<Temperature > tSys, vector<float > tau, vector<Length > water, vector<Length > waterError);
00611         
00612 
00613 
00626          CalAtmosphereRow *newRow(CalAtmosphereRow *row); 
00627 
00628         //
00629         // ====> Append a row to its table.
00630         //
00631  
00632         
00645         CalAtmosphereRow* add(CalAtmosphereRow* x) ; 
00646 
00647  
00648 
00649 
00650 
00651         //
00652         // ====> Methods returning rows.
00653         //
00654                 
00660         vector<CalAtmosphereRow *> get() ;
00661         
00662 
00663 
00664  
00665         
00681         CalAtmosphereRow* getRowByKey(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId);
00682 
00683                 
00684 
00685 
00686 
00752         CalAtmosphereRow* lookup(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numFreq, int numLoad, int numReceptor, vector<vector<float > > forwardEffSpectrum, vector<Frequency > frequencyRange, Pressure groundPressure, Humidity groundRelHumidity, vector<Frequency > frequencySpectrum, Temperature groundTemperature, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<float > > powerSkySpectrum, vector<vector<vector<float > > > powerLoadSpectrum, SyscalMethodMod::SyscalMethod syscalType, vector<vector<Temperature > > tAtmSpectrum, vector<vector<Temperature > > tRecSpectrum, vector<vector<Temperature > > tSysSpectrum, vector<vector<float > > tauSpectrum, vector<Temperature > tAtm, vector<Temperature > tRec, vector<Temperature > tSys, vector<float > tau, vector<Length > water, vector<Length > waterError); 
00753 
00754 
00755 private:
00756 
00765         CalAtmosphereTable (ASDM & container);
00766 
00767         ASDM & container;
00768         
00769         bool archiveAsBin; // If true archive binary else archive XML
00770         bool fileAsBin ; // If true file binary else file XML   
00771         
00772         Entity entity;
00773         
00774 
00775 
00779         static string tableName;
00780         
00784         static const vector<string> attributesNames;
00785         
00789         static vector<string> initAttributesNames();
00790 
00791 
00795         static vector<string> key;
00796 
00797 
00805         CalAtmosphereRow* checkAndAdd(CalAtmosphereRow* x) ;
00806 
00807 
00808 
00809 // A data structure to store the pointers on the table's rows.
00810 
00811 // In all cases we maintain a private vector of CalAtmosphereRow s.
00812    vector<CalAtmosphereRow * > privateRows;
00813    
00814 
00815                         
00816         vector<CalAtmosphereRow *> row;
00817 
00818         
00819         void error() ; //throw(ConversionException);
00820 
00821         
00828         void fromXML(string xmlDoc) ;
00829                 
00834         void setFromMIMEFile(const string& directory);
00835         void setFromXMLFile(const string& directory);
00836         
00844         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00845   
00846         
00853          void setFromMIME(const string & mimeMsg);
00854         
00858         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00859         
00869           void toFile(string directory);
00870           
00879          void setFromFile(const string& directory);     
00880  
00881 };
00882 
00883 } // End namespace asdm
00884 
00885 #endif /* CalAtmosphereTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines