casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SysCalRow.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 SysCalRow.h
00032  */
00033  
00034 #ifndef SysCalRow_CLASS
00035 #define SysCalRow_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 <Tag.h>
00052         
00053 
00054          
00055 #include <Temperature.h>
00056         
00057 
00058          
00059 #include <ArrayTimeInterval.h>
00060         
00061 
00062 
00063 
00064 
00065         
00066 
00067         
00068 
00069         
00070 
00071         
00072 
00073         
00074 
00075         
00076 
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097         
00098 
00099 
00100 
00101 #include <ConversionException.h>
00102 #include <NoSuchRow.h>
00103 #include <IllegalAccessException.h>
00104 
00105 #include <RowTransformer.h>
00106 //#include <TableStreamReader.h>
00107 
00108 /*\file SysCal.h
00109     \brief Generated from model's revision "1.61", branch "HEAD"
00110 */
00111 
00112 namespace asdm {
00113 
00114 //class asdm::SysCalTable;
00115 
00116 
00117 // class asdm::AntennaRow;
00118 class AntennaRow;
00119 
00120 // class asdm::FeedRow;
00121 class FeedRow;
00122 
00123 // class asdm::SpectralWindowRow;
00124 class SpectralWindowRow;
00125         
00126 
00127 class SysCalRow;
00128 typedef void (SysCalRow::*SysCalAttributeFromBin) (EndianIStream& eis);
00129 typedef void (SysCalRow::*SysCalAttributeFromText) (const string& s);
00130 
00137 class SysCalRow {
00138 friend class asdm::SysCalTable;
00139 friend class asdm::RowTransformer<SysCalRow>;
00140 //friend class asdm::TableStreamReader<SysCalTable, SysCalRow>;
00141 
00142 public:
00143 
00144         virtual ~SysCalRow();
00145 
00149         SysCalTable &getTable() const;
00150         
00155         bool isAdded() const;
00156                 
00158         // Intrinsic Table Attributes //
00160         
00161         
00162         // ===> Attribute timeInterval
00163         
00164         
00165         
00166 
00167         
00172         ArrayTimeInterval getTimeInterval() const;
00173         
00174  
00175         
00176         
00186         void setTimeInterval (ArrayTimeInterval timeInterval);
00187                 
00188         
00189         
00190         
00191 
00192 
00193         
00194         // ===> Attribute numReceptor
00195         
00196         
00197         
00198 
00199         
00204         int getNumReceptor() const;
00205         
00206  
00207         
00208         
00216         void setNumReceptor (int numReceptor);
00217                 
00218         
00219         
00220         
00221 
00222 
00223         
00224         // ===> Attribute numChan
00225         
00226         
00227         
00228 
00229         
00234         int getNumChan() const;
00235         
00236  
00237         
00238         
00246         void setNumChan (int numChan);
00247                 
00248         
00249         
00250         
00251 
00252 
00253         
00254         // ===> Attribute tcalFlag, which is optional
00255         
00256         
00257         
00262         bool isTcalFlagExists() const;
00263         
00264 
00265         
00271         bool getTcalFlag() const;
00272         
00273  
00274         
00275         
00282         void setTcalFlag (bool tcalFlag);
00283                 
00284         
00285         
00286         
00290         void clearTcalFlag ();
00291         
00292 
00293 
00294         
00295         // ===> Attribute tcalSpectrum, which is optional
00296         
00297         
00298         
00303         bool isTcalSpectrumExists() const;
00304         
00305 
00306         
00312         vector<vector<Temperature > > getTcalSpectrum() const;
00313         
00314  
00315         
00316         
00323         void setTcalSpectrum (vector<vector<Temperature > > tcalSpectrum);
00324                 
00325         
00326         
00327         
00331         void clearTcalSpectrum ();
00332         
00333 
00334 
00335         
00336         // ===> Attribute trxFlag, which is optional
00337         
00338         
00339         
00344         bool isTrxFlagExists() const;
00345         
00346 
00347         
00353         bool getTrxFlag() const;
00354         
00355  
00356         
00357         
00364         void setTrxFlag (bool trxFlag);
00365                 
00366         
00367         
00368         
00372         void clearTrxFlag ();
00373         
00374 
00375 
00376         
00377         // ===> Attribute trxSpectrum, which is optional
00378         
00379         
00380         
00385         bool isTrxSpectrumExists() const;
00386         
00387 
00388         
00394         vector<vector<Temperature > > getTrxSpectrum() const;
00395         
00396  
00397         
00398         
00405         void setTrxSpectrum (vector<vector<Temperature > > trxSpectrum);
00406                 
00407         
00408         
00409         
00413         void clearTrxSpectrum ();
00414         
00415 
00416 
00417         
00418         // ===> Attribute tskyFlag, which is optional
00419         
00420         
00421         
00426         bool isTskyFlagExists() const;
00427         
00428 
00429         
00435         bool getTskyFlag() const;
00436         
00437  
00438         
00439         
00446         void setTskyFlag (bool tskyFlag);
00447                 
00448         
00449         
00450         
00454         void clearTskyFlag ();
00455         
00456 
00457 
00458         
00459         // ===> Attribute tskySpectrum, which is optional
00460         
00461         
00462         
00467         bool isTskySpectrumExists() const;
00468         
00469 
00470         
00476         vector<vector<Temperature > > getTskySpectrum() const;
00477         
00478  
00479         
00480         
00487         void setTskySpectrum (vector<vector<Temperature > > tskySpectrum);
00488                 
00489         
00490         
00491         
00495         void clearTskySpectrum ();
00496         
00497 
00498 
00499         
00500         // ===> Attribute tsysFlag, which is optional
00501         
00502         
00503         
00508         bool isTsysFlagExists() const;
00509         
00510 
00511         
00517         bool getTsysFlag() const;
00518         
00519  
00520         
00521         
00528         void setTsysFlag (bool tsysFlag);
00529                 
00530         
00531         
00532         
00536         void clearTsysFlag ();
00537         
00538 
00539 
00540         
00541         // ===> Attribute tsysSpectrum, which is optional
00542         
00543         
00544         
00549         bool isTsysSpectrumExists() const;
00550         
00551 
00552         
00558         vector<vector<Temperature > > getTsysSpectrum() const;
00559         
00560  
00561         
00562         
00569         void setTsysSpectrum (vector<vector<Temperature > > tsysSpectrum);
00570                 
00571         
00572         
00573         
00577         void clearTsysSpectrum ();
00578         
00579 
00580 
00581         
00582         // ===> Attribute tantFlag, which is optional
00583         
00584         
00585         
00590         bool isTantFlagExists() const;
00591         
00592 
00593         
00599         bool getTantFlag() const;
00600         
00601  
00602         
00603         
00610         void setTantFlag (bool tantFlag);
00611                 
00612         
00613         
00614         
00618         void clearTantFlag ();
00619         
00620 
00621 
00622         
00623         // ===> Attribute tantSpectrum, which is optional
00624         
00625         
00626         
00631         bool isTantSpectrumExists() const;
00632         
00633 
00634         
00640         vector<vector<float > > getTantSpectrum() const;
00641         
00642  
00643         
00644         
00651         void setTantSpectrum (vector<vector<float > > tantSpectrum);
00652                 
00653         
00654         
00655         
00659         void clearTantSpectrum ();
00660         
00661 
00662 
00663         
00664         // ===> Attribute tantTsysFlag, which is optional
00665         
00666         
00667         
00672         bool isTantTsysFlagExists() const;
00673         
00674 
00675         
00681         bool getTantTsysFlag() const;
00682         
00683  
00684         
00685         
00692         void setTantTsysFlag (bool tantTsysFlag);
00693                 
00694         
00695         
00696         
00700         void clearTantTsysFlag ();
00701         
00702 
00703 
00704         
00705         // ===> Attribute tantTsysSpectrum, which is optional
00706         
00707         
00708         
00713         bool isTantTsysSpectrumExists() const;
00714         
00715 
00716         
00722         vector<vector<float > > getTantTsysSpectrum() const;
00723         
00724  
00725         
00726         
00733         void setTantTsysSpectrum (vector<vector<float > > tantTsysSpectrum);
00734                 
00735         
00736         
00737         
00741         void clearTantTsysSpectrum ();
00742         
00743 
00744 
00745         
00746         // ===> Attribute phaseDiffFlag, which is optional
00747         
00748         
00749         
00754         bool isPhaseDiffFlagExists() const;
00755         
00756 
00757         
00763         bool getPhaseDiffFlag() const;
00764         
00765  
00766         
00767         
00774         void setPhaseDiffFlag (bool phaseDiffFlag);
00775                 
00776         
00777         
00778         
00782         void clearPhaseDiffFlag ();
00783         
00784 
00785 
00786         
00787         // ===> Attribute phaseDiffSpectrum, which is optional
00788         
00789         
00790         
00795         bool isPhaseDiffSpectrumExists() const;
00796         
00797 
00798         
00804         vector<vector<float > > getPhaseDiffSpectrum() const;
00805         
00806  
00807         
00808         
00815         void setPhaseDiffSpectrum (vector<vector<float > > phaseDiffSpectrum);
00816                 
00817         
00818         
00819         
00823         void clearPhaseDiffSpectrum ();
00824         
00825 
00826 
00828         // Extrinsic Table Attributes //
00830         
00831         
00832         // ===> Attribute antennaId
00833         
00834         
00835         
00836 
00837         
00842         Tag getAntennaId() const;
00843         
00844  
00845         
00846         
00856         void setAntennaId (Tag antennaId);
00857                 
00858         
00859         
00860         
00861 
00862 
00863         
00864         // ===> Attribute feedId
00865         
00866         
00867         
00868 
00869         
00874         int getFeedId() const;
00875         
00876  
00877         
00878         
00888         void setFeedId (int feedId);
00889                 
00890         
00891         
00892         
00893 
00894 
00895         
00896         // ===> Attribute spectralWindowId
00897         
00898         
00899         
00900 
00901         
00906         Tag getSpectralWindowId() const;
00907         
00908  
00909         
00910         
00920         void setSpectralWindowId (Tag spectralWindowId);
00921                 
00922         
00923         
00924         
00925 
00926 
00928         // Links //
00930         
00931         
00932 
00933         
00934                 
00941          AntennaRow* getAntennaUsingAntennaId();
00942          
00943 
00944         
00945 
00946         
00947 
00948         
00949                 
00950         // ===> Slice link from a row of SysCal table to a collection of row of Feed table.
00951         
00957         vector <FeedRow *> getFeeds();
00958         
00959         
00960 
00961         
00962 
00963         
00964 
00965         
00966                 
00973          SpectralWindowRow* getSpectralWindowUsingSpectralWindowId();
00974          
00975 
00976         
00977 
00978         
00979         
00980         
00998         bool compareNoAutoInc(Tag antennaId, Tag spectralWindowId, ArrayTimeInterval timeInterval, int feedId, int numReceptor, int numChan);
00999         
01000         
01001 
01002         
01012         bool compareRequiredValue(int numReceptor, int numChan); 
01013                  
01014         
01023         bool equalByRequiredValue(SysCalRow* x) ;
01024         
01025 #ifndef WITHOUT_ACS
01026 
01030         asdmIDL::SysCalRowIDL *toIDL() const;
01031 #endif
01032         
01033 #ifndef WITHOUT_ACS
01034 
01039         void setFromIDL (asdmIDL::SysCalRowIDL x) ;
01040 #endif
01041         
01046         std::string toXML() const;
01047 
01054         void setFromXML (std::string rowDoc) ;
01055 
01058         // binary-deserialization material from an EndianIStream  //
01060 
01061         std::map<std::string, SysCalAttributeFromBin> fromBinMethods;
01062 void antennaIdFromBin( EndianIStream& eis);
01063 void spectralWindowIdFromBin( EndianIStream& eis);
01064 void timeIntervalFromBin( EndianIStream& eis);
01065 void feedIdFromBin( EndianIStream& eis);
01066 void numReceptorFromBin( EndianIStream& eis);
01067 void numChanFromBin( EndianIStream& eis);
01068 
01069 void tcalFlagFromBin( EndianIStream& eis);
01070 void tcalSpectrumFromBin( EndianIStream& eis);
01071 void trxFlagFromBin( EndianIStream& eis);
01072 void trxSpectrumFromBin( EndianIStream& eis);
01073 void tskyFlagFromBin( EndianIStream& eis);
01074 void tskySpectrumFromBin( EndianIStream& eis);
01075 void tsysFlagFromBin( EndianIStream& eis);
01076 void tsysSpectrumFromBin( EndianIStream& eis);
01077 void tantFlagFromBin( EndianIStream& eis);
01078 void tantSpectrumFromBin( EndianIStream& eis);
01079 void tantTsysFlagFromBin( EndianIStream& eis);
01080 void tantTsysSpectrumFromBin( EndianIStream& eis);
01081 void phaseDiffFlagFromBin( EndianIStream& eis);
01082 void phaseDiffSpectrumFromBin( EndianIStream& eis);
01083 
01084 
01092          static SysCalRow* fromBin(EndianIStream& eis, SysCalTable& table, const std::vector<std::string>& attributesSeq);       
01094 
01095 private:
01099         SysCalTable &table;
01103         bool hasBeenAdded;
01104 
01105         // This method is used by the Table class when this row is added to the table.
01106         void isAdded(bool added);
01107 
01108 
01117         SysCalRow (SysCalTable &table);
01118 
01136          SysCalRow (SysCalTable &table, SysCalRow &row);
01137                 
01139         // Intrinsic Table Attributes //
01141         
01142         
01143         // ===> Attribute timeInterval
01144         
01145         
01146 
01147         ArrayTimeInterval timeInterval;
01148 
01149         
01150         
01151         
01152 
01153         
01154         // ===> Attribute numReceptor
01155         
01156         
01157 
01158         int numReceptor;
01159 
01160         
01161         
01162         
01163 
01164         
01165         // ===> Attribute numChan
01166         
01167         
01168 
01169         int numChan;
01170 
01171         
01172         
01173         
01174 
01175         
01176         // ===> Attribute tcalFlag, which is optional
01177         
01178         
01179         bool tcalFlagExists;
01180         
01181 
01182         bool tcalFlag;
01183 
01184         
01185         
01186         
01187 
01188         
01189         // ===> Attribute tcalSpectrum, which is optional
01190         
01191         
01192         bool tcalSpectrumExists;
01193         
01194 
01195         vector<vector<Temperature > > tcalSpectrum;
01196 
01197         
01198         
01199         
01200 
01201         
01202         // ===> Attribute trxFlag, which is optional
01203         
01204         
01205         bool trxFlagExists;
01206         
01207 
01208         bool trxFlag;
01209 
01210         
01211         
01212         
01213 
01214         
01215         // ===> Attribute trxSpectrum, which is optional
01216         
01217         
01218         bool trxSpectrumExists;
01219         
01220 
01221         vector<vector<Temperature > > trxSpectrum;
01222 
01223         
01224         
01225         
01226 
01227         
01228         // ===> Attribute tskyFlag, which is optional
01229         
01230         
01231         bool tskyFlagExists;
01232         
01233 
01234         bool tskyFlag;
01235 
01236         
01237         
01238         
01239 
01240         
01241         // ===> Attribute tskySpectrum, which is optional
01242         
01243         
01244         bool tskySpectrumExists;
01245         
01246 
01247         vector<vector<Temperature > > tskySpectrum;
01248 
01249         
01250         
01251         
01252 
01253         
01254         // ===> Attribute tsysFlag, which is optional
01255         
01256         
01257         bool tsysFlagExists;
01258         
01259 
01260         bool tsysFlag;
01261 
01262         
01263         
01264         
01265 
01266         
01267         // ===> Attribute tsysSpectrum, which is optional
01268         
01269         
01270         bool tsysSpectrumExists;
01271         
01272 
01273         vector<vector<Temperature > > tsysSpectrum;
01274 
01275         
01276         
01277         
01278 
01279         
01280         // ===> Attribute tantFlag, which is optional
01281         
01282         
01283         bool tantFlagExists;
01284         
01285 
01286         bool tantFlag;
01287 
01288         
01289         
01290         
01291 
01292         
01293         // ===> Attribute tantSpectrum, which is optional
01294         
01295         
01296         bool tantSpectrumExists;
01297         
01298 
01299         vector<vector<float > > tantSpectrum;
01300 
01301         
01302         
01303         
01304 
01305         
01306         // ===> Attribute tantTsysFlag, which is optional
01307         
01308         
01309         bool tantTsysFlagExists;
01310         
01311 
01312         bool tantTsysFlag;
01313 
01314         
01315         
01316         
01317 
01318         
01319         // ===> Attribute tantTsysSpectrum, which is optional
01320         
01321         
01322         bool tantTsysSpectrumExists;
01323         
01324 
01325         vector<vector<float > > tantTsysSpectrum;
01326 
01327         
01328         
01329         
01330 
01331         
01332         // ===> Attribute phaseDiffFlag, which is optional
01333         
01334         
01335         bool phaseDiffFlagExists;
01336         
01337 
01338         bool phaseDiffFlag;
01339 
01340         
01341         
01342         
01343 
01344         
01345         // ===> Attribute phaseDiffSpectrum, which is optional
01346         
01347         
01348         bool phaseDiffSpectrumExists;
01349         
01350 
01351         vector<vector<float > > phaseDiffSpectrum;
01352 
01353         
01354         
01355         
01356 
01358         // Extrinsic Table Attributes //
01360         
01361         
01362         // ===> Attribute antennaId
01363         
01364         
01365 
01366         Tag antennaId;
01367 
01368         
01369         
01370         
01371 
01372         
01373         // ===> Attribute feedId
01374         
01375         
01376 
01377         int feedId;
01378 
01379         
01380         
01381         
01382 
01383         
01384         // ===> Attribute spectralWindowId
01385         
01386         
01387 
01388         Tag spectralWindowId;
01389 
01390         
01391         
01392         
01393 
01395         // Links //
01397         
01398         
01399                 
01400 
01401          
01402 
01403         
01404 
01405         
01406                 
01407 
01408 
01409         
01410 
01411         
01412                 
01413 
01414          
01415 
01416         
01417 
01418         
01419 /*
01421         // binary-deserialization material from an EndianIStream  //
01423         std::map<std::string, SysCalAttributeFromBin> fromBinMethods;
01424 void antennaIdFromBin( EndianIStream& eis);
01425 void spectralWindowIdFromBin( EndianIStream& eis);
01426 void timeIntervalFromBin( EndianIStream& eis);
01427 void feedIdFromBin( EndianIStream& eis);
01428 void numReceptorFromBin( EndianIStream& eis);
01429 void numChanFromBin( EndianIStream& eis);
01430 
01431 void tcalFlagFromBin( EndianIStream& eis);
01432 void tcalSpectrumFromBin( EndianIStream& eis);
01433 void trxFlagFromBin( EndianIStream& eis);
01434 void trxSpectrumFromBin( EndianIStream& eis);
01435 void tskyFlagFromBin( EndianIStream& eis);
01436 void tskySpectrumFromBin( EndianIStream& eis);
01437 void tsysFlagFromBin( EndianIStream& eis);
01438 void tsysSpectrumFromBin( EndianIStream& eis);
01439 void tantFlagFromBin( EndianIStream& eis);
01440 void tantSpectrumFromBin( EndianIStream& eis);
01441 void tantTsysFlagFromBin( EndianIStream& eis);
01442 void tantTsysSpectrumFromBin( EndianIStream& eis);
01443 void phaseDiffFlagFromBin( EndianIStream& eis);
01444 void phaseDiffSpectrumFromBin( EndianIStream& eis);
01445 
01446 */
01447         
01449         // text-deserialization material //
01451         std::map<std::string, SysCalAttributeFromText> fromTextMethods;
01452         
01453 void antennaIdFromText (const string & s);
01454         
01455         
01456 void spectralWindowIdFromText (const string & s);
01457         
01458         
01459 void timeIntervalFromText (const string & s);
01460         
01461         
01462 void feedIdFromText (const string & s);
01463         
01464         
01465 void numReceptorFromText (const string & s);
01466         
01467         
01468 void numChanFromText (const string & s);
01469         
01470 
01471         
01472 void tcalFlagFromText (const string & s);
01473         
01474         
01475 void tcalSpectrumFromText (const string & s);
01476         
01477         
01478 void trxFlagFromText (const string & s);
01479         
01480         
01481 void trxSpectrumFromText (const string & s);
01482         
01483         
01484 void tskyFlagFromText (const string & s);
01485         
01486         
01487 void tskySpectrumFromText (const string & s);
01488         
01489         
01490 void tsysFlagFromText (const string & s);
01491         
01492         
01493 void tsysSpectrumFromText (const string & s);
01494         
01495         
01496 void tantFlagFromText (const string & s);
01497         
01498         
01499 void tantSpectrumFromText (const string & s);
01500         
01501         
01502 void tantTsysFlagFromText (const string & s);
01503         
01504         
01505 void tantTsysSpectrumFromText (const string & s);
01506         
01507         
01508 void phaseDiffFlagFromText (const string & s);
01509         
01510         
01511 void phaseDiffSpectrumFromText (const string & s);
01512         
01513         
01514         
01515         void fromText(const std::string& attributeName, const std::string&  t);
01516         
01521          void toBin(EndianOSStream& eoss);
01522                  
01532 };
01533 
01534 } // End namespace asdm
01535 
01536 #endif /* SysCal_CLASS */