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 CalGainRow_CLASS
00035 #define CalGainRow_CLASS
00036
00037 #include <vector>
00038 #include <string>
00039 #include <set>
00040 using std::vector;
00041 using std::string;
00042 using std::set;
00043
00044 #ifndef WITHOUT_ACS
00045 #include <asdmIDLC.h>
00046 using asdmIDL::CalGainRowIDL;
00047 #endif
00048
00049
00050
00051
00052
00053
00054 #include <ArrayTime.h>
00055 using asdm::ArrayTime;
00056
00057 #include <Tag.h>
00058 using asdm::Tag;
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 #include <ConversionException.h>
00084 #include <NoSuchRow.h>
00085 #include <IllegalAccessException.h>
00086
00087
00088
00089
00090
00091
00092 namespace asdm {
00093
00094
00095
00096
00097
00098 class CalReductionRow;
00099
00100
00101 class CalDataRow;
00102
00103
00104 class CalGainRow;
00105 typedef void (CalGainRow::*CalGainAttributeFromBin) (EndianISStream& eiss);
00106
00113 class CalGainRow {
00114 friend class asdm::CalGainTable;
00115
00116 public:
00117
00118 virtual ~CalGainRow();
00119
00123 CalGainTable &getTable() const;
00124
00129 bool isAdded() const;
00130
00132
00134
00135
00136
00137
00138
00139
00140
00141
00146 ArrayTime getStartValidTime() const;
00147
00148
00149
00150
00158 void setStartValidTime (ArrayTime startValidTime);
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00176 ArrayTime getEndValidTime() const;
00177
00178
00179
00180
00188 void setEndValidTime (ArrayTime endValidTime);
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00206 float getGain() const;
00207
00208
00209
00210
00218 void setGain (float gain);
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00236 bool getGainValid() const;
00237
00238
00239
00240
00248 void setGainValid (bool gainValid);
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00266 float getFit() const;
00267
00268
00269
00270
00278 void setFit (float fit);
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00296 float getFitWeight() const;
00297
00298
00299
00300
00308 void setFitWeight (float fitWeight);
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00326 bool getTotalGainValid() const;
00327
00328
00329
00330
00338 void setTotalGainValid (bool totalGainValid);
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00356 float getTotalFit() const;
00357
00358
00359
00360
00368 void setTotalFit (float totalFit);
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00386 float getTotalFitWeight() const;
00387
00388
00389
00390
00398 void setTotalFitWeight (float totalFitWeight);
00399
00400
00401
00402
00403
00404
00406
00408
00409
00410
00411
00412
00413
00414
00415
00420 Tag getCalDataId() const;
00421
00422
00423
00424
00434 void setCalDataId (Tag calDataId);
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00452 Tag getCalReductionId() const;
00453
00454
00455
00456
00466 void setCalReductionId (Tag calReductionId);
00467
00468
00469
00470
00471
00472
00474
00476
00477
00478
00479
00480
00487 CalReductionRow* getCalReductionUsingCalReductionId();
00488
00489
00490
00491
00492
00493
00494
00495
00502 CalDataRow* getCalDataUsingCalDataId();
00503
00504
00505
00506
00507
00508
00509
00537 bool compareNoAutoInc(Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight);
00538
00539
00540
00541
00565 bool compareRequiredValue(ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight);
00566
00567
00576 bool equalByRequiredValue(CalGainRow* x) ;
00577
00578 #ifndef WITHOUT_ACS
00579
00583 CalGainRowIDL *toIDL() const;
00584 #endif
00585
00586 #ifndef WITHOUT_ACS
00587
00592 void setFromIDL (CalGainRowIDL x) ;
00593 #endif
00594
00599 string toXML() const;
00600
00607 void setFromXML (string rowDoc) ;
00608
00609 private:
00613 CalGainTable &table;
00617 bool hasBeenAdded;
00618
00619
00620 void isAdded(bool added);
00621
00622
00631 CalGainRow (CalGainTable &table);
00632
00650 CalGainRow (CalGainTable &table, CalGainRow &row);
00651
00653
00655
00656
00657
00658
00659
00660
00661 ArrayTime startValidTime;
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672 ArrayTime endValidTime;
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683 float gain;
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694 bool gainValid;
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705 float fit;
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716 float fitWeight;
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727 bool totalGainValid;
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738 float totalFit;
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749 float totalFitWeight;
00750
00751
00752
00753
00754
00756
00758
00759
00760
00761
00762
00763
00764 Tag calDataId;
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775 Tag calReductionId;
00776
00777
00778
00779
00780
00782
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00801
00803 map<string, CalGainAttributeFromBin> fromBinMethods;
00804 void calDataIdFromBin( EndianISStream& eiss);
00805 void calReductionIdFromBin( EndianISStream& eiss);
00806 void startValidTimeFromBin( EndianISStream& eiss);
00807 void endValidTimeFromBin( EndianISStream& eiss);
00808 void gainFromBin( EndianISStream& eiss);
00809 void gainValidFromBin( EndianISStream& eiss);
00810 void fitFromBin( EndianISStream& eiss);
00811 void fitWeightFromBin( EndianISStream& eiss);
00812 void totalGainValidFromBin( EndianISStream& eiss);
00813 void totalFitFromBin( EndianISStream& eiss);
00814 void totalFitWeightFromBin( EndianISStream& eiss);
00815
00816
00817
00822 void toBin(EndianOSStream& eoss);
00823
00831 static CalGainRow* fromBin(EndianISStream& eiss, CalGainTable& table, const vector<string>& attributesSeq);
00832
00833 };
00834
00835 }
00836
00837 #endif