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 CalFluxTable_CLASS
00035 #define CalFluxTable_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 <Angle.h>
00051 using asdm::Angle;
00052
00053 #include <Tag.h>
00054 using asdm::Tag;
00055
00056 #include <Frequency.h>
00057 using asdm::Frequency;
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 #include "CFluxCalibrationMethod.h"
00076 using namespace FluxCalibrationMethodMod;
00077
00078
00079
00080
00081
00082
00083
00084 #include "CStokesParameter.h"
00085 using namespace StokesParameterMod;
00086
00087
00088
00089
00090
00091 #include "CDirectionReferenceCode.h"
00092 using namespace DirectionReferenceCodeMod;
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106 #include "CSourceModel.h"
00107 using namespace SourceModelMod;
00108
00109
00110
00111
00112 #include <ConversionException.h>
00113 #include <DuplicateKey.h>
00114 #include <UniquenessViolationException.h>
00115 #include <NoSuchRow.h>
00116 #include <DuplicateKey.h>
00117 using asdm::DuplicateKey;
00118 using asdm::ConversionException;
00119 using asdm::NoSuchRow;
00120 using asdm::DuplicateKey;
00121
00122 #ifndef WITHOUT_ACS
00123 #include <asdmIDLC.h>
00124 using asdmIDL::CalFluxTableIDL;
00125 #endif
00126
00127 #include <Representable.h>
00128
00129 namespace asdm {
00130
00131
00132
00133
00134 class ASDM;
00135 class CalFluxRow;
00309 class CalFluxTable : public Representable {
00310 friend class ASDM;
00311
00312 public:
00313
00314
00320 static vector<string> getKeyName();
00321
00322
00323 virtual ~CalFluxTable();
00324
00330 ASDM &getContainer() const;
00331
00337 unsigned int size() ;
00338
00344 string getName() const;
00345
00351 static const vector<string>& getAttributesNames();
00352
00356 Entity getEntity() const;
00357
00362 void setEntity(Entity e);
00363
00371 string toXML() ;
00372
00373 #ifndef WITHOUT_ACS
00374
00380 CalFluxTableIDL *toIDL() ;
00381 #endif
00382
00383 #ifndef WITHOUT_ACS
00384
00390 void fromIDL(CalFluxTableIDL x) ;
00391 #endif
00392
00393
00394
00395
00396
00401 CalFluxRow *newRow();
00402
00403
00433 CalFluxRow *newRow(string sourceName, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numFrequencyRanges, int numStokes, vector<vector<Frequency > > frequencyRanges, FluxCalibrationMethodMod::FluxCalibrationMethod fluxMethod, vector<vector<double > > flux, vector<vector<double > > fluxError, vector<StokesParameterMod::StokesParameter > stokes);
00434
00435
00436
00449 CalFluxRow *newRow(CalFluxRow *row);
00450
00451
00452
00453
00454
00455
00468 CalFluxRow* add(CalFluxRow* x) ;
00469
00470
00471
00472
00473
00474
00475
00476
00477
00483 vector<CalFluxRow *> get() ;
00484
00485
00486
00487
00488
00502 CalFluxRow* getRowByKey(string sourceName, Tag calDataId, Tag calReductionId);
00503
00504
00505
00506
00507
00539 CalFluxRow* lookup(string sourceName, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numFrequencyRanges, int numStokes, vector<vector<Frequency > > frequencyRanges, FluxCalibrationMethodMod::FluxCalibrationMethod fluxMethod, vector<vector<double > > flux, vector<vector<double > > fluxError, vector<StokesParameterMod::StokesParameter > stokes);
00540
00541
00542 private:
00543
00552 CalFluxTable (ASDM & container);
00553
00554 ASDM & container;
00555
00556 bool archiveAsBin;
00557 bool fileAsBin ;
00558
00559 Entity entity;
00560
00561
00562
00566 static string tableName;
00567
00571 static const vector<string> attributesNames;
00572
00576 static vector<string> initAttributesNames();
00577
00578
00582 static vector<string> key;
00583
00584
00592 CalFluxRow* checkAndAdd(CalFluxRow* x) ;
00593
00594
00595
00596
00597
00598
00599 vector<CalFluxRow * > privateRows;
00600
00601
00602
00603 vector<CalFluxRow *> row;
00604
00605
00606 void error() ;
00607
00608
00615 void fromXML(string xmlDoc) ;
00616
00621 void setFromMIMEFile(const string& directory);
00622 void setFromXMLFile(const string& directory);
00623
00631 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00632
00633
00640 void setFromMIME(const string & mimeMsg);
00641
00645 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00646
00656 void toFile(string directory);
00657
00666 void setFromFile(const string& directory);
00667
00668 };
00669
00670 }
00671
00672 #endif