casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalCurveRow.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 CalCurveRow.h
00032  */
00033  
00034 #ifndef CalCurveRow_CLASS
00035 #define CalCurveRow_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 #include <Frequency.h>
00060         
00061 
00062 
00063 
00064 
00065         
00066 #include "CAtmPhaseCorrection.h"
00067         
00068 
00069         
00070 #include "CCalCurveType.h"
00071         
00072 
00073         
00074 #include "CReceiverBand.h"
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 #include "CPolarizationType.h"
00095         
00096 
00097         
00098 
00099         
00100 
00101         
00102 
00103         
00104 
00105 
00106 
00107 #include <ConversionException.h>
00108 #include <NoSuchRow.h>
00109 #include <IllegalAccessException.h>
00110 
00111 #include <RowTransformer.h>
00112 //#include <TableStreamReader.h>
00113 
00114 /*\file CalCurve.h
00115     \brief Generated from model's revision "1.64", branch "HEAD"
00116 */
00117 
00118 namespace asdm {
00119 
00120 //class asdm::CalCurveTable;
00121 
00122 
00123 // class asdm::CalDataRow;
00124 class CalDataRow;
00125 
00126 // class asdm::CalReductionRow;
00127 class CalReductionRow;
00128         
00129 
00130 class CalCurveRow;
00131 typedef void (CalCurveRow::*CalCurveAttributeFromBin) (EndianIStream& eis);
00132 typedef void (CalCurveRow::*CalCurveAttributeFromText) (const string& s);
00133 
00140 class CalCurveRow {
00141 friend class asdm::CalCurveTable;
00142 friend class asdm::RowTransformer<CalCurveRow>;
00143 //friend class asdm::TableStreamReader<CalCurveTable, CalCurveRow>;
00144 
00145 public:
00146 
00147         virtual ~CalCurveRow();
00148 
00152         CalCurveTable &getTable() const;
00153         
00158         bool isAdded() const;
00159                 
00161         // Intrinsic Table Attributes //
00163         
00164         
00165         // ===> Attribute atmPhaseCorrection
00166         
00167         
00168         
00169 
00170         
00175         AtmPhaseCorrectionMod::AtmPhaseCorrection getAtmPhaseCorrection() const;
00176         
00177  
00178         
00179         
00189         void setAtmPhaseCorrection (AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection);
00190                 
00191         
00192         
00193         
00194 
00195 
00196         
00197         // ===> Attribute typeCurve
00198         
00199         
00200         
00201 
00202         
00207         CalCurveTypeMod::CalCurveType getTypeCurve() const;
00208         
00209  
00210         
00211         
00221         void setTypeCurve (CalCurveTypeMod::CalCurveType typeCurve);
00222                 
00223         
00224         
00225         
00226 
00227 
00228         
00229         // ===> Attribute receiverBand
00230         
00231         
00232         
00233 
00234         
00239         ReceiverBandMod::ReceiverBand getReceiverBand() const;
00240         
00241  
00242         
00243         
00253         void setReceiverBand (ReceiverBandMod::ReceiverBand receiverBand);
00254                 
00255         
00256         
00257         
00258 
00259 
00260         
00261         // ===> Attribute startValidTime
00262         
00263         
00264         
00265 
00266         
00271         ArrayTime getStartValidTime() const;
00272         
00273  
00274         
00275         
00283         void setStartValidTime (ArrayTime startValidTime);
00284                 
00285         
00286         
00287         
00288 
00289 
00290         
00291         // ===> Attribute endValidTime
00292         
00293         
00294         
00295 
00296         
00301         ArrayTime getEndValidTime() const;
00302         
00303  
00304         
00305         
00313         void setEndValidTime (ArrayTime endValidTime);
00314                 
00315         
00316         
00317         
00318 
00319 
00320         
00321         // ===> Attribute frequencyRange
00322         
00323         
00324         
00325 
00326         
00331         vector<Frequency > getFrequencyRange() const;
00332         
00333  
00334         
00335         
00343         void setFrequencyRange (vector<Frequency > frequencyRange);
00344                 
00345         
00346         
00347         
00348 
00349 
00350         
00351         // ===> Attribute numAntenna
00352         
00353         
00354         
00355 
00356         
00361         int getNumAntenna() const;
00362         
00363  
00364         
00365         
00373         void setNumAntenna (int numAntenna);
00374                 
00375         
00376         
00377         
00378 
00379 
00380         
00381         // ===> Attribute numPoly
00382         
00383         
00384         
00385 
00386         
00391         int getNumPoly() const;
00392         
00393  
00394         
00395         
00403         void setNumPoly (int numPoly);
00404                 
00405         
00406         
00407         
00408 
00409 
00410         
00411         // ===> Attribute numReceptor
00412         
00413         
00414         
00415 
00416         
00421         int getNumReceptor() const;
00422         
00423  
00424         
00425         
00433         void setNumReceptor (int numReceptor);
00434                 
00435         
00436         
00437         
00438 
00439 
00440         
00441         // ===> Attribute antennaNames
00442         
00443         
00444         
00445 
00446         
00451         vector<string > getAntennaNames() const;
00452         
00453  
00454         
00455         
00463         void setAntennaNames (vector<string > antennaNames);
00464                 
00465         
00466         
00467         
00468 
00469 
00470         
00471         // ===> Attribute refAntennaName
00472         
00473         
00474         
00475 
00476         
00481         string getRefAntennaName() const;
00482         
00483  
00484         
00485         
00493         void setRefAntennaName (string refAntennaName);
00494                 
00495         
00496         
00497         
00498 
00499 
00500         
00501         // ===> Attribute polarizationTypes
00502         
00503         
00504         
00505 
00506         
00511         vector<PolarizationTypeMod::PolarizationType > getPolarizationTypes() const;
00512         
00513  
00514         
00515         
00523         void setPolarizationTypes (vector<PolarizationTypeMod::PolarizationType > polarizationTypes);
00524                 
00525         
00526         
00527         
00528 
00529 
00530         
00531         // ===> Attribute curve
00532         
00533         
00534         
00535 
00536         
00541         vector<vector<vector<float > > > getCurve() const;
00542         
00543  
00544         
00545         
00553         void setCurve (vector<vector<vector<float > > > curve);
00554                 
00555         
00556         
00557         
00558 
00559 
00560         
00561         // ===> Attribute reducedChiSquared
00562         
00563         
00564         
00565 
00566         
00571         vector<double > getReducedChiSquared() const;
00572         
00573  
00574         
00575         
00583         void setReducedChiSquared (vector<double > reducedChiSquared);
00584                 
00585         
00586         
00587         
00588 
00589 
00590         
00591         // ===> Attribute numBaseline, which is optional
00592         
00593         
00594         
00599         bool isNumBaselineExists() const;
00600         
00601 
00602         
00608         int getNumBaseline() const;
00609         
00610  
00611         
00612         
00619         void setNumBaseline (int numBaseline);
00620                 
00621         
00622         
00623         
00627         void clearNumBaseline ();
00628         
00629 
00630 
00631         
00632         // ===> Attribute rms, which is optional
00633         
00634         
00635         
00640         bool isRmsExists() const;
00641         
00642 
00643         
00649         vector<vector<float > > getRms() const;
00650         
00651  
00652         
00653         
00660         void setRms (vector<vector<float > > rms);
00661                 
00662         
00663         
00664         
00668         void clearRms ();
00669         
00670 
00671 
00673         // Extrinsic Table Attributes //
00675         
00676         
00677         // ===> Attribute calDataId
00678         
00679         
00680         
00681 
00682         
00687         Tag getCalDataId() const;
00688         
00689  
00690         
00691         
00701         void setCalDataId (Tag calDataId);
00702                 
00703         
00704         
00705         
00706 
00707 
00708         
00709         // ===> Attribute calReductionId
00710         
00711         
00712         
00713 
00714         
00719         Tag getCalReductionId() const;
00720         
00721  
00722         
00723         
00733         void setCalReductionId (Tag calReductionId);
00734                 
00735         
00736         
00737         
00738 
00739 
00741         // Links //
00743         
00744         
00745 
00746         
00747                 
00754          CalDataRow* getCalDataUsingCalDataId();
00755          
00756 
00757         
00758 
00759         
00760 
00761         
00762                 
00769          CalReductionRow* getCalReductionUsingCalReductionId();
00770          
00771 
00772         
00773 
00774         
00775         
00776         
00814         bool compareNoAutoInc(AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, CalCurveTypeMod::CalCurveType typeCurve, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, vector<Frequency > frequencyRange, int numAntenna, int numPoly, int numReceptor, vector<string > antennaNames, string refAntennaName, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<vector<float > > > curve, vector<double > reducedChiSquared);
00815         
00816         
00817 
00818         
00846         bool compareRequiredValue(ArrayTime startValidTime, ArrayTime endValidTime, vector<Frequency > frequencyRange, int numAntenna, int numPoly, int numReceptor, vector<string > antennaNames, string refAntennaName, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<vector<float > > > curve, vector<double > reducedChiSquared); 
00847                  
00848         
00857         bool equalByRequiredValue(CalCurveRow* x) ;
00858         
00859 #ifndef WITHOUT_ACS
00860 
00864         asdmIDL::CalCurveRowIDL *toIDL() const;
00865         
00873          void toIDL(asdmIDL::CalCurveRowIDL& x) const;
00874 #endif
00875         
00876 #ifndef WITHOUT_ACS
00877 
00882         void setFromIDL (asdmIDL::CalCurveRowIDL x) ;
00883 #endif
00884         
00889         std::string toXML() const;
00890 
00897         void setFromXML (std::string rowDoc) ;
00898 
00901         // binary-deserialization material from an EndianIStream  //
00903 
00904         std::map<std::string, CalCurveAttributeFromBin> fromBinMethods;
00905 void atmPhaseCorrectionFromBin( EndianIStream& eis);
00906 void typeCurveFromBin( EndianIStream& eis);
00907 void receiverBandFromBin( EndianIStream& eis);
00908 void calDataIdFromBin( EndianIStream& eis);
00909 void calReductionIdFromBin( EndianIStream& eis);
00910 void startValidTimeFromBin( EndianIStream& eis);
00911 void endValidTimeFromBin( EndianIStream& eis);
00912 void frequencyRangeFromBin( EndianIStream& eis);
00913 void numAntennaFromBin( EndianIStream& eis);
00914 void numPolyFromBin( EndianIStream& eis);
00915 void numReceptorFromBin( EndianIStream& eis);
00916 void antennaNamesFromBin( EndianIStream& eis);
00917 void refAntennaNameFromBin( EndianIStream& eis);
00918 void polarizationTypesFromBin( EndianIStream& eis);
00919 void curveFromBin( EndianIStream& eis);
00920 void reducedChiSquaredFromBin( EndianIStream& eis);
00921 
00922 void numBaselineFromBin( EndianIStream& eis);
00923 void rmsFromBin( EndianIStream& eis);
00924 
00925 
00933          static CalCurveRow* fromBin(EndianIStream& eis, CalCurveTable& table, const std::vector<std::string>& attributesSeq);   
00934  
00941          void fromText(const std::string& attributeName, const std::string&  t);
00943 
00944 private:
00948         CalCurveTable &table;
00952         bool hasBeenAdded;
00953 
00954         // This method is used by the Table class when this row is added to the table.
00955         void isAdded(bool added);
00956 
00957 
00966         CalCurveRow (CalCurveTable &table);
00967 
00985          CalCurveRow (CalCurveTable &table, CalCurveRow &row);
00986                 
00988         // Intrinsic Table Attributes //
00990         
00991         
00992         // ===> Attribute atmPhaseCorrection
00993         
00994         
00995 
00996         AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection;
00997 
00998         
00999         
01000         
01001 
01002         
01003         // ===> Attribute typeCurve
01004         
01005         
01006 
01007         CalCurveTypeMod::CalCurveType typeCurve;
01008 
01009         
01010         
01011         
01012 
01013         
01014         // ===> Attribute receiverBand
01015         
01016         
01017 
01018         ReceiverBandMod::ReceiverBand receiverBand;
01019 
01020         
01021         
01022         
01023 
01024         
01025         // ===> Attribute startValidTime
01026         
01027         
01028 
01029         ArrayTime startValidTime;
01030 
01031         
01032         
01033         
01034 
01035         
01036         // ===> Attribute endValidTime
01037         
01038         
01039 
01040         ArrayTime endValidTime;
01041 
01042         
01043         
01044         
01045 
01046         
01047         // ===> Attribute frequencyRange
01048         
01049         
01050 
01051         vector<Frequency > frequencyRange;
01052 
01053         
01054         
01055         
01056 
01057         
01058         // ===> Attribute numAntenna
01059         
01060         
01061 
01062         int numAntenna;
01063 
01064         
01065         
01066         
01067 
01068         
01069         // ===> Attribute numPoly
01070         
01071         
01072 
01073         int numPoly;
01074 
01075         
01076         
01077         
01078 
01079         
01080         // ===> Attribute numReceptor
01081         
01082         
01083 
01084         int numReceptor;
01085 
01086         
01087         
01088         
01089 
01090         
01091         // ===> Attribute antennaNames
01092         
01093         
01094 
01095         vector<string > antennaNames;
01096 
01097         
01098         
01099         
01100 
01101         
01102         // ===> Attribute refAntennaName
01103         
01104         
01105 
01106         string refAntennaName;
01107 
01108         
01109         
01110         
01111 
01112         
01113         // ===> Attribute polarizationTypes
01114         
01115         
01116 
01117         vector<PolarizationTypeMod::PolarizationType > polarizationTypes;
01118 
01119         
01120         
01121         
01122 
01123         
01124         // ===> Attribute curve
01125         
01126         
01127 
01128         vector<vector<vector<float > > > curve;
01129 
01130         
01131         
01132         
01133 
01134         
01135         // ===> Attribute reducedChiSquared
01136         
01137         
01138 
01139         vector<double > reducedChiSquared;
01140 
01141         
01142         
01143         
01144 
01145         
01146         // ===> Attribute numBaseline, which is optional
01147         
01148         
01149         bool numBaselineExists;
01150         
01151 
01152         int numBaseline;
01153 
01154         
01155         
01156         
01157 
01158         
01159         // ===> Attribute rms, which is optional
01160         
01161         
01162         bool rmsExists;
01163         
01164 
01165         vector<vector<float > > rms;
01166 
01167         
01168         
01169         
01170 
01172         // Extrinsic Table Attributes //
01174         
01175         
01176         // ===> Attribute calDataId
01177         
01178         
01179 
01180         Tag calDataId;
01181 
01182         
01183         
01184         
01185 
01186         
01187         // ===> Attribute calReductionId
01188         
01189         
01190 
01191         Tag calReductionId;
01192 
01193         
01194         
01195         
01196 
01198         // Links //
01200         
01201         
01202                 
01203 
01204          
01205 
01206         
01207 
01208         
01209                 
01210 
01211          
01212 
01213         
01214 
01215         
01216 /*
01218         // binary-deserialization material from an EndianIStream  //
01220         std::map<std::string, CalCurveAttributeFromBin> fromBinMethods;
01221 void atmPhaseCorrectionFromBin( EndianIStream& eis);
01222 void typeCurveFromBin( EndianIStream& eis);
01223 void receiverBandFromBin( EndianIStream& eis);
01224 void calDataIdFromBin( EndianIStream& eis);
01225 void calReductionIdFromBin( EndianIStream& eis);
01226 void startValidTimeFromBin( EndianIStream& eis);
01227 void endValidTimeFromBin( EndianIStream& eis);
01228 void frequencyRangeFromBin( EndianIStream& eis);
01229 void numAntennaFromBin( EndianIStream& eis);
01230 void numPolyFromBin( EndianIStream& eis);
01231 void numReceptorFromBin( EndianIStream& eis);
01232 void antennaNamesFromBin( EndianIStream& eis);
01233 void refAntennaNameFromBin( EndianIStream& eis);
01234 void polarizationTypesFromBin( EndianIStream& eis);
01235 void curveFromBin( EndianIStream& eis);
01236 void reducedChiSquaredFromBin( EndianIStream& eis);
01237 
01238 void numBaselineFromBin( EndianIStream& eis);
01239 void rmsFromBin( EndianIStream& eis);
01240 
01241 */
01242         
01244         // text-deserialization material //
01246         std::map<std::string, CalCurveAttributeFromText> fromTextMethods;
01247         
01248 void atmPhaseCorrectionFromText (const string & s);
01249         
01250         
01251 void typeCurveFromText (const string & s);
01252         
01253         
01254 void receiverBandFromText (const string & s);
01255         
01256         
01257 void calDataIdFromText (const string & s);
01258         
01259         
01260 void calReductionIdFromText (const string & s);
01261         
01262         
01263 void startValidTimeFromText (const string & s);
01264         
01265         
01266 void endValidTimeFromText (const string & s);
01267         
01268         
01269 void frequencyRangeFromText (const string & s);
01270         
01271         
01272 void numAntennaFromText (const string & s);
01273         
01274         
01275 void numPolyFromText (const string & s);
01276         
01277         
01278 void numReceptorFromText (const string & s);
01279         
01280         
01281 void antennaNamesFromText (const string & s);
01282         
01283         
01284 void refAntennaNameFromText (const string & s);
01285         
01286         
01287 void polarizationTypesFromText (const string & s);
01288         
01289         
01290 void curveFromText (const string & s);
01291         
01292         
01293 void reducedChiSquaredFromText (const string & s);
01294         
01295 
01296         
01297 void numBaselineFromText (const string & s);
01298         
01299         
01300 void rmsFromText (const string & s);
01301         
01302         
01303         
01308          void toBin(EndianOSStream& eoss);
01309                  
01319 };
01320 
01321 } // End namespace asdm
01322 
01323 #endif /* CalCurve_CLASS */