CalGainRow.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 CalGainRow_CLASS
00035 #define CalGainRow_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 <ArrayTime.h>
00052
00053
00054
00055 #include <Tag.h>
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 #include <ConversionException.h>
00082 #include <NoSuchRow.h>
00083 #include <IllegalAccessException.h>
00084
00085 #include <RowTransformer.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) (EndianIStream& eis);
00106 typedef void (CalGainRow::*CalGainAttributeFromText) (const string& s);
00107
00114 class CalGainRow {
00115 friend class asdm::CalGainTable;
00116 friend class asdm::RowTransformer<CalGainRow>;
00117
00118
00119 public:
00120
00121 virtual ~CalGainRow();
00122
00126 CalGainTable &getTable() const;
00127
00132 bool isAdded() const;
00133
00135
00137
00138
00139
00140
00141
00142
00143
00144
00149 ArrayTime getStartValidTime() const;
00150
00151
00152
00153
00161 void setStartValidTime (ArrayTime startValidTime);
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00179 ArrayTime getEndValidTime() const;
00180
00181
00182
00183
00191 void setEndValidTime (ArrayTime endValidTime);
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00209 float getGain() const;
00210
00211
00212
00213
00221 void setGain (float gain);
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00239 bool getGainValid() const;
00240
00241
00242
00243
00251 void setGainValid (bool gainValid);
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00269 float getFit() const;
00270
00271
00272
00273
00281 void setFit (float fit);
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00299 float getFitWeight() const;
00300
00301
00302
00303
00311 void setFitWeight (float fitWeight);
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00329 bool getTotalGainValid() const;
00330
00331
00332
00333
00341 void setTotalGainValid (bool totalGainValid);
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00359 float getTotalFit() const;
00360
00361
00362
00363
00371 void setTotalFit (float totalFit);
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00389 float getTotalFitWeight() const;
00390
00391
00392
00393
00401 void setTotalFitWeight (float totalFitWeight);
00402
00403
00404
00405
00406
00407
00409
00411
00412
00413
00414
00415
00416
00417
00418
00423 Tag getCalDataId() const;
00424
00425
00426
00427
00437 void setCalDataId (Tag calDataId);
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00455 Tag getCalReductionId() const;
00456
00457
00458
00459
00469 void setCalReductionId (Tag calReductionId);
00470
00471
00472
00473
00474
00475
00477
00479
00480
00481
00482
00483
00490 CalReductionRow* getCalReductionUsingCalReductionId();
00491
00492
00493
00494
00495
00496
00497
00498
00505 CalDataRow* getCalDataUsingCalDataId();
00506
00507
00508
00509
00510
00511
00512
00540 bool compareNoAutoInc(Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight);
00541
00542
00543
00544
00568 bool compareRequiredValue(ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight);
00569
00570
00579 bool equalByRequiredValue(CalGainRow* x) ;
00580
00581 #ifndef WITHOUT_ACS
00582
00586 asdmIDL::CalGainRowIDL *toIDL() const;
00587
00595 void toIDL(asdmIDL::CalGainRowIDL& x) const;
00596 #endif
00597
00598 #ifndef WITHOUT_ACS
00599
00604 void setFromIDL (asdmIDL::CalGainRowIDL x) ;
00605 #endif
00606
00611 std::string toXML() const;
00612
00619 void setFromXML (std::string rowDoc) ;
00620
00623
00625
00626 std::map<std::string, CalGainAttributeFromBin> fromBinMethods;
00627 void calDataIdFromBin( EndianIStream& eis);
00628 void calReductionIdFromBin( EndianIStream& eis);
00629 void startValidTimeFromBin( EndianIStream& eis);
00630 void endValidTimeFromBin( EndianIStream& eis);
00631 void gainFromBin( EndianIStream& eis);
00632 void gainValidFromBin( EndianIStream& eis);
00633 void fitFromBin( EndianIStream& eis);
00634 void fitWeightFromBin( EndianIStream& eis);
00635 void totalGainValidFromBin( EndianIStream& eis);
00636 void totalFitFromBin( EndianIStream& eis);
00637 void totalFitWeightFromBin( EndianIStream& eis);
00638
00639
00640
00648 static CalGainRow* fromBin(EndianIStream& eis, CalGainTable& table, const std::vector<std::string>& attributesSeq);
00649
00656 void fromText(const std::string& attributeName, const std::string& t);
00658
00659 private:
00663 CalGainTable &table;
00667 bool hasBeenAdded;
00668
00669
00670 void isAdded(bool added);
00671
00672
00681 CalGainRow (CalGainTable &table);
00682
00700 CalGainRow (CalGainTable &table, CalGainRow &row);
00701
00703
00705
00706
00707
00708
00709
00710
00711 ArrayTime startValidTime;
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722 ArrayTime endValidTime;
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733 float gain;
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744 bool gainValid;
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755 float fit;
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766 float fitWeight;
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777 bool totalGainValid;
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788 float totalFit;
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799 float totalFitWeight;
00800
00801
00802
00803
00804
00806
00808
00809
00810
00811
00812
00813
00814 Tag calDataId;
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825 Tag calReductionId;
00826
00827
00828
00829
00830
00832
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00852
00854
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00871
00873 std::map<std::string, CalGainAttributeFromText> fromTextMethods;
00874
00875 void calDataIdFromText (const string & s);
00876
00877
00878 void calReductionIdFromText (const string & s);
00879
00880
00881 void startValidTimeFromText (const string & s);
00882
00883
00884 void endValidTimeFromText (const string & s);
00885
00886
00887 void gainFromText (const string & s);
00888
00889
00890 void gainValidFromText (const string & s);
00891
00892
00893 void fitFromText (const string & s);
00894
00895
00896 void fitWeightFromText (const string & s);
00897
00898
00899 void totalGainValidFromText (const string & s);
00900
00901
00902 void totalFitFromText (const string & s);
00903
00904
00905 void totalFitWeightFromText (const string & s);
00906
00907
00908
00909
00914 void toBin(EndianOSStream& eoss);
00915
00925 };
00926
00927 }
00928
00929 #endif