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.64", 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         
00991          void toIDL(asdmIDL::CalFluxRowIDL& x) const;
00992 #endif
00993         
00994 #ifndef WITHOUT_ACS
00995 
01000         void setFromIDL (asdmIDL::CalFluxRowIDL x) ;
01001 #endif
01002         
01007         std::string toXML() const;
01008 
01015         void setFromXML (std::string rowDoc) ;
01016 
01019         // binary-deserialization material from an EndianIStream  //
01021 
01022         std::map<std::string, CalFluxAttributeFromBin> fromBinMethods;
01023 void sourceNameFromBin( EndianIStream& eis);
01024 void calDataIdFromBin( EndianIStream& eis);
01025 void calReductionIdFromBin( EndianIStream& eis);
01026 void startValidTimeFromBin( EndianIStream& eis);
01027 void endValidTimeFromBin( EndianIStream& eis);
01028 void numFrequencyRangesFromBin( EndianIStream& eis);
01029 void numStokesFromBin( EndianIStream& eis);
01030 void frequencyRangesFromBin( EndianIStream& eis);
01031 void fluxMethodFromBin( EndianIStream& eis);
01032 void fluxFromBin( EndianIStream& eis);
01033 void fluxErrorFromBin( EndianIStream& eis);
01034 void stokesFromBin( EndianIStream& eis);
01035 
01036 void directionFromBin( EndianIStream& eis);
01037 void directionCodeFromBin( EndianIStream& eis);
01038 void directionEquinoxFromBin( EndianIStream& eis);
01039 void PAFromBin( EndianIStream& eis);
01040 void PAErrorFromBin( EndianIStream& eis);
01041 void sizeFromBin( EndianIStream& eis);
01042 void sizeErrorFromBin( EndianIStream& eis);
01043 void sourceModelFromBin( EndianIStream& eis);
01044 
01045 
01053          static CalFluxRow* fromBin(EndianIStream& eis, CalFluxTable& table, const std::vector<std::string>& attributesSeq);     
01054  
01061          void fromText(const std::string& attributeName, const std::string&  t);
01063 
01064 private:
01068         CalFluxTable &table;
01072         bool hasBeenAdded;
01073 
01074         // This method is used by the Table class when this row is added to the table.
01075         void isAdded(bool added);
01076 
01077 
01086         CalFluxRow (CalFluxTable &table);
01087 
01105          CalFluxRow (CalFluxTable &table, CalFluxRow &row);
01106                 
01108         // Intrinsic Table Attributes //
01110         
01111         
01112         // ===> Attribute sourceName
01113         
01114         
01115 
01116         string sourceName;
01117 
01118         
01119         
01120         
01121 
01122         
01123         // ===> Attribute startValidTime
01124         
01125         
01126 
01127         ArrayTime startValidTime;
01128 
01129         
01130         
01131         
01132 
01133         
01134         // ===> Attribute endValidTime
01135         
01136         
01137 
01138         ArrayTime endValidTime;
01139 
01140         
01141         
01142         
01143 
01144         
01145         // ===> Attribute numFrequencyRanges
01146         
01147         
01148 
01149         int numFrequencyRanges;
01150 
01151         
01152         
01153         
01154 
01155         
01156         // ===> Attribute numStokes
01157         
01158         
01159 
01160         int numStokes;
01161 
01162         
01163         
01164         
01165 
01166         
01167         // ===> Attribute frequencyRanges
01168         
01169         
01170 
01171         vector<vector<Frequency > > frequencyRanges;
01172 
01173         
01174         
01175         
01176 
01177         
01178         // ===> Attribute fluxMethod
01179         
01180         
01181 
01182         FluxCalibrationMethodMod::FluxCalibrationMethod fluxMethod;
01183 
01184         
01185         
01186         
01187 
01188         
01189         // ===> Attribute flux
01190         
01191         
01192 
01193         vector<vector<double > > flux;
01194 
01195         
01196         
01197         
01198 
01199         
01200         // ===> Attribute fluxError
01201         
01202         
01203 
01204         vector<vector<double > > fluxError;
01205 
01206         
01207         
01208         
01209 
01210         
01211         // ===> Attribute stokes
01212         
01213         
01214 
01215         vector<StokesParameterMod::StokesParameter > stokes;
01216 
01217         
01218         
01219         
01220 
01221         
01222         // ===> Attribute direction, which is optional
01223         
01224         
01225         bool directionExists;
01226         
01227 
01228         vector<Angle > direction;
01229 
01230         
01231         
01232         
01233 
01234         
01235         // ===> Attribute directionCode, which is optional
01236         
01237         
01238         bool directionCodeExists;
01239         
01240 
01241         DirectionReferenceCodeMod::DirectionReferenceCode directionCode;
01242 
01243         
01244         
01245         
01246 
01247         
01248         // ===> Attribute directionEquinox, which is optional
01249         
01250         
01251         bool directionEquinoxExists;
01252         
01253 
01254         Angle directionEquinox;
01255 
01256         
01257         
01258         
01259 
01260         
01261         // ===> Attribute PA, which is optional
01262         
01263         
01264         bool PAExists;
01265         
01266 
01267         vector<vector<Angle > > PA;
01268 
01269         
01270         
01271         
01272 
01273         
01274         // ===> Attribute PAError, which is optional
01275         
01276         
01277         bool PAErrorExists;
01278         
01279 
01280         vector<vector<Angle > > PAError;
01281 
01282         
01283         
01284         
01285 
01286         
01287         // ===> Attribute size, which is optional
01288         
01289         
01290         bool sizeExists;
01291         
01292 
01293         vector<vector<vector<Angle > > > size;
01294 
01295         
01296         
01297         
01298 
01299         
01300         // ===> Attribute sizeError, which is optional
01301         
01302         
01303         bool sizeErrorExists;
01304         
01305 
01306         vector<vector<vector<Angle > > > sizeError;
01307 
01308         
01309         
01310         
01311 
01312         
01313         // ===> Attribute sourceModel, which is optional
01314         
01315         
01316         bool sourceModelExists;
01317         
01318 
01319         SourceModelMod::SourceModel sourceModel;
01320 
01321         
01322         
01323         
01324 
01326         // Extrinsic Table Attributes //
01328         
01329         
01330         // ===> Attribute calDataId
01331         
01332         
01333 
01334         Tag calDataId;
01335 
01336         
01337         
01338         
01339 
01340         
01341         // ===> Attribute calReductionId
01342         
01343         
01344 
01345         Tag calReductionId;
01346 
01347         
01348         
01349         
01350 
01352         // Links //
01354         
01355         
01356                 
01357 
01358          
01359 
01360         
01361 
01362         
01363                 
01364 
01365          
01366 
01367         
01368 
01369         
01370 /*
01372         // binary-deserialization material from an EndianIStream  //
01374         std::map<std::string, CalFluxAttributeFromBin> fromBinMethods;
01375 void sourceNameFromBin( EndianIStream& eis);
01376 void calDataIdFromBin( EndianIStream& eis);
01377 void calReductionIdFromBin( EndianIStream& eis);
01378 void startValidTimeFromBin( EndianIStream& eis);
01379 void endValidTimeFromBin( EndianIStream& eis);
01380 void numFrequencyRangesFromBin( EndianIStream& eis);
01381 void numStokesFromBin( EndianIStream& eis);
01382 void frequencyRangesFromBin( EndianIStream& eis);
01383 void fluxMethodFromBin( EndianIStream& eis);
01384 void fluxFromBin( EndianIStream& eis);
01385 void fluxErrorFromBin( EndianIStream& eis);
01386 void stokesFromBin( EndianIStream& eis);
01387 
01388 void directionFromBin( EndianIStream& eis);
01389 void directionCodeFromBin( EndianIStream& eis);
01390 void directionEquinoxFromBin( EndianIStream& eis);
01391 void PAFromBin( EndianIStream& eis);
01392 void PAErrorFromBin( EndianIStream& eis);
01393 void sizeFromBin( EndianIStream& eis);
01394 void sizeErrorFromBin( EndianIStream& eis);
01395 void sourceModelFromBin( EndianIStream& eis);
01396 
01397 */
01398         
01400         // text-deserialization material //
01402         std::map<std::string, CalFluxAttributeFromText> fromTextMethods;
01403         
01404 void sourceNameFromText (const string & s);
01405         
01406         
01407 void calDataIdFromText (const string & s);
01408         
01409         
01410 void calReductionIdFromText (const string & s);
01411         
01412         
01413 void startValidTimeFromText (const string & s);
01414         
01415         
01416 void endValidTimeFromText (const string & s);
01417         
01418         
01419 void numFrequencyRangesFromText (const string & s);
01420         
01421         
01422 void numStokesFromText (const string & s);
01423         
01424         
01425 void frequencyRangesFromText (const string & s);
01426         
01427         
01428 void fluxMethodFromText (const string & s);
01429         
01430         
01431 void fluxFromText (const string & s);
01432         
01433         
01434 void fluxErrorFromText (const string & s);
01435         
01436         
01437 void stokesFromText (const string & s);
01438         
01439 
01440         
01441 void directionFromText (const string & s);
01442         
01443         
01444 void directionCodeFromText (const string & s);
01445         
01446         
01447 void directionEquinoxFromText (const string & s);
01448         
01449         
01450 void PAFromText (const string & s);
01451         
01452         
01453 void PAErrorFromText (const string & s);
01454         
01455         
01456 void sizeFromText (const string & s);
01457         
01458         
01459 void sizeErrorFromText (const string & s);
01460         
01461         
01462 void sourceModelFromText (const string & s);
01463         
01464         
01465         
01470          void toBin(EndianOSStream& eoss);
01471                  
01481 };
01482 
01483 } // End namespace asdm
01484 
01485 #endif /* CalFlux_CLASS */