Go to the documentation of this file.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 CalCurveTable_CLASS
00035 #define CalCurveTable_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 <Tag.h>
00051 using asdm::Tag;
00052
00053 #include <Frequency.h>
00054 using asdm::Frequency;
00055
00056
00057
00058
00059
00060 #include "CAtmPhaseCorrection.h"
00061 using namespace AtmPhaseCorrectionMod;
00062
00063
00064
00065 #include "CCalCurveType.h"
00066 using namespace CalCurveTypeMod;
00067
00068
00069
00070 #include "CReceiverBand.h"
00071 using namespace ReceiverBandMod;
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 #include "CPolarizationType.h"
00092 using namespace PolarizationTypeMod;
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 #include <ConversionException.h>
00106 #include <DuplicateKey.h>
00107 #include <UniquenessViolationException.h>
00108 #include <NoSuchRow.h>
00109 #include <DuplicateKey.h>
00110 using asdm::DuplicateKey;
00111 using asdm::ConversionException;
00112 using asdm::NoSuchRow;
00113 using asdm::DuplicateKey;
00114
00115 #ifndef WITHOUT_ACS
00116 #include <asdmIDLC.h>
00117 using asdmIDL::CalCurveTableIDL;
00118 #endif
00119
00120 #include <Representable.h>
00121
00122 namespace asdm {
00123
00124
00125
00126
00127 class ASDM;
00128 class CalCurveRow;
00292 class CalCurveTable : public Representable {
00293 friend class ASDM;
00294
00295 public:
00296
00297
00303 static vector<string> getKeyName();
00304
00305
00306 virtual ~CalCurveTable();
00307
00313 ASDM &getContainer() const;
00314
00320 unsigned int size() ;
00321
00327 string getName() const;
00328
00334 static const vector<string>& getAttributesNames();
00335
00339 Entity getEntity() const;
00340
00345 void setEntity(Entity e);
00346
00354 string toXML() ;
00355
00356 #ifndef WITHOUT_ACS
00357
00363 CalCurveTableIDL *toIDL() ;
00364 #endif
00365
00366 #ifndef WITHOUT_ACS
00367
00373 void fromIDL(CalCurveTableIDL x) ;
00374 #endif
00375
00376
00377
00378
00379
00384 CalCurveRow *newRow();
00385
00386
00424 CalCurveRow *newRow(AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, CalCurveTypeMod::CalCurveType typeCurve, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Frequency > frequencyRange, int numAntenna, int numPoly, int numReceptor, vector<string > antennaNames, string refAntennaName, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<vector<float > > > curve, vector<double > reducedChiSquared);
00425
00426
00427
00440 CalCurveRow *newRow(CalCurveRow *row);
00441
00442
00443
00444
00445
00446
00459 CalCurveRow* add(CalCurveRow* x) ;
00460
00461
00462
00463
00464
00465
00466
00467
00468
00474 vector<CalCurveRow *> get() ;
00475
00476
00477
00478
00479
00497 CalCurveRow* getRowByKey(AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, CalCurveTypeMod::CalCurveType typeCurve, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId);
00498
00499
00500
00501
00502
00542 CalCurveRow* lookup(AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, CalCurveTypeMod::CalCurveType typeCurve, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Frequency > frequencyRange, int numAntenna, int numPoly, int numReceptor, vector<string > antennaNames, string refAntennaName, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<vector<float > > > curve, vector<double > reducedChiSquared);
00543
00544
00545 private:
00546
00555 CalCurveTable (ASDM & container);
00556
00557 ASDM & container;
00558
00559 bool archiveAsBin;
00560 bool fileAsBin ;
00561
00562 Entity entity;
00563
00564
00565
00569 static string tableName;
00570
00574 static const vector<string> attributesNames;
00575
00579 static vector<string> initAttributesNames();
00580
00581
00585 static vector<string> key;
00586
00587
00595 CalCurveRow* checkAndAdd(CalCurveRow* x) ;
00596
00597
00598
00599
00600
00601
00602 vector<CalCurveRow * > privateRows;
00603
00604
00605
00606 vector<CalCurveRow *> row;
00607
00608
00609 void error() ;
00610
00611
00618 void fromXML(string xmlDoc) ;
00619
00624 void setFromMIMEFile(const string& directory);
00625 void setFromXMLFile(const string& directory);
00626
00634 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00635
00636
00643 void setFromMIME(const string & mimeMsg);
00644
00648 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00649
00659 void toFile(string directory);
00660
00669 void setFromFile(const string& directory);
00670
00671 };
00672
00673 }
00674
00675 #endif