CalDeviceRow.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 CalDeviceRow_CLASS
00035 #define CalDeviceRow_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 <Tag.h>
00052
00053
00054
00055 #include <Temperature.h>
00056
00057
00058
00059 #include <ArrayTimeInterval.h>
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 #include "CCalibrationDevice.h"
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 #include <ConversionException.h>
00086 #include <NoSuchRow.h>
00087 #include <IllegalAccessException.h>
00088
00089 #include <RowTransformer.h>
00090
00091
00092
00093
00094
00095
00096 namespace asdm {
00097
00098
00099
00100
00101
00102 class AntennaRow;
00103
00104
00105 class SpectralWindowRow;
00106
00107
00108 class FeedRow;
00109
00110
00111 class CalDeviceRow;
00112 typedef void (CalDeviceRow::*CalDeviceAttributeFromBin) (EndianIStream& eis);
00113 typedef void (CalDeviceRow::*CalDeviceAttributeFromText) (const string& s);
00114
00121 class CalDeviceRow {
00122 friend class asdm::CalDeviceTable;
00123 friend class asdm::RowTransformer<CalDeviceRow>;
00124
00125
00126 public:
00127
00128 virtual ~CalDeviceRow();
00129
00133 CalDeviceTable &getTable() const;
00134
00139 bool isAdded() const;
00140
00142
00144
00145
00146
00147
00148
00149
00150
00151
00156 ArrayTimeInterval getTimeInterval() const;
00157
00158
00159
00160
00170 void setTimeInterval (ArrayTimeInterval timeInterval);
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00188 int getNumCalload() const;
00189
00190
00191
00192
00200 void setNumCalload (int numCalload);
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00218 vector<CalibrationDeviceMod::CalibrationDevice > getCalLoadNames() const;
00219
00220
00221
00222
00230 void setCalLoadNames (vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00246 bool isNumReceptorExists() const;
00247
00248
00249
00255 int getNumReceptor() const;
00256
00257
00258
00259
00266 void setNumReceptor (int numReceptor);
00267
00268
00269
00270
00274 void clearNumReceptor ();
00275
00276
00277
00278
00279
00280
00281
00282
00287 bool isCalEffExists() const;
00288
00289
00290
00296 vector<vector<float > > getCalEff() const;
00297
00298
00299
00300
00307 void setCalEff (vector<vector<float > > calEff);
00308
00309
00310
00311
00315 void clearCalEff ();
00316
00317
00318
00319
00320
00321
00322
00323
00328 bool isNoiseCalExists() const;
00329
00330
00331
00337 vector<double > getNoiseCal() const;
00338
00339
00340
00341
00348 void setNoiseCal (vector<double > noiseCal);
00349
00350
00351
00352
00356 void clearNoiseCal ();
00357
00358
00359
00360
00361
00362
00363
00364
00369 bool isCoupledNoiseCalExists() const;
00370
00371
00372
00378 vector<vector<float > > getCoupledNoiseCal() const;
00379
00380
00381
00382
00389 void setCoupledNoiseCal (vector<vector<float > > coupledNoiseCal);
00390
00391
00392
00393
00397 void clearCoupledNoiseCal ();
00398
00399
00400
00401
00402
00403
00404
00405
00410 bool isTemperatureLoadExists() const;
00411
00412
00413
00419 vector<Temperature > getTemperatureLoad() const;
00420
00421
00422
00423
00430 void setTemperatureLoad (vector<Temperature > temperatureLoad);
00431
00432
00433
00434
00438 void clearTemperatureLoad ();
00439
00440
00441
00443
00445
00446
00447
00448
00449
00450
00451
00452
00457 Tag getAntennaId() const;
00458
00459
00460
00461
00471 void setAntennaId (Tag antennaId);
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00489 int getFeedId() const;
00490
00491
00492
00493
00503 void setFeedId (int feedId);
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00521 Tag getSpectralWindowId() const;
00522
00523
00524
00525
00535 void setSpectralWindowId (Tag spectralWindowId);
00536
00537
00538
00539
00540
00541
00543
00545
00546
00547
00548
00549
00556 AntennaRow* getAntennaUsingAntennaId();
00557
00558
00559
00560
00561
00562
00563
00564
00571 SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00587 vector <FeedRow *> getFeeds();
00588
00589
00590
00591
00592
00593
00594
00595
00613 bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numCalload, vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
00614
00615
00616
00617
00627 bool compareRequiredValue(int numCalload, vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
00628
00629
00638 bool equalByRequiredValue(CalDeviceRow* x) ;
00639
00640 #ifndef WITHOUT_ACS
00641
00645 asdmIDL::CalDeviceRowIDL *toIDL() const;
00646
00654 void toIDL(asdmIDL::CalDeviceRowIDL& x) const;
00655 #endif
00656
00657 #ifndef WITHOUT_ACS
00658
00663 void setFromIDL (asdmIDL::CalDeviceRowIDL x) ;
00664 #endif
00665
00670 std::string toXML() const;
00671
00678 void setFromXML (std::string rowDoc) ;
00679
00682
00684
00685 std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods;
00686 void antennaIdFromBin( EndianIStream& eis);
00687 void spectralWindowIdFromBin( EndianIStream& eis);
00688 void timeIntervalFromBin( EndianIStream& eis);
00689 void feedIdFromBin( EndianIStream& eis);
00690 void numCalloadFromBin( EndianIStream& eis);
00691 void calLoadNamesFromBin( EndianIStream& eis);
00692
00693 void numReceptorFromBin( EndianIStream& eis);
00694 void calEffFromBin( EndianIStream& eis);
00695 void noiseCalFromBin( EndianIStream& eis);
00696 void coupledNoiseCalFromBin( EndianIStream& eis);
00697 void temperatureLoadFromBin( EndianIStream& eis);
00698
00699
00707 static CalDeviceRow* fromBin(EndianIStream& eis, CalDeviceTable& table, const std::vector<std::string>& attributesSeq);
00708
00715 void fromText(const std::string& attributeName, const std::string& t);
00717
00718 private:
00722 CalDeviceTable &table;
00726 bool hasBeenAdded;
00727
00728
00729 void isAdded(bool added);
00730
00731
00740 CalDeviceRow (CalDeviceTable &table);
00741
00759 CalDeviceRow (CalDeviceTable &table, CalDeviceRow &row);
00760
00762
00764
00765
00766
00767
00768
00769
00770 ArrayTimeInterval timeInterval;
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781 int numCalload;
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792 vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames;
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802 bool numReceptorExists;
00803
00804
00805 int numReceptor;
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815 bool calEffExists;
00816
00817
00818 vector<vector<float > > calEff;
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828 bool noiseCalExists;
00829
00830
00831 vector<double > noiseCal;
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841 bool coupledNoiseCalExists;
00842
00843
00844 vector<vector<float > > coupledNoiseCal;
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854 bool temperatureLoadExists;
00855
00856
00857 vector<Temperature > temperatureLoad;
00858
00859
00860
00861
00862
00864
00866
00867
00868
00869
00870
00871
00872 Tag antennaId;
00873
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883 int feedId;
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894 Tag spectralWindowId;
00895
00896
00897
00898
00899
00901
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00927
00929
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00946
00948 std::map<std::string, CalDeviceAttributeFromText> fromTextMethods;
00949
00950 void antennaIdFromText (const string & s);
00951
00952
00953 void spectralWindowIdFromText (const string & s);
00954
00955
00956 void timeIntervalFromText (const string & s);
00957
00958
00959 void feedIdFromText (const string & s);
00960
00961
00962 void numCalloadFromText (const string & s);
00963
00964
00965 void calLoadNamesFromText (const string & s);
00966
00967
00968
00969 void numReceptorFromText (const string & s);
00970
00971
00972 void calEffFromText (const string & s);
00973
00974
00975 void noiseCalFromText (const string & s);
00976
00977
00978 void coupledNoiseCalFromText (const string & s);
00979
00980
00981 void temperatureLoadFromText (const string & s);
00982
00983
00984
00989 void toBin(EndianOSStream& eoss);
00990
01000 };
01001
01002 }
01003
01004 #endif