casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalPositionRow.h
Go to the documentation of this file.
00001 
00002 /*
00003  * ALMA - Atacama Large Millimeter Array
00004  * (c) European Southern Observatory, 2002
00005  * (c) Associated Universities Inc., 2002
00006  * Copyright by ESO (in the framework of the ALMA collaboration),
00007  * Copyright by AUI (in the framework of the ALMA collaboration),
00008  * All rights reserved.
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  * 
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY, without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00023  * MA 02111-1307  USA
00024  *
00025  * Warning!
00026  *  -------------------------------------------------------------------- 
00027  * | This is generated code!  Do not modify this file.                  |
00028  * | If you do, all changes will be lost when the file is re-generated. |
00029  *  --------------------------------------------------------------------
00030  *
00031  * File CalPositionRow.h
00032  */
00033  
00034 #ifndef CalPositionRow_CLASS
00035 #define CalPositionRow_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 <Angle.h>
00056         
00057 
00058          
00059 #include <Tag.h>
00060         
00061 
00062          
00063 #include <Length.h>
00064         
00065 
00066 
00067 
00068 
00069         
00070 
00071         
00072 #include "CAtmPhaseCorrection.h"
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 #include "CPositionMethod.h"
00087         
00088 
00089         
00090 #include "CReceiverBand.h"
00091         
00092 
00093         
00094 
00095         
00096 
00097         
00098 
00099         
00100 
00101         
00102 
00103         
00104 
00105         
00106 
00107         
00108 
00109         
00110 
00111         
00112 
00113 
00114 
00115 #include <ConversionException.h>
00116 #include <NoSuchRow.h>
00117 #include <IllegalAccessException.h>
00118 
00119 #include <RowTransformer.h>
00120 //#include <TableStreamReader.h>
00121 
00122 /*\file CalPosition.h
00123     \brief Generated from model's revision "1.61", branch "HEAD"
00124 */
00125 
00126 namespace asdm {
00127 
00128 //class asdm::CalPositionTable;
00129 
00130 
00131 // class asdm::CalDataRow;
00132 class CalDataRow;
00133 
00134 // class asdm::CalReductionRow;
00135 class CalReductionRow;
00136         
00137 
00138 class CalPositionRow;
00139 typedef void (CalPositionRow::*CalPositionAttributeFromBin) (EndianIStream& eis);
00140 typedef void (CalPositionRow::*CalPositionAttributeFromText) (const string& s);
00141 
00148 class CalPositionRow {
00149 friend class asdm::CalPositionTable;
00150 friend class asdm::RowTransformer<CalPositionRow>;
00151 //friend class asdm::TableStreamReader<CalPositionTable, CalPositionRow>;
00152 
00153 public:
00154 
00155         virtual ~CalPositionRow();
00156 
00160         CalPositionTable &getTable() const;
00161         
00166         bool isAdded() const;
00167                 
00169         // Intrinsic Table Attributes //
00171         
00172         
00173         // ===> Attribute antennaName
00174         
00175         
00176         
00177 
00178         
00183         string getAntennaName() const;
00184         
00185  
00186         
00187         
00197         void setAntennaName (string antennaName);
00198                 
00199         
00200         
00201         
00202 
00203 
00204         
00205         // ===> Attribute atmPhaseCorrection
00206         
00207         
00208         
00209 
00210         
00215         AtmPhaseCorrectionMod::AtmPhaseCorrection getAtmPhaseCorrection() const;
00216         
00217  
00218         
00219         
00229         void setAtmPhaseCorrection (AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection);
00230                 
00231         
00232         
00233         
00234 
00235 
00236         
00237         // ===> Attribute startValidTime
00238         
00239         
00240         
00241 
00242         
00247         ArrayTime getStartValidTime() const;
00248         
00249  
00250         
00251         
00259         void setStartValidTime (ArrayTime startValidTime);
00260                 
00261         
00262         
00263         
00264 
00265 
00266         
00267         // ===> Attribute endValidTime
00268         
00269         
00270         
00271 
00272         
00277         ArrayTime getEndValidTime() const;
00278         
00279  
00280         
00281         
00289         void setEndValidTime (ArrayTime endValidTime);
00290                 
00291         
00292         
00293         
00294 
00295 
00296         
00297         // ===> Attribute antennaPosition
00298         
00299         
00300         
00301 
00302         
00307         vector<Length > getAntennaPosition() const;
00308         
00309  
00310         
00311         
00319         void setAntennaPosition (vector<Length > antennaPosition);
00320                 
00321         
00322         
00323         
00324 
00325 
00326         
00327         // ===> Attribute stationName
00328         
00329         
00330         
00331 
00332         
00337         string getStationName() const;
00338         
00339  
00340         
00341         
00349         void setStationName (string stationName);
00350                 
00351         
00352         
00353         
00354 
00355 
00356         
00357         // ===> Attribute stationPosition
00358         
00359         
00360         
00361 
00362         
00367         vector<Length > getStationPosition() const;
00368         
00369  
00370         
00371         
00379         void setStationPosition (vector<Length > stationPosition);
00380                 
00381         
00382         
00383         
00384 
00385 
00386         
00387         // ===> Attribute positionMethod
00388         
00389         
00390         
00391 
00392         
00397         PositionMethodMod::PositionMethod getPositionMethod() const;
00398         
00399  
00400         
00401         
00409         void setPositionMethod (PositionMethodMod::PositionMethod positionMethod);
00410                 
00411         
00412         
00413         
00414 
00415 
00416         
00417         // ===> Attribute receiverBand
00418         
00419         
00420         
00421 
00422         
00427         ReceiverBandMod::ReceiverBand getReceiverBand() const;
00428         
00429  
00430         
00431         
00439         void setReceiverBand (ReceiverBandMod::ReceiverBand receiverBand);
00440                 
00441         
00442         
00443         
00444 
00445 
00446         
00447         // ===> Attribute numAntenna
00448         
00449         
00450         
00451 
00452         
00457         int getNumAntenna() const;
00458         
00459  
00460         
00461         
00469         void setNumAntenna (int numAntenna);
00470                 
00471         
00472         
00473         
00474 
00475 
00476         
00477         // ===> Attribute refAntennaNames
00478         
00479         
00480         
00481 
00482         
00487         vector<string > getRefAntennaNames() const;
00488         
00489  
00490         
00491         
00499         void setRefAntennaNames (vector<string > refAntennaNames);
00500                 
00501         
00502         
00503         
00504 
00505 
00506         
00507         // ===> Attribute axesOffset
00508         
00509         
00510         
00511 
00512         
00517         Length getAxesOffset() const;
00518         
00519  
00520         
00521         
00529         void setAxesOffset (Length axesOffset);
00530                 
00531         
00532         
00533         
00534 
00535 
00536         
00537         // ===> Attribute axesOffsetErr
00538         
00539         
00540         
00541 
00542         
00547         Length getAxesOffsetErr() const;
00548         
00549  
00550         
00551         
00559         void setAxesOffsetErr (Length axesOffsetErr);
00560                 
00561         
00562         
00563         
00564 
00565 
00566         
00567         // ===> Attribute axesOffsetFixed
00568         
00569         
00570         
00571 
00572         
00577         bool getAxesOffsetFixed() const;
00578         
00579  
00580         
00581         
00589         void setAxesOffsetFixed (bool axesOffsetFixed);
00590                 
00591         
00592         
00593         
00594 
00595 
00596         
00597         // ===> Attribute positionOffset
00598         
00599         
00600         
00601 
00602         
00607         vector<Length > getPositionOffset() const;
00608         
00609  
00610         
00611         
00619         void setPositionOffset (vector<Length > positionOffset);
00620                 
00621         
00622         
00623         
00624 
00625 
00626         
00627         // ===> Attribute positionErr
00628         
00629         
00630         
00631 
00632         
00637         vector<Length > getPositionErr() const;
00638         
00639  
00640         
00641         
00649         void setPositionErr (vector<Length > positionErr);
00650                 
00651         
00652         
00653         
00654 
00655 
00656         
00657         // ===> Attribute reducedChiSquared
00658         
00659         
00660         
00661 
00662         
00667         double getReducedChiSquared() const;
00668         
00669  
00670         
00671         
00679         void setReducedChiSquared (double reducedChiSquared);
00680                 
00681         
00682         
00683         
00684 
00685 
00686         
00687         // ===> Attribute delayRms, which is optional
00688         
00689         
00690         
00695         bool isDelayRmsExists() const;
00696         
00697 
00698         
00704         double getDelayRms() const;
00705         
00706  
00707         
00708         
00715         void setDelayRms (double delayRms);
00716                 
00717         
00718         
00719         
00723         void clearDelayRms ();
00724         
00725 
00726 
00727         
00728         // ===> Attribute phaseRms, which is optional
00729         
00730         
00731         
00736         bool isPhaseRmsExists() const;
00737         
00738 
00739         
00745         Angle getPhaseRms() const;
00746         
00747  
00748         
00749         
00756         void setPhaseRms (Angle phaseRms);
00757                 
00758         
00759         
00760         
00764         void clearPhaseRms ();
00765         
00766 
00767 
00769         // Extrinsic Table Attributes //
00771         
00772         
00773         // ===> Attribute calDataId
00774         
00775         
00776         
00777 
00778         
00783         Tag getCalDataId() const;
00784         
00785  
00786         
00787         
00797         void setCalDataId (Tag calDataId);
00798                 
00799         
00800         
00801         
00802 
00803 
00804         
00805         // ===> Attribute calReductionId
00806         
00807         
00808         
00809 
00810         
00815         Tag getCalReductionId() const;
00816         
00817  
00818         
00819         
00829         void setCalReductionId (Tag calReductionId);
00830                 
00831         
00832         
00833         
00834 
00835 
00837         // Links //
00839         
00840         
00841 
00842         
00843                 
00850          CalDataRow* getCalDataUsingCalDataId();
00851          
00852 
00853         
00854 
00855         
00856 
00857         
00858                 
00865          CalReductionRow* getCalReductionUsingCalReductionId();
00866          
00867 
00868         
00869 
00870         
00871         
00872         
00916         bool compareNoAutoInc(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Length > antennaPosition, string stationName, vector<Length > stationPosition, PositionMethodMod::PositionMethod positionMethod, ReceiverBandMod::ReceiverBand receiverBand, int numAntenna, vector<string > refAntennaNames, Length axesOffset, Length axesOffsetErr, bool axesOffsetFixed, vector<Length > positionOffset, vector<Length > positionErr, double reducedChiSquared);
00917         
00918         
00919 
00920         
00956         bool compareRequiredValue(ArrayTime startValidTime, ArrayTime endValidTime, vector<Length > antennaPosition, string stationName, vector<Length > stationPosition, PositionMethodMod::PositionMethod positionMethod, ReceiverBandMod::ReceiverBand receiverBand, int numAntenna, vector<string > refAntennaNames, Length axesOffset, Length axesOffsetErr, bool axesOffsetFixed, vector<Length > positionOffset, vector<Length > positionErr, double reducedChiSquared); 
00957                  
00958         
00967         bool equalByRequiredValue(CalPositionRow* x) ;
00968         
00969 #ifndef WITHOUT_ACS
00970 
00974         asdmIDL::CalPositionRowIDL *toIDL() const;
00975 #endif
00976         
00977 #ifndef WITHOUT_ACS
00978 
00983         void setFromIDL (asdmIDL::CalPositionRowIDL x) ;
00984 #endif
00985         
00990         std::string toXML() const;
00991 
00998         void setFromXML (std::string rowDoc) ;
00999 
01002         // binary-deserialization material from an EndianIStream  //
01004 
01005         std::map<std::string, CalPositionAttributeFromBin> fromBinMethods;
01006 void antennaNameFromBin( EndianIStream& eis);
01007 void atmPhaseCorrectionFromBin( EndianIStream& eis);
01008 void calDataIdFromBin( EndianIStream& eis);
01009 void calReductionIdFromBin( EndianIStream& eis);
01010 void startValidTimeFromBin( EndianIStream& eis);
01011 void endValidTimeFromBin( EndianIStream& eis);
01012 void antennaPositionFromBin( EndianIStream& eis);
01013 void stationNameFromBin( EndianIStream& eis);
01014 void stationPositionFromBin( EndianIStream& eis);
01015 void positionMethodFromBin( EndianIStream& eis);
01016 void receiverBandFromBin( EndianIStream& eis);
01017 void numAntennaFromBin( EndianIStream& eis);
01018 void refAntennaNamesFromBin( EndianIStream& eis);
01019 void axesOffsetFromBin( EndianIStream& eis);
01020 void axesOffsetErrFromBin( EndianIStream& eis);
01021 void axesOffsetFixedFromBin( EndianIStream& eis);
01022 void positionOffsetFromBin( EndianIStream& eis);
01023 void positionErrFromBin( EndianIStream& eis);
01024 void reducedChiSquaredFromBin( EndianIStream& eis);
01025 
01026 void delayRmsFromBin( EndianIStream& eis);
01027 void phaseRmsFromBin( EndianIStream& eis);
01028 
01029 
01037          static CalPositionRow* fromBin(EndianIStream& eis, CalPositionTable& table, const std::vector<std::string>& attributesSeq);     
01039 
01040 private:
01044         CalPositionTable &table;
01048         bool hasBeenAdded;
01049 
01050         // This method is used by the Table class when this row is added to the table.
01051         void isAdded(bool added);
01052 
01053 
01062         CalPositionRow (CalPositionTable &table);
01063 
01081          CalPositionRow (CalPositionTable &table, CalPositionRow &row);
01082                 
01084         // Intrinsic Table Attributes //
01086         
01087         
01088         // ===> Attribute antennaName
01089         
01090         
01091 
01092         string antennaName;
01093 
01094         
01095         
01096         
01097 
01098         
01099         // ===> Attribute atmPhaseCorrection
01100         
01101         
01102 
01103         AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection;
01104 
01105         
01106         
01107         
01108 
01109         
01110         // ===> Attribute startValidTime
01111         
01112         
01113 
01114         ArrayTime startValidTime;
01115 
01116         
01117         
01118         
01119 
01120         
01121         // ===> Attribute endValidTime
01122         
01123         
01124 
01125         ArrayTime endValidTime;
01126 
01127         
01128         
01129         
01130 
01131         
01132         // ===> Attribute antennaPosition
01133         
01134         
01135 
01136         vector<Length > antennaPosition;
01137 
01138         
01139         
01140         
01141 
01142         
01143         // ===> Attribute stationName
01144         
01145         
01146 
01147         string stationName;
01148 
01149         
01150         
01151         
01152 
01153         
01154         // ===> Attribute stationPosition
01155         
01156         
01157 
01158         vector<Length > stationPosition;
01159 
01160         
01161         
01162         
01163 
01164         
01165         // ===> Attribute positionMethod
01166         
01167         
01168 
01169         PositionMethodMod::PositionMethod positionMethod;
01170 
01171         
01172         
01173         
01174 
01175         
01176         // ===> Attribute receiverBand
01177         
01178         
01179 
01180         ReceiverBandMod::ReceiverBand receiverBand;
01181 
01182         
01183         
01184         
01185 
01186         
01187         // ===> Attribute numAntenna
01188         
01189         
01190 
01191         int numAntenna;
01192 
01193         
01194         
01195         
01196 
01197         
01198         // ===> Attribute refAntennaNames
01199         
01200         
01201 
01202         vector<string > refAntennaNames;
01203 
01204         
01205         
01206         
01207 
01208         
01209         // ===> Attribute axesOffset
01210         
01211         
01212 
01213         Length axesOffset;
01214 
01215         
01216         
01217         
01218 
01219         
01220         // ===> Attribute axesOffsetErr
01221         
01222         
01223 
01224         Length axesOffsetErr;
01225 
01226         
01227         
01228         
01229 
01230         
01231         // ===> Attribute axesOffsetFixed
01232         
01233         
01234 
01235         bool axesOffsetFixed;
01236 
01237         
01238         
01239         
01240 
01241         
01242         // ===> Attribute positionOffset
01243         
01244         
01245 
01246         vector<Length > positionOffset;
01247 
01248         
01249         
01250         
01251 
01252         
01253         // ===> Attribute positionErr
01254         
01255         
01256 
01257         vector<Length > positionErr;
01258 
01259         
01260         
01261         
01262 
01263         
01264         // ===> Attribute reducedChiSquared
01265         
01266         
01267 
01268         double reducedChiSquared;
01269 
01270         
01271         
01272         
01273 
01274         
01275         // ===> Attribute delayRms, which is optional
01276         
01277         
01278         bool delayRmsExists;
01279         
01280 
01281         double delayRms;
01282 
01283         
01284         
01285         
01286 
01287         
01288         // ===> Attribute phaseRms, which is optional
01289         
01290         
01291         bool phaseRmsExists;
01292         
01293 
01294         Angle phaseRms;
01295 
01296         
01297         
01298         
01299 
01301         // Extrinsic Table Attributes //
01303         
01304         
01305         // ===> Attribute calDataId
01306         
01307         
01308 
01309         Tag calDataId;
01310 
01311         
01312         
01313         
01314 
01315         
01316         // ===> Attribute calReductionId
01317         
01318         
01319 
01320         Tag calReductionId;
01321 
01322         
01323         
01324         
01325 
01327         // Links //
01329         
01330         
01331                 
01332 
01333          
01334 
01335         
01336 
01337         
01338                 
01339 
01340          
01341 
01342         
01343 
01344         
01345 /*
01347         // binary-deserialization material from an EndianIStream  //
01349         std::map<std::string, CalPositionAttributeFromBin> fromBinMethods;
01350 void antennaNameFromBin( EndianIStream& eis);
01351 void atmPhaseCorrectionFromBin( EndianIStream& eis);
01352 void calDataIdFromBin( EndianIStream& eis);
01353 void calReductionIdFromBin( EndianIStream& eis);
01354 void startValidTimeFromBin( EndianIStream& eis);
01355 void endValidTimeFromBin( EndianIStream& eis);
01356 void antennaPositionFromBin( EndianIStream& eis);
01357 void stationNameFromBin( EndianIStream& eis);
01358 void stationPositionFromBin( EndianIStream& eis);
01359 void positionMethodFromBin( EndianIStream& eis);
01360 void receiverBandFromBin( EndianIStream& eis);
01361 void numAntennaFromBin( EndianIStream& eis);
01362 void refAntennaNamesFromBin( EndianIStream& eis);
01363 void axesOffsetFromBin( EndianIStream& eis);
01364 void axesOffsetErrFromBin( EndianIStream& eis);
01365 void axesOffsetFixedFromBin( EndianIStream& eis);
01366 void positionOffsetFromBin( EndianIStream& eis);
01367 void positionErrFromBin( EndianIStream& eis);
01368 void reducedChiSquaredFromBin( EndianIStream& eis);
01369 
01370 void delayRmsFromBin( EndianIStream& eis);
01371 void phaseRmsFromBin( EndianIStream& eis);
01372 
01373 */
01374         
01376         // text-deserialization material //
01378         std::map<std::string, CalPositionAttributeFromText> fromTextMethods;
01379         
01380 void antennaNameFromText (const string & s);
01381         
01382         
01383 void atmPhaseCorrectionFromText (const string & s);
01384         
01385         
01386 void calDataIdFromText (const string & s);
01387         
01388         
01389 void calReductionIdFromText (const string & s);
01390         
01391         
01392 void startValidTimeFromText (const string & s);
01393         
01394         
01395 void endValidTimeFromText (const string & s);
01396         
01397         
01398 void antennaPositionFromText (const string & s);
01399         
01400         
01401 void stationNameFromText (const string & s);
01402         
01403         
01404 void stationPositionFromText (const string & s);
01405         
01406         
01407 void positionMethodFromText (const string & s);
01408         
01409         
01410 void receiverBandFromText (const string & s);
01411         
01412         
01413 void numAntennaFromText (const string & s);
01414         
01415         
01416 void refAntennaNamesFromText (const string & s);
01417         
01418         
01419 void axesOffsetFromText (const string & s);
01420         
01421         
01422 void axesOffsetErrFromText (const string & s);
01423         
01424         
01425 void axesOffsetFixedFromText (const string & s);
01426         
01427         
01428 void positionOffsetFromText (const string & s);
01429         
01430         
01431 void positionErrFromText (const string & s);
01432         
01433         
01434 void reducedChiSquaredFromText (const string & s);
01435         
01436 
01437         
01438 void delayRmsFromText (const string & s);
01439         
01440         
01441 void phaseRmsFromText (const string & s);
01442         
01443         
01444         
01445         void fromText(const std::string& attributeName, const std::string&  t);
01446         
01451          void toBin(EndianOSStream& eoss);
01452                  
01462 };
01463 
01464 } // End namespace asdm
01465 
01466 #endif /* CalPosition_CLASS */