AntennaRecord.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SINGLEDISH_FILLER_ANTENNARECORD_H_
00009 #define SINGLEDISH_FILLER_ANTENNARECORD_H_
00010
00011 #include <casacore/casa/BasicSL/String.h>
00012 #include <casacore/measures/Measures/MPosition.h>
00013 #include <casacore/ms/MeasurementSets/MSAntenna.h>
00014 #include <casacore/ms/MeasurementSets/MSAntennaColumns.h>
00015
00016 namespace casa {
00017 namespace sdfiller {
00018
00019 struct AntennaRecord {
00020 typedef MSAntenna AssociatingTable;
00021 typedef MSAntennaColumns AssociatingColumns;
00022
00023
00024 String name;
00025 MPosition position;
00026 String type;
00027 String mount;
00028 Double dish_diameter;
00029
00030
00031 String station;
00032 MPosition offset;
00033
00034
00035 void clear() {
00036 name = "";
00037 position = MPosition();
00038 type = "";
00039 mount = "";
00040 dish_diameter = -1.0;
00041 station = "";
00042 offset = MPosition();
00043 }
00044
00045 AntennaRecord &operator=(AntennaRecord const &other) {
00046 name = other.name;
00047 position = other.position;
00048 type = other.type;
00049 mount = other.mount;
00050 dish_diameter = other.dish_diameter;
00051 station = other.station;
00052 offset = other.offset;
00053 return *this;
00054 }
00055
00056 void add(AssociatingTable &table, AssociatingColumns &) {
00057 table.addRow(1, True);
00058 }
00059
00060 Bool fill(uInt irow, AssociatingColumns &columns) {
00061 if (columns.nrow() <= irow) {
00062 return False;
00063 }
00064
00065 columns.name().put(irow, name);
00066 columns.positionMeas().put(irow, position);
00067 columns.type().put(irow, type);
00068 columns.mount().put(irow, mount);
00069 columns.dishDiameter().put(irow, dish_diameter);
00070 if (station.size() > 0) {
00071 columns.station().put(irow, station);
00072 }
00073 if (anyNE(offset.getAngle().getValue(), 0.0)) {
00074 columns.offsetMeas().put(irow, offset);
00075 }
00076 return True;
00077 }
00078 };
00079
00080 }
00081 }
00082
00083 #endif