00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
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
00168
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
00523 CalAtmosphereTableIDL *toIDL() ;
00524 #endif
00525
00526 #ifndef WITHOUT_ACS
00527
00533 void fromIDL(CalAtmosphereTableIDL x) ;
00534 #endif
00535
00536
00537
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
00630
00631
00632
00645 CalAtmosphereRow* add(CalAtmosphereRow* x) ;
00646
00647
00648
00649
00650
00651
00652
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;
00770 bool fileAsBin ;
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
00810
00811
00812 vector<CalAtmosphereRow * > privateRows;
00813
00814
00815
00816 vector<CalAtmosphereRow *> row;
00817
00818
00819 void error() ;
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 }
00884
00885 #endif