FeedRow.h
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 FeedRow_CLASS
00035 #define FeedRow_CLASS
00036
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040
00041 #ifndef WITHOUT_ACS
00042 #include <asdmIDLC.h>
00043 #endif
00044
00045
00046
00047
00048
00049
00050
00051 #include <Angle.h>
00052
00053
00054
00055 #include <Tag.h>
00056
00057
00058
00059 #include <Length.h>
00060
00061
00062
00063 #include <ArrayTimeInterval.h>
00064
00065
00066
00067 #include <ComplexWrapper.h>
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 #include "CPolarizationType.h"
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 #include <ConversionException.h>
00106 #include <NoSuchRow.h>
00107 #include <IllegalAccessException.h>
00108
00109 #include <RowTransformer.h>
00110
00111
00112
00113
00114
00115
00116 namespace asdm {
00117
00118
00119
00120
00121
00122 class AntennaRow;
00123
00124
00125 class SpectralWindowRow;
00126
00127
00128 class ReceiverRow;
00129
00130
00131 class FeedRow;
00132 typedef void (FeedRow::*FeedAttributeFromBin) (EndianIStream& eis);
00133 typedef void (FeedRow::*FeedAttributeFromText) (const string& s);
00134
00141 class FeedRow {
00142 friend class asdm::FeedTable;
00143 friend class asdm::RowTransformer<FeedRow>;
00144
00145
00146 public:
00147
00148 virtual ~FeedRow();
00149
00153 FeedTable &getTable() const;
00154
00159 bool isAdded() const;
00160
00162
00164
00165
00166
00167
00168
00169
00170
00171
00176 int getFeedId() const;
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00196 ArrayTimeInterval getTimeInterval() const;
00197
00198
00199
00200
00210 void setTimeInterval (ArrayTimeInterval timeInterval);
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00228 int getNumReceptor() const;
00229
00230
00231
00232
00240 void setNumReceptor (int numReceptor);
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00258 vector<vector<double > > getBeamOffset() const;
00259
00260
00261
00262
00270 void setBeamOffset (vector<vector<double > > beamOffset);
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00288 vector<vector<Length > > getFocusReference() const;
00289
00290
00291
00292
00300 void setFocusReference (vector<vector<Length > > focusReference);
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00318 vector<PolarizationTypeMod::PolarizationType > getPolarizationTypes() const;
00319
00320
00321
00322
00330 void setPolarizationTypes (vector<PolarizationTypeMod::PolarizationType > polarizationTypes);
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00348 vector<vector<Complex > > getPolResponse() const;
00349
00350
00351
00352
00360 void setPolResponse (vector<vector<Complex > > polResponse);
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00378 vector<Angle > getReceptorAngle() const;
00379
00380
00381
00382
00390 void setReceptorAngle (vector<Angle > receptorAngle);
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00406 bool isFeedNumExists() const;
00407
00408
00409
00415 int getFeedNum() const;
00416
00417
00418
00419
00426 void setFeedNum (int feedNum);
00427
00428
00429
00430
00434 void clearFeedNum ();
00435
00436
00437
00438
00439
00440
00441
00442
00447 bool isIllumOffsetExists() const;
00448
00449
00450
00456 vector<Length > getIllumOffset() const;
00457
00458
00459
00460
00467 void setIllumOffset (vector<Length > illumOffset);
00468
00469
00470
00471
00475 void clearIllumOffset ();
00476
00477
00478
00479
00480
00481
00482
00483
00488 bool isPositionExists() const;
00489
00490
00491
00497 vector<Length > getPosition() const;
00498
00499
00500
00501
00508 void setPosition (vector<Length > position);
00509
00510
00511
00512
00516 void clearPosition ();
00517
00518
00519
00520
00521
00522
00523
00524
00529 bool isSkyCouplingExists() const;
00530
00531
00532
00538 float getSkyCoupling() const;
00539
00540
00541
00542
00549 void setSkyCoupling (float skyCoupling);
00550
00551
00552
00553
00557 void clearSkyCoupling ();
00558
00559
00560
00561
00562
00563
00564
00565
00570 bool isNumChanExists() const;
00571
00572
00573
00579 int getNumChan() const;
00580
00581
00582
00583
00590 void setNumChan (int numChan);
00591
00592
00593
00594
00598 void clearNumChan ();
00599
00600
00601
00602
00603
00604
00605
00606
00611 bool isSkyCouplingSpectrumExists() const;
00612
00613
00614
00620 vector<float > getSkyCouplingSpectrum() const;
00621
00622
00623
00624
00631 void setSkyCouplingSpectrum (vector<float > skyCouplingSpectrum);
00632
00633
00634
00635
00639 void clearSkyCouplingSpectrum ();
00640
00641
00642
00644
00646
00647
00648
00649
00650
00651
00652
00653
00658 Tag getAntennaId() const;
00659
00660
00661
00662
00672 void setAntennaId (Tag antennaId);
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00690 vector<int> getReceiverId() const;
00691
00692
00693
00694
00702 void setReceiverId (vector<int> receiverId);
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00720 Tag getSpectralWindowId() const;
00721
00722
00723
00724
00734 void setSpectralWindowId (Tag spectralWindowId);
00735
00736
00737
00738
00739
00740
00742
00744
00745
00746
00747
00748
00755 AntennaRow* getAntennaUsingAntennaId();
00756
00757
00758
00759
00760
00761
00762
00763
00770 SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00771
00772
00773
00774
00775
00776
00784 void setReceiverId (int i, int receiverId);
00785
00786
00787
00788
00789
00790
00791
00792
00797 void addReceiverId(int id);
00798
00803 void addReceiverId(vector<int> id);
00804
00805
00810 const vector <ReceiverRow *> getReceivers(int i);
00811
00812
00818 const vector <ReceiverRow *> getReceivers();
00819
00820
00821
00822
00823
00824
00825
00826
00852 bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle, vector<int> receiverId);
00853
00854
00855
00856
00876 bool compareRequiredValue(int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle, vector<int> receiverId);
00877
00878
00887 bool equalByRequiredValue(FeedRow* x) ;
00888
00889 #ifndef WITHOUT_ACS
00890
00894 asdmIDL::FeedRowIDL *toIDL() const;
00895
00903 void toIDL(asdmIDL::FeedRowIDL& x) const;
00904 #endif
00905
00906 #ifndef WITHOUT_ACS
00907
00912 void setFromIDL (asdmIDL::FeedRowIDL x) ;
00913 #endif
00914
00919 std::string toXML() const;
00920
00927 void setFromXML (std::string rowDoc) ;
00928
00931
00933
00934 std::map<std::string, FeedAttributeFromBin> fromBinMethods;
00935 void antennaIdFromBin( EndianIStream& eis);
00936 void spectralWindowIdFromBin( EndianIStream& eis);
00937 void timeIntervalFromBin( EndianIStream& eis);
00938 void feedIdFromBin( EndianIStream& eis);
00939 void numReceptorFromBin( EndianIStream& eis);
00940 void beamOffsetFromBin( EndianIStream& eis);
00941 void focusReferenceFromBin( EndianIStream& eis);
00942 void polarizationTypesFromBin( EndianIStream& eis);
00943 void polResponseFromBin( EndianIStream& eis);
00944 void receptorAngleFromBin( EndianIStream& eis);
00945 void receiverIdFromBin( EndianIStream& eis);
00946
00947 void feedNumFromBin( EndianIStream& eis);
00948 void illumOffsetFromBin( EndianIStream& eis);
00949 void positionFromBin( EndianIStream& eis);
00950 void skyCouplingFromBin( EndianIStream& eis);
00951 void numChanFromBin( EndianIStream& eis);
00952 void skyCouplingSpectrumFromBin( EndianIStream& eis);
00953
00954
00962 static FeedRow* fromBin(EndianIStream& eis, FeedTable& table, const std::vector<std::string>& attributesSeq);
00963
00970 void fromText(const std::string& attributeName, const std::string& t);
00972
00973 private:
00977 FeedTable &table;
00981 bool hasBeenAdded;
00982
00983
00984 void isAdded(bool added);
00985
00986
00995 FeedRow (FeedTable &table);
00996
01014 FeedRow (FeedTable &table, FeedRow &row);
01015
01017
01019
01020
01021
01022
01023
01024
01025 int feedId;
01026
01027
01028
01029
01039 void setFeedId (int feedId);
01040
01041
01042
01043
01044
01045
01046
01047
01048 ArrayTimeInterval timeInterval;
01049
01050
01051
01052
01053
01054
01055
01056
01057
01058
01059 int numReceptor;
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070 vector<vector<double > > beamOffset;
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080
01081 vector<vector<Length > > focusReference;
01082
01083
01084
01085
01086
01087
01088
01089
01090
01091
01092 vector<PolarizationTypeMod::PolarizationType > polarizationTypes;
01093
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103 vector<vector<Complex > > polResponse;
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113
01114 vector<Angle > receptorAngle;
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124 bool feedNumExists;
01125
01126
01127 int feedNum;
01128
01129
01130
01131
01132
01133
01134
01135
01136
01137 bool illumOffsetExists;
01138
01139
01140 vector<Length > illumOffset;
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150 bool positionExists;
01151
01152
01153 vector<Length > position;
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163 bool skyCouplingExists;
01164
01165
01166 float skyCoupling;
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176 bool numChanExists;
01177
01178
01179 int numChan;
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189 bool skyCouplingSpectrumExists;
01190
01191
01192 vector<float > skyCouplingSpectrum;
01193
01194
01195
01196
01197
01199
01201
01202
01203
01204
01205
01206
01207 Tag antennaId;
01208
01209
01210
01211
01212
01213
01214
01215
01216
01217
01218 vector<int> receiverId;
01219
01220
01221
01222
01223
01224
01225
01226
01227
01228
01229 Tag spectralWindowId;
01230
01231
01232
01233
01234
01236
01238
01239
01240
01241
01242
01243
01244
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01262
01264
01265
01266
01267
01268
01269
01270
01271
01272
01273
01274
01275
01276
01277
01278
01279
01280
01281
01282
01283
01284
01285
01287
01289 std::map<std::string, FeedAttributeFromText> fromTextMethods;
01290
01291 void antennaIdFromText (const string & s);
01292
01293
01294 void spectralWindowIdFromText (const string & s);
01295
01296
01297 void timeIntervalFromText (const string & s);
01298
01299
01300 void feedIdFromText (const string & s);
01301
01302
01303 void numReceptorFromText (const string & s);
01304
01305
01306 void beamOffsetFromText (const string & s);
01307
01308
01309 void focusReferenceFromText (const string & s);
01310
01311
01312 void polarizationTypesFromText (const string & s);
01313
01314
01315 void polResponseFromText (const string & s);
01316
01317
01318 void receptorAngleFromText (const string & s);
01319
01320
01321 void receiverIdFromText (const string & s);
01322
01323
01324
01325 void feedNumFromText (const string & s);
01326
01327
01328 void illumOffsetFromText (const string & s);
01329
01330
01331 void positionFromText (const string & s);
01332
01333
01334 void skyCouplingFromText (const string & s);
01335
01336
01337 void numChanFromText (const string & s);
01338
01339
01340 void skyCouplingSpectrumFromText (const string & s);
01341
01342
01343
01348 void toBin(EndianOSStream& eoss);
01349
01359 };
01360
01361 }
01362
01363 #endif