casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalFluxRow.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 CalFluxRow.h
00032  */
00033  
00034 #ifndef CalFluxRow_CLASS
00035 #define CalFluxRow_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 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 #include "CFluxCalibrationMethod.h"
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 #include "CStokesParameter.h"
00091         
00092 
00093         
00094 
00095         
00096 #include "CDirectionReferenceCode.h"
00097         
00098 
00099         
00100 
00101         
00102 
00103         
00104 
00105         
00106 
00107         
00108 
00109         
00110 #include "CSourceModel.h"
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 CalFlux.h
00123     \brief Generated from model's revision "1.61", branch "HEAD"
00124 */
00125 
00126 namespace asdm {
00127 
00128 //class asdm::CalFluxTable;
00129 
00130 
00131 // class asdm::CalDataRow;
00132 class CalDataRow;
00133 
00134 // class asdm::CalReductionRow;
00135 class CalReductionRow;
00136         
00137 
00138 class CalFluxRow;
00139 typedef void (CalFluxRow::*CalFluxAttributeFromBin) (EndianIStream& eis);
00140 typedef void (CalFluxRow::*CalFluxAttributeFromText) (const string& s);
00141 
00148 class CalFluxRow {
00149 friend class asdm::CalFluxTable;
00150 friend class asdm::RowTransformer<CalFluxRow>;
00151 //friend class asdm::TableStreamReader<CalFluxTable, CalFluxRow>;
00152 
00153 public:
00154 
00155         virtual ~CalFluxRow();
00156 
00160         CalFluxTable &getTable() const;
00161         
00166         bool isAdded() const;
00167                 
00169         // Intrinsic Table Attributes //
00171         
00172         
00173         // ===> Attribute sourceName
00174         
00175         
00176         
00177 
00178         
00183         string getSourceName() const;
00184         
00185  
00186         
00187         
00197         void setSourceName (string sourceName);
00198                 
00199         
00200         
00201         
00202 
00203 
00204         
00205         // ===> Attribute startValidTime
00206         
00207         
00208         
00209 
00210         
00215         ArrayTime getStartValidTime() const;
00216         
00217  
00218         
00219         
00227         void setStartValidTime (ArrayTime startValidTime);
00228                 
00229         
00230         
00231         
00232 
00233 
00234         
00235         // ===> Attribute endValidTime
00236         
00237         
00238         
00239 
00240         
00245         ArrayTime getEndValidTime() const;
00246         
00247  
00248         
00249         
00257         void setEndValidTime (ArrayTime endValidTime);
00258                 
00259         
00260         
00261         
00262 
00263 
00264         
00265         // ===> Attribute numFrequencyRanges
00266         
00267         
00268         
00269 
00270         
00275         int getNumFrequencyRanges() const;
00276         
00277  
00278         
00279         
00287         void setNumFrequencyRanges (int numFrequencyRanges);
00288                 
00289         
00290         
00291         
00292 
00293 
00294         
00295         // ===> Attribute numStokes
00296         
00297         
00298         
00299 
00300         
00305         int getNumStokes() const;
00306         
00307  
00308         
00309         
00317         void setNumStokes (int numStokes);
00318                 
00319         
00320         
00321         
00322 
00323 
00324         
00325         // ===> Attribute frequencyRanges
00326         
00327         
00328         
00329 
00330         
00335         vector<vector<Frequency > > getFrequencyRanges() const;
00336         
00337  
00338         
00339         
00347         void setFrequencyRanges (vector<vector<Frequency > > frequencyRanges);
00348                 
00349         
00350         
00351         
00352 
00353 
00354         
00355         // ===> Attribute fluxMethod
00356         
00357         
00358         
00359 
00360         
00365         FluxCalibrationMethodMod::FluxCalibrationMethod getFluxMethod() const;
00366         
00367  
00368         
00369         
00377         void setFluxMethod (FluxCalibrationMethodMod::FluxCalibrationMethod fluxMethod);
00378                 
00379         
00380         
00381         
00382 
00383 
00384         
00385         // ===> Attribute flux
00386         
00387         
00388         
00389 
00390         
00395         vector<vector<double > > getFlux() const;
00396         
00397  
00398         
00399         
00407         void setFlux (vector<vector<double > > flux);
00408                 
00409         
00410         
00411         
00412 
00413 
00414         
00415         // ===> Attribute fluxError
00416         
00417         
00418         
00419 
00420         
00425         vector<vector<double > > getFluxError() const;
00426         
00427  
00428         
00429         
00437         void setFluxError (vector<vector<double > > fluxError);
00438                 
00439         
00440         
00441         
00442 
00443 
00444         
00445         // ===> Attribute stokes
00446         
00447         
00448         
00449 
00450         
00455         vector<StokesParameterMod::StokesParameter > getStokes() const;
00456         
00457  
00458         
00459         
00467         void setStokes (vector<StokesParameterMod::StokesParameter > stokes);
00468                 
00469         
00470         
00471         
00472 
00473 
00474         
00475         // ===> Attribute direction, which is optional
00476         
00477         
00478         
00483         bool isDirectionExists() const;
00484         
00485 
00486         
00492         vector<Angle > getDirection() const;
00493         
00494  
00495         
00496         
00503         void setDirection (vector<Angle > direction);
00504                 
00505         
00506         
00507         
00511         void clearDirection ();
00512         
00513 
00514 
00515         
00516         // ===> Attribute directionCode, which is optional
00517         
00518         
00519         
00524         bool isDirectionCodeExists() const;
00525         
00526 
00527         
00533         DirectionReferenceCodeMod::DirectionReferenceCode getDirectionCode() const;
00534         
00535  
00536         
00537         
00544         void setDirectionCode (DirectionReferenceCodeMod::DirectionReferenceCode directionCode);
00545                 
00546         
00547         
00548         
00552         void clearDirectionCode ();
00553         
00554 
00555 
00556         
00557         // ===> Attribute directionEquinox, which is optional
00558         
00559         
00560         
00565         bool isDirectionEquinoxExists() const;
00566         
00567 
00568         
00574         Angle getDirectionEquinox() const;
00575         
00576  
00577         
00578         
00585         void setDirectionEquinox (Angle directionEquinox);
00586                 
00587         
00588         
00589         
00593         void clearDirectionEquinox ();
00594         
00595 
00596 
00597         
00598         // ===> Attribute PA, which is optional
00599         
00600         
00601         
00606         bool isPAExists() const;
00607         
00608 
00609         
00615         vector<vector<Angle > > getPA() const;
00616         
00617  
00618         
00619         
00626         void setPA (vector<vector<Angle > > PA);
00627                 
00628         
00629         
00630         
00634         void clearPA ();
00635         
00636 
00637 
00638         
00639         // ===> Attribute PAError, which is optional
00640         
00641         
00642         
00647         bool isPAErrorExists() const;
00648         
00649 
00650         
00656         vector<vector<Angle > > getPAError() const;
00657         
00658  
00659         
00660         
00667         void setPAError (vector<vector<Angle > > PAError);
00668                 
00669         
00670         
00671         
00675         void clearPAError ();
00676         
00677 
00678 
00679         
00680         // ===> Attribute size, which is optional
00681         
00682         
00683         
00688         bool isSizeExists() const;
00689         
00690 
00691         
00697         vector<vector<vector<Angle > > > getSize() const;
00698         
00699  
00700         
00701         
00708         void setSize (vector<vector<vector<Angle > > > size);
00709                 
00710         
00711         
00712         
00716         void clearSize ();
00717         
00718 
00719 
00720         
00721         // ===> Attribute sizeError, which is optional
00722         
00723         
00724         
00729         bool isSizeErrorExists() const;
00730         
00731 
00732         
00738         vector<vector<vector<Angle > > > getSizeError() const;
00739         
00740  
00741         
00742         
00749         void setSizeError (vector<vector<vector<Angle > > > sizeError);
00750                 
00751         
00752         
00753         
00757         void clearSizeError ();
00758         
00759 
00760 
00761         
00762         // ===> Attribute sourceModel, which is optional
00763         
00764         
00765         
00770         bool isSourceModelExists() const;
00771         
00772 
00773         
00779         SourceModelMod::SourceModel getSourceModel() const;
00780         
00781  
00782         
00783         
00790         void setSourceModel (SourceModelMod::SourceModel sourceModel);
00791                 
00792         
00793         
00794         
00798         void clearSourceModel ();
00799         
00800 
00801 
00803         // Extrinsic Table Attributes //
00805         
00806         
00807         // ===> Attribute calDataId
00808         
00809         
00810         
00811 
00812         
00817         Tag getCalDataId() const;
00818         
00819  
00820         
00821         
00831         void setCalDataId (Tag calDataId);
00832                 
00833         
00834         
00835         
00836 
00837 
00838         
00839         // ===> Attribute calReductionId
00840         
00841         
00842         
00843 
00844         
00849         Tag getCalReductionId() const;
00850         
00851  
00852         
00853         
00863         void setCalReductionId (Tag calReductionId);
00864                 
00865         
00866         
00867         
00868 
00869 
00871         // Links //
00873         
00874         
00875 
00876         
00877                 
00884          CalDataRow* getCalDataUsingCalDataId();
00885          
00886 
00887         
00888 
00889         
00890 
00891         
00892                 
00899          CalReductionRow* getCalReductionUsingCalReductionId();
00900          
00901 
00902         
00903 
00904         
00905         
00906         
00936         bool compareNoAutoInc(string sourceName, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numFrequencyRanges, int numStokes, vector<vector<Frequency > > frequencyRanges, FluxCalibrationMethodMod::FluxCalibrationMethod fluxMethod, vector<vector<double > > flux, vector<vector<double > > fluxError, vector<StokesParameterMod::StokesParameter > stokes);
00937         
00938         
00939 
00940         
00964         bool compareRequiredValue(ArrayTime startValidTime, ArrayTime endValidTime, int numFrequencyRanges, int numStokes, vector<vector<Frequency > > frequencyRanges, FluxCalibrationMethodMod::FluxCalibrationMethod fluxMethod, vector<vector<double > > flux, vector<vector<double > > fluxError, vector<StokesParameterMod::StokesParameter > stokes); 
00965                  
00966         
00975         bool equalByRequiredValue(CalFluxRow* x) ;
00976         
00977 #ifndef WITHOUT_ACS
00978 
00982         asdmIDL::CalFluxRowIDL *toIDL() const;
00983 #endif
00984         
00985 #ifndef WITHOUT_ACS
00986 
00991         void setFromIDL (asdmIDL::CalFluxRowIDL x) ;
00992 #endif
00993         
00998         std::string toXML() const;
00999 
01006         void setFromXML (std::string rowDoc) ;
01007 
01010         // binary-deserialization material from an EndianIStream  //
01012 
01013         std::map<std::string, CalFluxAttributeFromBin> fromBinMethods;
01014 void sourceNameFromBin( EndianIStream& eis);
01015 void calDataIdFromBin( EndianIStream& eis);
01016 void calReductionIdFromBin( EndianIStream& eis);
01017 void startValidTimeFromBin( EndianIStream& eis);
01018 void endValidTimeFromBin( EndianIStream& eis);
01019 void numFrequencyRangesFromBin( EndianIStream& eis);
01020 void numStokesFromBin( EndianIStream& eis);
01021 void frequencyRangesFromBin( EndianIStream& eis);
01022 void fluxMethodFromBin( EndianIStream& eis);
01023 void fluxFromBin( EndianIStream& eis);
01024 void fluxErrorFromBin( EndianIStream& eis);
01025 void stokesFromBin( EndianIStream& eis);
01026 
01027 void directionFromBin( EndianIStream& eis);
01028 void directionCodeFromBin( EndianIStream& eis);
01029 void directionEquinoxFromBin( EndianIStream& eis);
01030 void PAFromBin( EndianIStream& eis);
01031 void PAErrorFromBin( EndianIStream& eis);
01032 void sizeFromBin( EndianIStream& eis);
01033 void sizeErrorFromBin( EndianIStream& eis);
01034 void sourceModelFromBin( EndianIStream& eis);
01035 
01036 
01044          static CalFluxRow* fromBin(EndianIStream& eis, CalFluxTable& table, const std::vector<std::string>& attributesSeq);     
01046 
01047 private:
01051         CalFluxTable &table;
01055         bool hasBeenAdded;
01056 
01057         // This method is used by the Table class when this row is added to the table.
01058         void isAdded(bool added);
01059 
01060 
01069         CalFluxRow (CalFluxTable &table);
01070 
01088          CalFluxRow (CalFluxTable &table, CalFluxRow &row);
01089                 
01091         // Intrinsic Table Attributes //
01093         
01094         
01095         // ===> Attribute sourceName
01096         
01097         
01098 
01099         string sourceName;
01100 
01101         
01102         
01103         
01104 
01105         
01106         // ===> Attribute startValidTime
01107         
01108         
01109 
01110         ArrayTime startValidTime;
01111 
01112         
01113         
01114         
01115 
01116         
01117         // ===> Attribute endValidTime
01118         
01119         
01120 
01121         ArrayTime endValidTime;
01122 
01123         
01124         
01125         
01126 
01127         
01128         // ===> Attribute numFrequencyRanges
01129         
01130         
01131 
01132         int numFrequencyRanges;
01133 
01134         
01135         
01136         
01137 
01138         
01139         // ===> Attribute numStokes
01140         
01141         
01142 
01143         int numStokes;
01144 
01145         
01146         
01147         
01148 
01149         
01150         // ===> Attribute frequencyRanges
01151         
01152         
01153 
01154         vector<vector<Frequency > > frequencyRanges;
01155 
01156         
01157         
01158         
01159 
01160         
01161         // ===> Attribute fluxMethod
01162         
01163         
01164 
01165         FluxCalibrationMethodMod::FluxCalibrationMethod fluxMethod;
01166 
01167         
01168         
01169         
01170 
01171         
01172         // ===> Attribute flux
01173         
01174         
01175 
01176         vector<vector<double > > flux;
01177 
01178         
01179         
01180         
01181 
01182         
01183         // ===> Attribute fluxError
01184         
01185         
01186 
01187         vector<vector<double > > fluxError;
01188 
01189         
01190         
01191         
01192 
01193         
01194         // ===> Attribute stokes
01195         
01196         
01197 
01198         vector<StokesParameterMod::StokesParameter > stokes;
01199 
01200         
01201         
01202         
01203 
01204         
01205         // ===> Attribute direction, which is optional
01206         
01207         
01208         bool directionExists;
01209         
01210 
01211         vector<Angle > direction;
01212 
01213         
01214         
01215         
01216 
01217         
01218         // ===> Attribute directionCode, which is optional
01219         
01220         
01221         bool directionCodeExists;
01222         
01223 
01224         DirectionReferenceCodeMod::DirectionReferenceCode directionCode;
01225 
01226         
01227         
01228         
01229 
01230         
01231         // ===> Attribute directionEquinox, which is optional
01232         
01233         
01234         bool directionEquinoxExists;
01235         
01236 
01237         Angle directionEquinox;
01238 
01239         
01240         
01241         
01242 
01243         
01244         // ===> Attribute PA, which is optional
01245         
01246         
01247         bool PAExists;
01248         
01249 
01250         vector<vector<Angle > > PA;
01251 
01252         
01253         
01254         
01255 
01256         
01257         // ===> Attribute PAError, which is optional
01258         
01259         
01260         bool PAErrorExists;
01261         
01262 
01263         vector<vector<Angle > > PAError;
01264 
01265         
01266         
01267         
01268 
01269         
01270         // ===> Attribute size, which is optional
01271         
01272         
01273         bool sizeExists;
01274         
01275 
01276         vector<vector<vector<Angle > > > size;
01277 
01278         
01279         
01280         
01281 
01282         
01283         // ===> Attribute sizeError, which is optional
01284         
01285         
01286         bool sizeErrorExists;
01287         
01288 
01289         vector<vector<vector<Angle > > > sizeError;
01290 
01291         
01292         
01293         
01294 
01295         
01296         // ===> Attribute sourceModel, which is optional
01297         
01298         
01299         bool sourceModelExists;
01300         
01301 
01302         SourceModelMod::SourceModel sourceModel;
01303 
01304         
01305         
01306         
01307 
01309         // Extrinsic Table Attributes //
01311         
01312         
01313         // ===> Attribute calDataId
01314         
01315         
01316 
01317         Tag calDataId;
01318 
01319         
01320         
01321         
01322 
01323         
01324         // ===> Attribute calReductionId
01325         
01326         
01327 
01328         Tag calReductionId;
01329 
01330         
01331         
01332         
01333 
01335         // Links //
01337         
01338         
01339                 
01340 
01341          
01342 
01343         
01344 
01345         
01346                 
01347 
01348          
01349 
01350         
01351 
01352         
01353 /*
01355         // binary-deserialization material from an EndianIStream  //
01357         std::map<std::string, CalFluxAttributeFromBin> fromBinMethods;
01358 void sourceNameFromBin( EndianIStream& eis);
01359 void calDataIdFromBin( EndianIStream& eis);
01360 void calReductionIdFromBin( EndianIStream& eis);
01361 void startValidTimeFromBin( EndianIStream& eis);
01362 void endValidTimeFromBin( EndianIStream& eis);
01363 void numFrequencyRangesFromBin( EndianIStream& eis);
01364 void numStokesFromBin( EndianIStream& eis);
01365 void frequencyRangesFromBin( EndianIStream& eis);
01366 void fluxMethodFromBin( EndianIStream& eis);
01367 void fluxFromBin( EndianIStream& eis);
01368 void fluxErrorFromBin( EndianIStream& eis);
01369 void stokesFromBin( EndianIStream& eis);
01370 
01371 void directionFromBin( EndianIStream& eis);
01372 void directionCodeFromBin( EndianIStream& eis);
01373 void directionEquinoxFromBin( EndianIStream& eis);
01374 void PAFromBin( EndianIStream& eis);
01375 void PAErrorFromBin( EndianIStream& eis);
01376 void sizeFromBin( EndianIStream& eis);
01377 void sizeErrorFromBin( EndianIStream& eis);
01378 void sourceModelFromBin( EndianIStream& eis);
01379 
01380 */
01381         
01383         // text-deserialization material //
01385         std::map<std::string, CalFluxAttributeFromText> fromTextMethods;
01386         
01387 void sourceNameFromText (const string & s);
01388         
01389         
01390 void calDataIdFromText (const string & s);
01391         
01392         
01393 void calReductionIdFromText (const string & s);
01394         
01395         
01396 void startValidTimeFromText (const string & s);
01397         
01398         
01399 void endValidTimeFromText (const string & s);
01400         
01401         
01402 void numFrequencyRangesFromText (const string & s);
01403         
01404         
01405 void numStokesFromText (const string & s);
01406         
01407         
01408 void frequencyRangesFromText (const string & s);
01409         
01410         
01411 void fluxMethodFromText (const string & s);
01412         
01413         
01414 void fluxFromText (const string & s);
01415         
01416         
01417 void fluxErrorFromText (const string & s);
01418         
01419         
01420 void stokesFromText (const string & s);
01421         
01422 
01423         
01424 void directionFromText (const string & s);
01425         
01426         
01427 void directionCodeFromText (const string & s);
01428         
01429         
01430 void directionEquinoxFromText (const string & s);
01431         
01432         
01433 void PAFromText (const string & s);
01434         
01435         
01436 void PAErrorFromText (const string & s);
01437         
01438         
01439 void sizeFromText (const string & s);
01440         
01441         
01442 void sizeErrorFromText (const string & s);
01443         
01444         
01445 void sourceModelFromText (const string & s);
01446         
01447         
01448         
01449         void fromText(const std::string& attributeName, const std::string&  t);
01450         
01455          void toBin(EndianOSStream& eoss);
01456                  
01466 };
01467 
01468 } // End namespace asdm
01469 
01470 #endif /* CalFlux_CLASS */