casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalDeviceRow.h
Go to the documentation of this file.
1 
2 /*
3  * ALMA - Atacama Large Millimeter Array
4  * (c) European Southern Observatory, 2002
5  * (c) Associated Universities Inc., 2002
6  * Copyright by ESO (in the framework of the ALMA collaboration),
7  * Copyright by AUI (in the framework of the ALMA collaboration),
8  * All rights reserved.
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY, without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23  * MA 02111-1307 USA
24  *
25  * Warning!
26  * --------------------------------------------------------------------
27  * | This is generated code! Do not modify this file. |
28  * | If you do, all changes will be lost when the file is re-generated. |
29  * --------------------------------------------------------------------
30  *
31  * File CalDeviceRow.h
32  */
33 
34 #ifndef CalDeviceRow_CLASS
35 #define CalDeviceRow_CLASS
36 
37 #include <vector>
38 #include <string>
39 #include <set>
40 
41 #ifndef WITHOUT_ACS
42 #include <asdmIDLC.h>
43 #endif
44 
45 
46 
47 
48 
49 
50 
52 
53 
54 
55 #include <alma/ASDM/Temperature.h>
56 
57 
58 
59 #include <alma/ASDM/Tag.h>
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
86 #include <alma/ASDM/NoSuchRow.h>
88 
90 //#include <alma/ASDM/TableStreamReader.h>
91 
92 /*\file CalDevice.h
93  \brief Generated from model's revision "-1", branch ""
94 */
95 
96 namespace asdm {
97 
98 //class asdm::CalDeviceTable;
99 
100 
101 // class asdm::AntennaRow;
102 class AntennaRow;
103 
104 // class asdm::SpectralWindowRow;
105 class SpectralWindowRow;
106 
107 // class asdm::FeedRow;
108 class FeedRow;
109 
110 
111 class CalDeviceRow;
113 typedef void (CalDeviceRow::*CalDeviceAttributeFromText) (const std::string& s);
114 
122 friend class asdm::CalDeviceTable;
124 //friend class asdm::TableStreamReader<CalDeviceTable, CalDeviceRow>;
125 
126 public:
127 
128  virtual ~CalDeviceRow();
129 
133  CalDeviceTable &getTable() const;
134 
139  bool isAdded() const;
140 
142  // Intrinsic Table Attributes //
144 
145 
146  // ===> Attribute timeInterval
147 
148 
149 
150 
151 
156  ArrayTimeInterval getTimeInterval() const;
157 
158 
159 
160 
170  void setTimeInterval (ArrayTimeInterval timeInterval);
171 
172 
173 
174 
175 
176 
177 
178  // ===> Attribute numCalload
179 
180 
181 
182 
183 
188  int getNumCalload() const;
189 
190 
191 
192 
200  void setNumCalload (int numCalload);
201 
202 
203 
204 
205 
206 
207 
208  // ===> Attribute calLoadNames
209 
210 
211 
212 
213 
218  std::vector<CalibrationDeviceMod::CalibrationDevice > getCalLoadNames() const;
219 
220 
221 
222 
230  void setCalLoadNames (std::vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
231 
232 
233 
234 
235 
236 
237 
238  // ===> Attribute numReceptor, which is optional
239 
240 
241 
246  bool isNumReceptorExists() const;
247 
248 
249 
255  int getNumReceptor() const;
256 
257 
258 
259 
266  void setNumReceptor (int numReceptor);
267 
268 
269 
270 
274  void clearNumReceptor ();
275 
276 
277 
278 
279  // ===> Attribute calEff, which is optional
280 
281 
282 
287  bool isCalEffExists() const;
288 
289 
290 
296  std::vector<std::vector<float > > getCalEff() const;
297 
298 
299 
300 
307  void setCalEff (std::vector<std::vector<float > > calEff);
308 
309 
310 
311 
315  void clearCalEff ();
316 
317 
318 
319 
320  // ===> Attribute noiseCal, which is optional
321 
322 
323 
328  bool isNoiseCalExists() const;
329 
330 
331 
337  std::vector<double > getNoiseCal() const;
338 
339 
340 
341 
348  void setNoiseCal (std::vector<double > noiseCal);
349 
350 
351 
352 
356  void clearNoiseCal ();
357 
358 
359 
360 
361  // ===> Attribute coupledNoiseCal, which is optional
362 
363 
364 
369  bool isCoupledNoiseCalExists() const;
370 
371 
372 
378  std::vector<std::vector<float > > getCoupledNoiseCal() const;
379 
380 
381 
382 
389  void setCoupledNoiseCal (std::vector<std::vector<float > > coupledNoiseCal);
390 
391 
392 
393 
397  void clearCoupledNoiseCal ();
398 
399 
400 
401 
402  // ===> Attribute temperatureLoad, which is optional
403 
404 
405 
410  bool isTemperatureLoadExists() const;
411 
412 
413 
419  std::vector<Temperature > getTemperatureLoad() const;
420 
421 
422 
423 
430  void setTemperatureLoad (std::vector<Temperature > temperatureLoad);
431 
432 
433 
434 
438  void clearTemperatureLoad ();
439 
440 
441 
443  // Extrinsic Table Attributes //
445 
446 
447  // ===> Attribute antennaId
448 
449 
450 
451 
452 
457  Tag getAntennaId() const;
458 
459 
460 
461 
471  void setAntennaId (Tag antennaId);
472 
473 
474 
475 
476 
477 
478 
479  // ===> Attribute feedId
480 
481 
482 
483 
484 
489  int getFeedId() const;
490 
491 
492 
493 
503  void setFeedId (int feedId);
504 
505 
506 
507 
508 
509 
510 
511  // ===> Attribute spectralWindowId
512 
513 
514 
515 
516 
521  Tag getSpectralWindowId() const;
522 
523 
524 
525 
536 
537 
538 
539 
540 
541 
543  // Links //
545 
546 
547 
548 
549 
557 
558 
559 
560 
561 
562 
563 
564 
572 
573 
574 
575 
576 
577 
578 
579 
580  // ===> Slice link from a row of CalDevice table to a collection of row of Feed table.
581 
587  std::vector <FeedRow *> getFeeds();
588 
589 
590 
591 
592 
593 
594 
595 
613  bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numCalload, std::vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
614 
615 
616 
617 
627  bool compareRequiredValue(int numCalload, std::vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames);
628 
629 
639 
640 #ifndef WITHOUT_ACS
641 
645  asdmIDL::CalDeviceRowIDL *toIDL() const;
646 
654  void toIDL(asdmIDL::CalDeviceRowIDL& x) const;
655 #endif
656 
657 #ifndef WITHOUT_ACS
658 
663  void setFromIDL (asdmIDL::CalDeviceRowIDL x) ;
664 #endif
665 
670  std::string toXML() const;
671 
678  void setFromXML (std::string rowDoc) ;
679 
682  // binary-deserialization material from an EndianIStream //
684 
685  std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods;
686 void antennaIdFromBin( EndianIStream& eis);
689 void feedIdFromBin( EndianIStream& eis);
690 void numCalloadFromBin( EndianIStream& eis);
692 
694 void calEffFromBin( EndianIStream& eis);
695 void noiseCalFromBin( EndianIStream& eis);
698 
699 
707  static CalDeviceRow* fromBin(EndianIStream& eis, CalDeviceTable& table, const std::vector<std::string>& attributesSeq);
708 
715  void fromText(const std::string& attributeName, const std::string& t);
717 
718 private:
727 
728  // This method is used by the Table class when this row is added to the table.
729  void isAdded(bool added);
730 
731 
741 
760 
762  // Intrinsic Table Attributes //
764 
765 
766  // ===> Attribute timeInterval
767 
768 
769 
770  ArrayTimeInterval timeInterval;
771 
772 
773 
774 
775 
776 
777  // ===> Attribute numCalload
778 
779 
780 
782 
783 
784 
785 
786 
787 
788  // ===> Attribute calLoadNames
789 
790 
791 
792  std::vector<CalibrationDeviceMod::CalibrationDevice > calLoadNames;
793 
794 
795 
796 
797 
798 
799  // ===> Attribute numReceptor, which is optional
800 
801 
803 
804 
806 
807 
808 
809 
810 
811 
812  // ===> Attribute calEff, which is optional
813 
814 
816 
817 
818  std::vector<std::vector<float > > calEff;
819 
820 
821 
822 
823 
824 
825  // ===> Attribute noiseCal, which is optional
826 
827 
829 
830 
831  std::vector<double > noiseCal;
832 
833 
834 
835 
836 
837 
838  // ===> Attribute coupledNoiseCal, which is optional
839 
840 
842 
843 
844  std::vector<std::vector<float > > coupledNoiseCal;
845 
846 
847 
848 
849 
850 
851  // ===> Attribute temperatureLoad, which is optional
852 
853 
855 
856 
857  std::vector<Temperature > temperatureLoad;
858 
859 
860 
861 
862 
864  // Extrinsic Table Attributes //
866 
867 
868  // ===> Attribute antennaId
869 
870 
871 
872  Tag antennaId;
873 
874 
875 
876 
877 
878 
879  // ===> Attribute feedId
880 
881 
882 
883  int feedId;
884 
885 
886 
887 
888 
889 
890  // ===> Attribute spectralWindowId
891 
892 
893 
895 
896 
897 
898 
899 
901  // Links //
903 
904 
905 
906 
907 
908 
909 
910 
911 
912 
913 
914 
915 
916 
917 
918 
919 
920 
921 
922 
923 
924 
925 /*
927  // binary-deserialization material from an EndianIStream //
929  std::map<std::string, CalDeviceAttributeFromBin> fromBinMethods;
930 void antennaIdFromBin( EndianIStream& eis);
931 void spectralWindowIdFromBin( EndianIStream& eis);
932 void timeIntervalFromBin( EndianIStream& eis);
933 void feedIdFromBin( EndianIStream& eis);
934 void numCalloadFromBin( EndianIStream& eis);
935 void calLoadNamesFromBin( EndianIStream& eis);
936 
937 void numReceptorFromBin( EndianIStream& eis);
938 void calEffFromBin( EndianIStream& eis);
939 void noiseCalFromBin( EndianIStream& eis);
940 void coupledNoiseCalFromBin( EndianIStream& eis);
941 void temperatureLoadFromBin( EndianIStream& eis);
942 
943 */
944 
946  // text-deserialization material //
948  std::map<std::string, CalDeviceAttributeFromText> fromTextMethods;
949 
950 void antennaIdFromText (const std::string & s);
951 
952 
953 void spectralWindowIdFromText (const std::string & s);
954 
955 
956 void timeIntervalFromText (const std::string & s);
957 
958 
959 void feedIdFromText (const std::string & s);
960 
961 
962 void numCalloadFromText (const std::string & s);
963 
964 
965 void calLoadNamesFromText (const std::string & s);
966 
967 
968 
969 void numReceptorFromText (const std::string & s);
970 
971 
972 void calEffFromText (const std::string & s);
973 
974 
975 void noiseCalFromText (const std::string & s);
976 
977 
978 void coupledNoiseCalFromText (const std::string & s);
979 
980 
981 void temperatureLoadFromText (const std::string & s);
982 
983 
984 
989  void toBin(EndianOSStream& eoss);
990 
1000 };
1001 
1002 } // End namespace asdm
1003 
1004 #endif /* CalDevice_CLASS */
virtual ~CalDeviceRow()
friend class asdm::TableStreamReader&lt;CalDeviceTable, CalDeviceRow&gt;;
The CalDeviceRow class is a row of a CalDeviceTable.
Definition: CalDeviceRow.h:121
Links *binary deserialization material from an EndianIStream std::map< std::string, CalDeviceAttributeFromBin > fromBinMethods
Definition: CalDeviceRow.h:929
int getNumCalload() const
===&gt; Attribute numCalload
void numReceptorFromText(const std::string &s)
void setFromXML(std::string rowDoc)
Fill the values of this row from an XML string that was produced by the toXML() method.
std::string toXML() const
Return this row in the form of an XML string.
std::vector< std::vector< float > > calEff
Definition: CalDeviceRow.h:818
The ArrayTimeInterval class aggregates an instance of ArrayTime and an instance of Interval...
void calEffFromBin(EndianIStream &eis)
void numReceptorFromBin(EndianIStream &eis)
*text deserialization material std::map< std::string, CalDeviceAttributeFromText > fromTextMethods
Definition: CalDeviceRow.h:948
bool isAdded() const
Has this row been added to its table ?
void clearCoupledNoiseCal()
Mark coupledNoiseCal, which is an optional field, as non-existent.
void setCoupledNoiseCal(std::vector< std::vector< float > > coupledNoiseCal)
Set coupledNoiseCal with the specified std::vector&lt;std::vector&lt;float &gt; &gt;.
bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numCalload, std::vector< CalibrationDeviceMod::CalibrationDevice > calLoadNames)
Compare each mandatory attribute except the autoincrementable one of this CalDeviceRow with the corre...
CalDeviceTable & getTable() const
Return the table to which this row belongs.
std::vector< double > getNoiseCal() const
Get noiseCal, which is optional.
bool isCalEffExists() const
===&gt; Attribute calEff, which is optional
void antennaIdFromText(const std::string &s)
void spectralWindowIdFromText(const std::string &s)
void setCalEff(std::vector< std::vector< float > > calEff)
Set calEff with the specified std::vector&lt;std::vector&lt;float &gt; &gt;.
bool coupledNoiseCalExists
===&gt; Attribute coupledNoiseCal, which is optional
Definition: CalDeviceRow.h:841
bool equalByRequiredValue(CalDeviceRow *x)
Return true if all required attributes of the value part are equal to their homologues in x and false...
void feedIdFromBin(EndianIStream &eis)
bool compareRequiredValue(int numCalload, std::vector< CalibrationDeviceMod::CalibrationDevice > calLoadNames)
Compare each mandatory value (i.e.
void coupledNoiseCalFromBin(EndianIStream &eis)
void spectralWindowIdFromBin(EndianIStream &eis)
bool isTemperatureLoadExists() const
===&gt; Attribute temperatureLoad, which is optional
void toBin(EndianOSStream &eoss)
Serialize this into a stream of bytes written to an EndianOSStream.
void setTemperatureLoad(std::vector< Temperature > temperatureLoad)
Set temperatureLoad with the specified std::vector&lt;Temperature &gt;.
std::vector< std::vector< float > > coupledNoiseCal
Definition: CalDeviceRow.h:844
std::vector< double > noiseCal
Definition: CalDeviceRow.h:831
void setFromIDL(asdmIDL::CalDeviceRowIDL x)
Fill the values of this row from the IDL struct CalDeviceRowIDL.
Tag getSpectralWindowId() const
===&gt; Attribute spectralWindowId
int getFeedId() const
===&gt; Attribute feedId
void setNumReceptor(int numReceptor)
Set numReceptor with the specified int.
void timeIntervalFromText(const std::string &s)
Links *AntennaRow * getAntennaUsingAntennaId()
antennaId pointer to the row in the Antenna table having Antenna.antennaId == antennaId ...
void setTimeInterval(ArrayTimeInterval timeInterval)
Set timeInterval with the specified ArrayTimeInterval.
std::vector< FeedRow * > getFeeds()
===&gt; Slice link from a row of CalDevice table to a collection of row of Feed table.
CalDeviceTable & table
The table to which this row belongs.
Definition: CalDeviceRow.h:722
void setSpectralWindowId(Tag spectralWindowId)
Set spectralWindowId with the specified Tag.
bool hasBeenAdded
Whether this row has been added to the table or not.
Definition: CalDeviceRow.h:726
void timeIntervalFromBin(EndianIStream &eis)
int getNumReceptor() const
Get numReceptor, which is optional.
std::vector< Temperature > temperatureLoad
Definition: CalDeviceRow.h:857
The AntennaRow class is a row of a AntennaTable.
Definition: AntennaRow.h:120
bool isCoupledNoiseCalExists() const
===&gt; Attribute coupledNoiseCal, which is optional
void noiseCalFromBin(EndianIStream &eis)
bool noiseCalExists
===&gt; Attribute noiseCal, which is optional
Definition: CalDeviceRow.h:828
void calEffFromText(const std::string &s)
void setNoiseCal(std::vector< double > noiseCal)
Set noiseCal with the specified std::vector&lt;double &gt;.
std::vector< std::vector< float > > getCoupledNoiseCal() const
Get coupledNoiseCal, which is optional.
void(CalDeviceRow::* CalDeviceAttributeFromText)(const std::string &s)
Definition: CalDeviceRow.h:113
bool temperatureLoadExists
===&gt; Attribute temperatureLoad, which is optional
Definition: CalDeviceRow.h:854
int numCalload
===&gt; Attribute numCalload
Definition: CalDeviceRow.h:781
void setCalLoadNames(std::vector< CalibrationDeviceMod::CalibrationDevice > calLoadNames)
Set calLoadNames with the specified std::vector&lt;CalibrationDeviceMod::CalibrationDevice &gt;...
std::vector< CalibrationDeviceMod::CalibrationDevice > calLoadNames
===&gt; Attribute calLoadNames
Definition: CalDeviceRow.h:792
The Tag class is an implementation of a unique index identifying a row of an ASDM table...
Definition: Tag.h:73
The CalDeviceTable class is an Alma table.
void noiseCalFromText(const std::string &s)
void antennaIdFromBin(EndianIStream &eis)
int feedId
===&gt; Attribute feedId
Definition: CalDeviceRow.h:883
bool isNumReceptorExists() const
===&gt; Attribute numReceptor, which is optional
void temperatureLoadFromBin(EndianIStream &eis)
std::vector< Temperature > getTemperatureLoad() const
Get temperatureLoad, which is optional.
void calLoadNamesFromBin(EndianIStream &eis)
Tag spectralWindowId
===&gt; Attribute spectralWindowId
Definition: CalDeviceRow.h:894
void clearTemperatureLoad()
Mark temperatureLoad, which is an optional field, as non-existent.
void clearCalEff()
Mark calEff, which is an optional field, as non-existent.
void(CalDeviceRow::* CalDeviceAttributeFromBin)(EndianIStream &eis)
Definition: CalDeviceRow.h:112
std::vector< std::vector< float > > getCalEff() const
Get calEff, which is optional.
std::vector< CalibrationDeviceMod::CalibrationDevice > getCalLoadNames() const
===&gt; Attribute calLoadNames
SpectralWindowRow * getSpectralWindowUsingSpectralWindowId()
spectralWindowId pointer to the row in the SpectralWindow table having SpectralWindow.spectralWindowId == spectralWindowId
void calLoadNamesFromText(const std::string &s)
CalDeviceRow(CalDeviceTable &table)
Create a CalDeviceRow.
The SpectralWindowRow class is a row of a SpectralWindowTable.
void numCalloadFromBin(EndianIStream &eis)
void clearNoiseCal()
Mark noiseCal, which is an optional field, as non-existent.
bool isNoiseCalExists() const
===&gt; Attribute noiseCal, which is optional
bool calEffExists
===&gt; Attribute calEff, which is optional
Definition: CalDeviceRow.h:815
void setFeedId(int feedId)
Set feedId with the specified int.
void temperatureLoadFromText(const std::string &s)
void feedIdFromText(const std::string &s)
void setAntennaId(Tag antennaId)
Set antennaId with the specified Tag.
bool numReceptorExists
===&gt; Attribute numReceptor, which is optional
Definition: CalDeviceRow.h:802
asdmIDL::CalDeviceRowIDL * toIDL() const
Return this row in the form of an IDL struct.
void clearNumReceptor()
Mark numReceptor, which is an optional field, as non-existent.
void setNumCalload(int numCalload)
Set numCalload with the specified int.
void coupledNoiseCalFromText(const std::string &s)
void numCalloadFromText(const std::string &s)