casa  $Rev:20696$
CalDelayRow.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 CalDelayRow.h
00032  */
00033  
00034 #ifndef CalDelayRow_CLASS
00035 #define CalDelayRow_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 <Frequency.h>
00064         
00065 
00066 
00067 
00068 
00069         
00070 
00071         
00072 #include "CAtmPhaseCorrection.h"
00073         
00074 
00075         
00076 #include "CBasebandName.h"
00077         
00078 
00079         
00080 #include "CReceiverBand.h"
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 #include "CPolarizationType.h"
00097         
00098 
00099         
00100 
00101         
00102 
00103         
00104 
00105         
00106 
00107         
00108 
00109         
00110 
00111         
00112 
00113         
00114 #include "CReceiverSideband.h"
00115         
00116 
00117 
00118 
00119 #include <ConversionException.h>
00120 #include <NoSuchRow.h>
00121 #include <IllegalAccessException.h>
00122 
00123 #include <RowTransformer.h>
00124 //#include <TableStreamReader.h>
00125 
00126 /*\file CalDelay.h
00127     \brief Generated from model's revision "1.62", branch "HEAD"
00128 */
00129 
00130 namespace asdm {
00131 
00132 //class asdm::CalDelayTable;
00133 
00134 
00135 // class asdm::CalDataRow;
00136 class CalDataRow;
00137 
00138 // class asdm::CalReductionRow;
00139 class CalReductionRow;
00140         
00141 
00142 class CalDelayRow;
00143 typedef void (CalDelayRow::*CalDelayAttributeFromBin) (EndianIStream& eis);
00144 typedef void (CalDelayRow::*CalDelayAttributeFromText) (const string& s);
00145 
00152 class CalDelayRow {
00153 friend class asdm::CalDelayTable;
00154 friend class asdm::RowTransformer<CalDelayRow>;
00155 //friend class asdm::TableStreamReader<CalDelayTable, CalDelayRow>;
00156 
00157 public:
00158 
00159         virtual ~CalDelayRow();
00160 
00164         CalDelayTable &getTable() const;
00165         
00170         bool isAdded() const;
00171                 
00173         // Intrinsic Table Attributes //
00175         
00176         
00177         // ===> Attribute antennaName
00178         
00179         
00180         
00181 
00182         
00187         string getAntennaName() const;
00188         
00189  
00190         
00191         
00201         void setAntennaName (string antennaName);
00202                 
00203         
00204         
00205         
00206 
00207 
00208         
00209         // ===> Attribute atmPhaseCorrection
00210         
00211         
00212         
00213 
00214         
00219         AtmPhaseCorrectionMod::AtmPhaseCorrection getAtmPhaseCorrection() const;
00220         
00221  
00222         
00223         
00233         void setAtmPhaseCorrection (AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection);
00234                 
00235         
00236         
00237         
00238 
00239 
00240         
00241         // ===> Attribute basebandName
00242         
00243         
00244         
00245 
00246         
00251         BasebandNameMod::BasebandName getBasebandName() const;
00252         
00253  
00254         
00255         
00265         void setBasebandName (BasebandNameMod::BasebandName basebandName);
00266                 
00267         
00268         
00269         
00270 
00271 
00272         
00273         // ===> Attribute receiverBand
00274         
00275         
00276         
00277 
00278         
00283         ReceiverBandMod::ReceiverBand getReceiverBand() const;
00284         
00285  
00286         
00287         
00297         void setReceiverBand (ReceiverBandMod::ReceiverBand receiverBand);
00298                 
00299         
00300         
00301         
00302 
00303 
00304         
00305         // ===> Attribute startValidTime
00306         
00307         
00308         
00309 
00310         
00315         ArrayTime getStartValidTime() const;
00316         
00317  
00318         
00319         
00327         void setStartValidTime (ArrayTime startValidTime);
00328                 
00329         
00330         
00331         
00332 
00333 
00334         
00335         // ===> Attribute endValidTime
00336         
00337         
00338         
00339 
00340         
00345         ArrayTime getEndValidTime() const;
00346         
00347  
00348         
00349         
00357         void setEndValidTime (ArrayTime endValidTime);
00358                 
00359         
00360         
00361         
00362 
00363 
00364         
00365         // ===> Attribute refAntennaName
00366         
00367         
00368         
00369 
00370         
00375         string getRefAntennaName() const;
00376         
00377  
00378         
00379         
00387         void setRefAntennaName (string refAntennaName);
00388                 
00389         
00390         
00391         
00392 
00393 
00394         
00395         // ===> Attribute numReceptor
00396         
00397         
00398         
00399 
00400         
00405         int getNumReceptor() const;
00406         
00407  
00408         
00409         
00417         void setNumReceptor (int numReceptor);
00418                 
00419         
00420         
00421         
00422 
00423 
00424         
00425         // ===> Attribute delayError
00426         
00427         
00428         
00429 
00430         
00435         vector<double > getDelayError() const;
00436         
00437  
00438         
00439         
00447         void setDelayError (vector<double > delayError);
00448                 
00449         
00450         
00451         
00452 
00453 
00454         
00455         // ===> Attribute delayOffset
00456         
00457         
00458         
00459 
00460         
00465         vector<double > getDelayOffset() const;
00466         
00467  
00468         
00469         
00477         void setDelayOffset (vector<double > delayOffset);
00478                 
00479         
00480         
00481         
00482 
00483 
00484         
00485         // ===> Attribute polarizationTypes
00486         
00487         
00488         
00489 
00490         
00495         vector<PolarizationTypeMod::PolarizationType > getPolarizationTypes() const;
00496         
00497  
00498         
00499         
00507         void setPolarizationTypes (vector<PolarizationTypeMod::PolarizationType > polarizationTypes);
00508                 
00509         
00510         
00511         
00512 
00513 
00514         
00515         // ===> Attribute reducedChiSquared
00516         
00517         
00518         
00519 
00520         
00525         vector<double > getReducedChiSquared() const;
00526         
00527  
00528         
00529         
00537         void setReducedChiSquared (vector<double > reducedChiSquared);
00538                 
00539         
00540         
00541         
00542 
00543 
00544         
00545         // ===> Attribute appliedDelay
00546         
00547         
00548         
00549 
00550         
00555         vector<double > getAppliedDelay() const;
00556         
00557  
00558         
00559         
00567         void setAppliedDelay (vector<double > appliedDelay);
00568                 
00569         
00570         
00571         
00572 
00573 
00574         
00575         // ===> Attribute crossDelayOffset, which is optional
00576         
00577         
00578         
00583         bool isCrossDelayOffsetExists() const;
00584         
00585 
00586         
00592         double getCrossDelayOffset() const;
00593         
00594  
00595         
00596         
00603         void setCrossDelayOffset (double crossDelayOffset);
00604                 
00605         
00606         
00607         
00611         void clearCrossDelayOffset ();
00612         
00613 
00614 
00615         
00616         // ===> Attribute crossDelayOffsetError, which is optional
00617         
00618         
00619         
00624         bool isCrossDelayOffsetErrorExists() const;
00625         
00626 
00627         
00633         double getCrossDelayOffsetError() const;
00634         
00635  
00636         
00637         
00644         void setCrossDelayOffsetError (double crossDelayOffsetError);
00645                 
00646         
00647         
00648         
00652         void clearCrossDelayOffsetError ();
00653         
00654 
00655 
00656         
00657         // ===> Attribute numSideband, which is optional
00658         
00659         
00660         
00665         bool isNumSidebandExists() const;
00666         
00667 
00668         
00674         int getNumSideband() const;
00675         
00676  
00677         
00678         
00685         void setNumSideband (int numSideband);
00686                 
00687         
00688         
00689         
00693         void clearNumSideband ();
00694         
00695 
00696 
00697         
00698         // ===> Attribute refFreq, which is optional
00699         
00700         
00701         
00706         bool isRefFreqExists() const;
00707         
00708 
00709         
00715         vector<Frequency > getRefFreq() const;
00716         
00717  
00718         
00719         
00726         void setRefFreq (vector<Frequency > refFreq);
00727                 
00728         
00729         
00730         
00734         void clearRefFreq ();
00735         
00736 
00737 
00738         
00739         // ===> Attribute refFreqPhase, which is optional
00740         
00741         
00742         
00747         bool isRefFreqPhaseExists() const;
00748         
00749 
00750         
00756         vector<Angle > getRefFreqPhase() const;
00757         
00758  
00759         
00760         
00767         void setRefFreqPhase (vector<Angle > refFreqPhase);
00768                 
00769         
00770         
00771         
00775         void clearRefFreqPhase ();
00776         
00777 
00778 
00779         
00780         // ===> Attribute sidebands, which is optional
00781         
00782         
00783         
00788         bool isSidebandsExists() const;
00789         
00790 
00791         
00797         vector<ReceiverSidebandMod::ReceiverSideband > getSidebands() const;
00798         
00799  
00800         
00801         
00808         void setSidebands (vector<ReceiverSidebandMod::ReceiverSideband > sidebands);
00809                 
00810         
00811         
00812         
00816         void clearSidebands ();
00817         
00818 
00819 
00821         // Extrinsic Table Attributes //
00823         
00824         
00825         // ===> Attribute calDataId
00826         
00827         
00828         
00829 
00830         
00835         Tag getCalDataId() const;
00836         
00837  
00838         
00839         
00849         void setCalDataId (Tag calDataId);
00850                 
00851         
00852         
00853         
00854 
00855 
00856         
00857         // ===> Attribute calReductionId
00858         
00859         
00860         
00861 
00862         
00867         Tag getCalReductionId() const;
00868         
00869  
00870         
00871         
00881         void setCalReductionId (Tag calReductionId);
00882                 
00883         
00884         
00885         
00886 
00887 
00889         // Links //
00891         
00892         
00893 
00894         
00895                 
00902          CalDataRow* getCalDataUsingCalDataId();
00903          
00904 
00905         
00906 
00907         
00908 
00909         
00910                 
00917          CalReductionRow* getCalReductionUsingCalReductionId();
00918          
00919 
00920         
00921 
00922         
00923         
00924         
00960         bool compareNoAutoInc(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, BasebandNameMod::BasebandName basebandName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, string refAntennaName, int numReceptor, vector<double > delayError, vector<double > delayOffset, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<double > reducedChiSquared, vector<double > appliedDelay);
00961         
00962         
00963 
00964         
00988         bool compareRequiredValue(ArrayTime startValidTime, ArrayTime endValidTime, string refAntennaName, int numReceptor, vector<double > delayError, vector<double > delayOffset, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<double > reducedChiSquared, vector<double > appliedDelay); 
00989                  
00990         
00999         bool equalByRequiredValue(CalDelayRow* x) ;
01000         
01001 #ifndef WITHOUT_ACS
01002 
01006         asdmIDL::CalDelayRowIDL *toIDL() const;
01007 #endif
01008         
01009 #ifndef WITHOUT_ACS
01010 
01015         void setFromIDL (asdmIDL::CalDelayRowIDL x) ;
01016 #endif
01017         
01022         std::string toXML() const;
01023 
01030         void setFromXML (std::string rowDoc) ;
01031 
01034         // binary-deserialization material from an EndianIStream  //
01036 
01037         std::map<std::string, CalDelayAttributeFromBin> fromBinMethods;
01038 void antennaNameFromBin( EndianIStream& eis);
01039 void atmPhaseCorrectionFromBin( EndianIStream& eis);
01040 void basebandNameFromBin( EndianIStream& eis);
01041 void receiverBandFromBin( EndianIStream& eis);
01042 void calDataIdFromBin( EndianIStream& eis);
01043 void calReductionIdFromBin( EndianIStream& eis);
01044 void startValidTimeFromBin( EndianIStream& eis);
01045 void endValidTimeFromBin( EndianIStream& eis);
01046 void refAntennaNameFromBin( EndianIStream& eis);
01047 void numReceptorFromBin( EndianIStream& eis);
01048 void delayErrorFromBin( EndianIStream& eis);
01049 void delayOffsetFromBin( EndianIStream& eis);
01050 void polarizationTypesFromBin( EndianIStream& eis);
01051 void reducedChiSquaredFromBin( EndianIStream& eis);
01052 void appliedDelayFromBin( EndianIStream& eis);
01053 
01054 void crossDelayOffsetFromBin( EndianIStream& eis);
01055 void crossDelayOffsetErrorFromBin( EndianIStream& eis);
01056 void numSidebandFromBin( EndianIStream& eis);
01057 void refFreqFromBin( EndianIStream& eis);
01058 void refFreqPhaseFromBin( EndianIStream& eis);
01059 void sidebandsFromBin( EndianIStream& eis);
01060 
01061 
01069          static CalDelayRow* fromBin(EndianIStream& eis, CalDelayTable& table, const std::vector<std::string>& attributesSeq);   
01070  
01077          void fromText(const std::string& attributeName, const std::string&  t);
01079 
01080 private:
01084         CalDelayTable &table;
01088         bool hasBeenAdded;
01089 
01090         // This method is used by the Table class when this row is added to the table.
01091         void isAdded(bool added);
01092 
01093 
01102         CalDelayRow (CalDelayTable &table);
01103 
01121          CalDelayRow (CalDelayTable &table, CalDelayRow &row);
01122                 
01124         // Intrinsic Table Attributes //
01126         
01127         
01128         // ===> Attribute antennaName
01129         
01130         
01131 
01132         string antennaName;
01133 
01134         
01135         
01136         
01137 
01138         
01139         // ===> Attribute atmPhaseCorrection
01140         
01141         
01142 
01143         AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection;
01144 
01145         
01146         
01147         
01148 
01149         
01150         // ===> Attribute basebandName
01151         
01152         
01153 
01154         BasebandNameMod::BasebandName basebandName;
01155 
01156         
01157         
01158         
01159 
01160         
01161         // ===> Attribute receiverBand
01162         
01163         
01164 
01165         ReceiverBandMod::ReceiverBand receiverBand;
01166 
01167         
01168         
01169         
01170 
01171         
01172         // ===> Attribute startValidTime
01173         
01174         
01175 
01176         ArrayTime startValidTime;
01177 
01178         
01179         
01180         
01181 
01182         
01183         // ===> Attribute endValidTime
01184         
01185         
01186 
01187         ArrayTime endValidTime;
01188 
01189         
01190         
01191         
01192 
01193         
01194         // ===> Attribute refAntennaName
01195         
01196         
01197 
01198         string refAntennaName;
01199 
01200         
01201         
01202         
01203 
01204         
01205         // ===> Attribute numReceptor
01206         
01207         
01208 
01209         int numReceptor;
01210 
01211         
01212         
01213         
01214 
01215         
01216         // ===> Attribute delayError
01217         
01218         
01219 
01220         vector<double > delayError;
01221 
01222         
01223         
01224         
01225 
01226         
01227         // ===> Attribute delayOffset
01228         
01229         
01230 
01231         vector<double > delayOffset;
01232 
01233         
01234         
01235         
01236 
01237         
01238         // ===> Attribute polarizationTypes
01239         
01240         
01241 
01242         vector<PolarizationTypeMod::PolarizationType > polarizationTypes;
01243 
01244         
01245         
01246         
01247 
01248         
01249         // ===> Attribute reducedChiSquared
01250         
01251         
01252 
01253         vector<double > reducedChiSquared;
01254 
01255         
01256         
01257         
01258 
01259         
01260         // ===> Attribute appliedDelay
01261         
01262         
01263 
01264         vector<double > appliedDelay;
01265 
01266         
01267         
01268         
01269 
01270         
01271         // ===> Attribute crossDelayOffset, which is optional
01272         
01273         
01274         bool crossDelayOffsetExists;
01275         
01276 
01277         double crossDelayOffset;
01278 
01279         
01280         
01281         
01282 
01283         
01284         // ===> Attribute crossDelayOffsetError, which is optional
01285         
01286         
01287         bool crossDelayOffsetErrorExists;
01288         
01289 
01290         double crossDelayOffsetError;
01291 
01292         
01293         
01294         
01295 
01296         
01297         // ===> Attribute numSideband, which is optional
01298         
01299         
01300         bool numSidebandExists;
01301         
01302 
01303         int numSideband;
01304 
01305         
01306         
01307         
01308 
01309         
01310         // ===> Attribute refFreq, which is optional
01311         
01312         
01313         bool refFreqExists;
01314         
01315 
01316         vector<Frequency > refFreq;
01317 
01318         
01319         
01320         
01321 
01322         
01323         // ===> Attribute refFreqPhase, which is optional
01324         
01325         
01326         bool refFreqPhaseExists;
01327         
01328 
01329         vector<Angle > refFreqPhase;
01330 
01331         
01332         
01333         
01334 
01335         
01336         // ===> Attribute sidebands, which is optional
01337         
01338         
01339         bool sidebandsExists;
01340         
01341 
01342         vector<ReceiverSidebandMod::ReceiverSideband > sidebands;
01343 
01344         
01345         
01346         
01347 
01349         // Extrinsic Table Attributes //
01351         
01352         
01353         // ===> Attribute calDataId
01354         
01355         
01356 
01357         Tag calDataId;
01358 
01359         
01360         
01361         
01362 
01363         
01364         // ===> Attribute calReductionId
01365         
01366         
01367 
01368         Tag calReductionId;
01369 
01370         
01371         
01372         
01373 
01375         // Links //
01377         
01378         
01379                 
01380 
01381          
01382 
01383         
01384 
01385         
01386                 
01387 
01388          
01389 
01390         
01391 
01392         
01393 /*
01395         // binary-deserialization material from an EndianIStream  //
01397         std::map<std::string, CalDelayAttributeFromBin> fromBinMethods;
01398 void antennaNameFromBin( EndianIStream& eis);
01399 void atmPhaseCorrectionFromBin( EndianIStream& eis);
01400 void basebandNameFromBin( EndianIStream& eis);
01401 void receiverBandFromBin( EndianIStream& eis);
01402 void calDataIdFromBin( EndianIStream& eis);
01403 void calReductionIdFromBin( EndianIStream& eis);
01404 void startValidTimeFromBin( EndianIStream& eis);
01405 void endValidTimeFromBin( EndianIStream& eis);
01406 void refAntennaNameFromBin( EndianIStream& eis);
01407 void numReceptorFromBin( EndianIStream& eis);
01408 void delayErrorFromBin( EndianIStream& eis);
01409 void delayOffsetFromBin( EndianIStream& eis);
01410 void polarizationTypesFromBin( EndianIStream& eis);
01411 void reducedChiSquaredFromBin( EndianIStream& eis);
01412 void appliedDelayFromBin( EndianIStream& eis);
01413 
01414 void crossDelayOffsetFromBin( EndianIStream& eis);
01415 void crossDelayOffsetErrorFromBin( EndianIStream& eis);
01416 void numSidebandFromBin( EndianIStream& eis);
01417 void refFreqFromBin( EndianIStream& eis);
01418 void refFreqPhaseFromBin( EndianIStream& eis);
01419 void sidebandsFromBin( EndianIStream& eis);
01420 
01421 */
01422         
01424         // text-deserialization material //
01426         std::map<std::string, CalDelayAttributeFromText> fromTextMethods;
01427         
01428 void antennaNameFromText (const string & s);
01429         
01430         
01431 void atmPhaseCorrectionFromText (const string & s);
01432         
01433         
01434 void basebandNameFromText (const string & s);
01435         
01436         
01437 void receiverBandFromText (const string & s);
01438         
01439         
01440 void calDataIdFromText (const string & s);
01441         
01442         
01443 void calReductionIdFromText (const string & s);
01444         
01445         
01446 void startValidTimeFromText (const string & s);
01447         
01448         
01449 void endValidTimeFromText (const string & s);
01450         
01451         
01452 void refAntennaNameFromText (const string & s);
01453         
01454         
01455 void numReceptorFromText (const string & s);
01456         
01457         
01458 void delayErrorFromText (const string & s);
01459         
01460         
01461 void delayOffsetFromText (const string & s);
01462         
01463         
01464 void polarizationTypesFromText (const string & s);
01465         
01466         
01467 void reducedChiSquaredFromText (const string & s);
01468         
01469         
01470 void appliedDelayFromText (const string & s);
01471         
01472 
01473         
01474 void crossDelayOffsetFromText (const string & s);
01475         
01476         
01477 void crossDelayOffsetErrorFromText (const string & s);
01478         
01479         
01480 void numSidebandFromText (const string & s);
01481         
01482         
01483 void refFreqFromText (const string & s);
01484         
01485         
01486 void refFreqPhaseFromText (const string & s);
01487         
01488         
01489 void sidebandsFromText (const string & s);
01490         
01491         
01492         
01497          void toBin(EndianOSStream& eoss);
01498                  
01508 };
01509 
01510 } // End namespace asdm
01511 
01512 #endif /* CalDelay_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines