casa  $Rev:20696$
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.62", 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);       
01093  
01100          void fromText(const std::string& attributeName, const std::string&  t);
01102 
01103 private:
01107         SysCalTable &table;
01111         bool hasBeenAdded;
01112 
01113         // This method is used by the Table class when this row is added to the table.
01114         void isAdded(bool added);
01115 
01116 
01125         SysCalRow (SysCalTable &table);
01126 
01144          SysCalRow (SysCalTable &table, SysCalRow &row);
01145                 
01147         // Intrinsic Table Attributes //
01149         
01150         
01151         // ===> Attribute timeInterval
01152         
01153         
01154 
01155         ArrayTimeInterval timeInterval;
01156 
01157         
01158         
01159         
01160 
01161         
01162         // ===> Attribute numReceptor
01163         
01164         
01165 
01166         int numReceptor;
01167 
01168         
01169         
01170         
01171 
01172         
01173         // ===> Attribute numChan
01174         
01175         
01176 
01177         int numChan;
01178 
01179         
01180         
01181         
01182 
01183         
01184         // ===> Attribute tcalFlag, which is optional
01185         
01186         
01187         bool tcalFlagExists;
01188         
01189 
01190         bool tcalFlag;
01191 
01192         
01193         
01194         
01195 
01196         
01197         // ===> Attribute tcalSpectrum, which is optional
01198         
01199         
01200         bool tcalSpectrumExists;
01201         
01202 
01203         vector<vector<Temperature > > tcalSpectrum;
01204 
01205         
01206         
01207         
01208 
01209         
01210         // ===> Attribute trxFlag, which is optional
01211         
01212         
01213         bool trxFlagExists;
01214         
01215 
01216         bool trxFlag;
01217 
01218         
01219         
01220         
01221 
01222         
01223         // ===> Attribute trxSpectrum, which is optional
01224         
01225         
01226         bool trxSpectrumExists;
01227         
01228 
01229         vector<vector<Temperature > > trxSpectrum;
01230 
01231         
01232         
01233         
01234 
01235         
01236         // ===> Attribute tskyFlag, which is optional
01237         
01238         
01239         bool tskyFlagExists;
01240         
01241 
01242         bool tskyFlag;
01243 
01244         
01245         
01246         
01247 
01248         
01249         // ===> Attribute tskySpectrum, which is optional
01250         
01251         
01252         bool tskySpectrumExists;
01253         
01254 
01255         vector<vector<Temperature > > tskySpectrum;
01256 
01257         
01258         
01259         
01260 
01261         
01262         // ===> Attribute tsysFlag, which is optional
01263         
01264         
01265         bool tsysFlagExists;
01266         
01267 
01268         bool tsysFlag;
01269 
01270         
01271         
01272         
01273 
01274         
01275         // ===> Attribute tsysSpectrum, which is optional
01276         
01277         
01278         bool tsysSpectrumExists;
01279         
01280 
01281         vector<vector<Temperature > > tsysSpectrum;
01282 
01283         
01284         
01285         
01286 
01287         
01288         // ===> Attribute tantFlag, which is optional
01289         
01290         
01291         bool tantFlagExists;
01292         
01293 
01294         bool tantFlag;
01295 
01296         
01297         
01298         
01299 
01300         
01301         // ===> Attribute tantSpectrum, which is optional
01302         
01303         
01304         bool tantSpectrumExists;
01305         
01306 
01307         vector<vector<float > > tantSpectrum;
01308 
01309         
01310         
01311         
01312 
01313         
01314         // ===> Attribute tantTsysFlag, which is optional
01315         
01316         
01317         bool tantTsysFlagExists;
01318         
01319 
01320         bool tantTsysFlag;
01321 
01322         
01323         
01324         
01325 
01326         
01327         // ===> Attribute tantTsysSpectrum, which is optional
01328         
01329         
01330         bool tantTsysSpectrumExists;
01331         
01332 
01333         vector<vector<float > > tantTsysSpectrum;
01334 
01335         
01336         
01337         
01338 
01339         
01340         // ===> Attribute phaseDiffFlag, which is optional
01341         
01342         
01343         bool phaseDiffFlagExists;
01344         
01345 
01346         bool phaseDiffFlag;
01347 
01348         
01349         
01350         
01351 
01352         
01353         // ===> Attribute phaseDiffSpectrum, which is optional
01354         
01355         
01356         bool phaseDiffSpectrumExists;
01357         
01358 
01359         vector<vector<float > > phaseDiffSpectrum;
01360 
01361         
01362         
01363         
01364 
01366         // Extrinsic Table Attributes //
01368         
01369         
01370         // ===> Attribute antennaId
01371         
01372         
01373 
01374         Tag antennaId;
01375 
01376         
01377         
01378         
01379 
01380         
01381         // ===> Attribute feedId
01382         
01383         
01384 
01385         int feedId;
01386 
01387         
01388         
01389         
01390 
01391         
01392         // ===> Attribute spectralWindowId
01393         
01394         
01395 
01396         Tag spectralWindowId;
01397 
01398         
01399         
01400         
01401 
01403         // Links //
01405         
01406         
01407                 
01408 
01409          
01410 
01411         
01412 
01413         
01414                 
01415 
01416 
01417         
01418 
01419         
01420                 
01421 
01422          
01423 
01424         
01425 
01426         
01427 /*
01429         // binary-deserialization material from an EndianIStream  //
01431         std::map<std::string, SysCalAttributeFromBin> fromBinMethods;
01432 void antennaIdFromBin( EndianIStream& eis);
01433 void spectralWindowIdFromBin( EndianIStream& eis);
01434 void timeIntervalFromBin( EndianIStream& eis);
01435 void feedIdFromBin( EndianIStream& eis);
01436 void numReceptorFromBin( EndianIStream& eis);
01437 void numChanFromBin( EndianIStream& eis);
01438 
01439 void tcalFlagFromBin( EndianIStream& eis);
01440 void tcalSpectrumFromBin( EndianIStream& eis);
01441 void trxFlagFromBin( EndianIStream& eis);
01442 void trxSpectrumFromBin( EndianIStream& eis);
01443 void tskyFlagFromBin( EndianIStream& eis);
01444 void tskySpectrumFromBin( EndianIStream& eis);
01445 void tsysFlagFromBin( EndianIStream& eis);
01446 void tsysSpectrumFromBin( EndianIStream& eis);
01447 void tantFlagFromBin( EndianIStream& eis);
01448 void tantSpectrumFromBin( EndianIStream& eis);
01449 void tantTsysFlagFromBin( EndianIStream& eis);
01450 void tantTsysSpectrumFromBin( EndianIStream& eis);
01451 void phaseDiffFlagFromBin( EndianIStream& eis);
01452 void phaseDiffSpectrumFromBin( EndianIStream& eis);
01453 
01454 */
01455         
01457         // text-deserialization material //
01459         std::map<std::string, SysCalAttributeFromText> fromTextMethods;
01460         
01461 void antennaIdFromText (const string & s);
01462         
01463         
01464 void spectralWindowIdFromText (const string & s);
01465         
01466         
01467 void timeIntervalFromText (const string & s);
01468         
01469         
01470 void feedIdFromText (const string & s);
01471         
01472         
01473 void numReceptorFromText (const string & s);
01474         
01475         
01476 void numChanFromText (const string & s);
01477         
01478 
01479         
01480 void tcalFlagFromText (const string & s);
01481         
01482         
01483 void tcalSpectrumFromText (const string & s);
01484         
01485         
01486 void trxFlagFromText (const string & s);
01487         
01488         
01489 void trxSpectrumFromText (const string & s);
01490         
01491         
01492 void tskyFlagFromText (const string & s);
01493         
01494         
01495 void tskySpectrumFromText (const string & s);
01496         
01497         
01498 void tsysFlagFromText (const string & s);
01499         
01500         
01501 void tsysSpectrumFromText (const string & s);
01502         
01503         
01504 void tantFlagFromText (const string & s);
01505         
01506         
01507 void tantSpectrumFromText (const string & s);
01508         
01509         
01510 void tantTsysFlagFromText (const string & s);
01511         
01512         
01513 void tantTsysSpectrumFromText (const string & s);
01514         
01515         
01516 void phaseDiffFlagFromText (const string & s);
01517         
01518         
01519 void phaseDiffSpectrumFromText (const string & s);
01520         
01521         
01522         
01527          void toBin(EndianOSStream& eoss);
01528                  
01538 };
01539 
01540 } // End namespace asdm
01541 
01542 #endif /* SysCal_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines