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 #include <Angle.h>
00046 #include <AngularRate.h>
00047 #include <ArrayTime.h>
00048 #include <ArrayTimeInterval.h>
00049 #include <Complex.h>
00050 #include <Entity.h>
00051 #include <EntityId.h>
00052 #include <EntityRef.h>
00053 #include <Flux.h>
00054 #include <Frequency.h>
00055 #include <Humidity.h>
00056 #include <Interval.h>
00057 #include <Length.h>
00058 #include <PartId.h>
00059 #include <Pressure.h>
00060 #include <Speed.h>
00061 #include <Tag.h>
00062 #include <Temperature.h>
00063 #include <ConversionException.h>
00064 #include <DuplicateKey.h>
00065 #include <UniquenessViolationException.h>
00066 #include <NoSuchRow.h>
00067 #include <DuplicateKey.h>
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 #include "CPolarizationType.h"
00089 using namespace PolarizationTypeMod;
00090
00091
00092
00093
00094
00095
00096
00097 #include "CSyscalMethod.h"
00098 using namespace SyscalMethodMod;
00099
00100
00101
00102
00103
00104
00105
00106
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 #include "CReceiverBand.h"
00137 using namespace ReceiverBandMod;
00138
00139
00140
00141 #ifndef WITHOUT_ACS
00142 #include <asdmIDLC.h>
00143 using asdmIDL::CalAtmosphereTableIDL;
00144 #endif
00145
00146 using asdm::Angle;
00147 using asdm::AngularRate;
00148 using asdm::ArrayTime;
00149 using asdm::Complex;
00150 using asdm::Entity;
00151 using asdm::EntityId;
00152 using asdm::EntityRef;
00153 using asdm::Flux;
00154 using asdm::Frequency;
00155 using asdm::Humidity;
00156 using asdm::Interval;
00157 using asdm::Length;
00158 using asdm::PartId;
00159 using asdm::Pressure;
00160 using asdm::Speed;
00161 using asdm::Tag;
00162 using asdm::Temperature;
00163
00164 using asdm::DuplicateKey;
00165 using asdm::ConversionException;
00166 using asdm::NoSuchRow;
00167 using asdm::DuplicateKey;
00168
00169 #include <Representable.h>
00170
00171 namespace asdm {
00172
00173
00174
00175
00176 class ASDM;
00177 class CalAtmosphereRow;
00380 class CalAtmosphereTable : public Representable {
00381 friend class asdm::ASDM;
00382
00383 public:
00384
00385
00391 static vector<string> getKeyName();
00392
00393
00394 virtual ~CalAtmosphereTable();
00395
00401 ASDM &getContainer() const;
00402
00408 unsigned int size() ;
00409
00415 string getName() const;
00416
00420 Entity getEntity() const;
00421
00426 void setEntity(Entity e);
00427
00428
00429
00430
00431
00436 CalAtmosphereRow *newRow();
00437
00442 CalAtmosphereRow* newRowEmpty();
00443
00444
00494 CalAtmosphereRow *newRow(Tag calDataId, Tag calReductionId, string antennaName, int numReceptor, int numFreq, ArrayTime endValidTime, ArrayTime startValidTime, vector<PolarizationType > polarizationTypes, vector<Frequency > frequencyRange, vector<Frequency > frequencySpectrum, SyscalMethod syscalType, vector<vector<Temperature > > tSysSpectrum, vector<vector<Temperature > > tRecSpectrum, vector<vector<Temperature > > tAtmSpectrum, vector<vector<float > > tauSpectrum, vector<vector<float > > sbGainSpectrum, vector<vector<float > > forwardEffSpectrum, Pressure groundPressure, Temperature groundTemperature, Humidity groundRelHumidity, string subType, ReceiverBand receiverBand);
00495
00500 CalAtmosphereRow *newRowFull(Tag calDataId, Tag calReductionId, string antennaName, int numReceptor, int numFreq, ArrayTime endValidTime, ArrayTime startValidTime, vector<PolarizationType > polarizationTypes, vector<Frequency > frequencyRange, vector<Frequency > frequencySpectrum, SyscalMethod syscalType, vector<vector<Temperature > > tSysSpectrum, vector<vector<Temperature > > tRecSpectrum, vector<vector<Temperature > > tAtmSpectrum, vector<vector<float > > tauSpectrum, vector<vector<float > > sbGainSpectrum, vector<vector<float > > forwardEffSpectrum, Pressure groundPressure, Temperature groundTemperature, Humidity groundRelHumidity, string subType, ReceiverBand receiverBand);
00501
00502
00515 CalAtmosphereRow *newRow(CalAtmosphereRow *row);
00516
00521 CalAtmosphereRow *newRowCopy(CalAtmosphereRow *row);
00522
00523
00524
00525
00526
00527
00540 CalAtmosphereRow* add(CalAtmosphereRow* x) ;
00541
00542
00543
00544
00545
00546
00547
00548
00549
00555 vector<CalAtmosphereRow *> get() ;
00556
00557
00558
00559
00560
00574 CalAtmosphereRow* CalAtmosphereTable::getRowByKey(Tag calDataId, Tag calReductionId, string antennaName);
00575
00576
00577
00578
00579
00631 CalAtmosphereRow* lookup(Tag calDataId, Tag calReductionId, string antennaName, int numReceptor, int numFreq, ArrayTime endValidTime, ArrayTime startValidTime, vector<PolarizationType > polarizationTypes, vector<Frequency > frequencyRange, vector<Frequency > frequencySpectrum, SyscalMethod syscalType, vector<vector<Temperature > > tSysSpectrum, vector<vector<Temperature > > tRecSpectrum, vector<vector<Temperature > > tAtmSpectrum, vector<vector<float > > tauSpectrum, vector<vector<float > > sbGainSpectrum, vector<vector<float > > forwardEffSpectrum, Pressure groundPressure, Temperature groundTemperature, Humidity groundRelHumidity, string subType, ReceiverBand receiverBand);
00632
00633
00634 #ifndef WITHOUT_ACS
00635
00641 CalAtmosphereTableIDL *toIDL() ;
00642 #endif
00643
00644 #ifndef WITHOUT_ACS
00645
00651 void fromIDL(CalAtmosphereTableIDL x) throw(DuplicateKey,ConversionException);
00652 #endif
00653
00657 char *toFITS() const throw(ConversionException);
00658
00662 void fromFITS(char *fits) throw(ConversionException);
00663
00667 string toVOTable() const throw(ConversionException);
00668
00672 void fromVOTable(string vo) throw(ConversionException);
00673
00680 string toXML() throw(ConversionException);
00681
00687 void fromXML(string xmlDoc) throw(ConversionException);
00688
00694 string toMIME();
00695
00702 void setFromMIME(const string & mimeMsg);
00703
00713 void toFile(string directory);
00714
00723 void setFromFile(const string& directory);
00724
00725 private:
00726
00735 CalAtmosphereTable (ASDM & container);
00736
00737 ASDM & container;
00738
00739 bool archiveAsBin;
00740 bool fileAsBin ;
00741
00742 Entity entity;
00743
00744
00745
00749 static string tableName;
00750
00751
00755 static vector<string> key;
00756
00757
00763 CalAtmosphereRow* checkAndAdd(CalAtmosphereRow* x) throw (DuplicateKey);
00764
00765
00766
00767
00768
00769
00770 vector<CalAtmosphereRow * > privateRows;
00771
00772
00773
00774 vector<CalAtmosphereRow *> row;
00775
00776
00777 void error() throw(ConversionException);
00778
00779 };
00780
00781 }
00782
00783 #endif