CalDelayTable.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 CalDelayTable.h
00032  */
00033  
00034 #ifndef CalDelayTable_CLASS
00035 #define CalDelayTable_CLASS
00036 
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040 #include <set>
00041 using std::string;
00042 using std::vector;
00043 using std::map;
00044 
00045 
00046 
00047 #include <ArrayTime.h>
00048 using  asdm::ArrayTime;
00049 
00050 #include <Angle.h>
00051 using  asdm::Angle;
00052 
00053 #include <Tag.h>
00054 using  asdm::Tag;
00055 
00056 #include <Frequency.h>
00057 using  asdm::Frequency;
00058 
00059 
00060 
00061 
00062         
00063 
00064         
00065 #include "CAtmPhaseCorrection.h"
00066 using namespace AtmPhaseCorrectionMod;
00067         
00068 
00069         
00070 #include "CBasebandName.h"
00071 using namespace BasebandNameMod;
00072         
00073 
00074         
00075 #include "CReceiverBand.h"
00076 using namespace ReceiverBandMod;
00077         
00078 
00079         
00080 
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 #include "CPolarizationType.h"
00093 using namespace PolarizationTypeMod;
00094         
00095 
00096         
00097 
00098         
00099 
00100         
00101 
00102         
00103 
00104         
00105 
00106         
00107 
00108         
00109 #include "CReceiverSideband.h"
00110 using namespace ReceiverSidebandMod;
00111         
00112 
00113 
00114 
00115 #include <ConversionException.h>
00116 #include <DuplicateKey.h>
00117 #include <UniquenessViolationException.h>
00118 #include <NoSuchRow.h>
00119 #include <DuplicateKey.h>
00120 using asdm::DuplicateKey;
00121 using asdm::ConversionException;
00122 using asdm::NoSuchRow;
00123 using asdm::DuplicateKey;
00124 
00125 #ifndef WITHOUT_ACS
00126 #include <asdmIDLC.h>
00127 using asdmIDL::CalDelayTableIDL;
00128 #endif
00129 
00130 #include <Representable.h>
00131 
00132 namespace asdm {
00133 
00134 //class asdm::ASDM;
00135 //class asdm::CalDelayRow;
00136 
00137 class ASDM;
00138 class CalDelayRow;
00318 class CalDelayTable : public Representable {
00319         friend class ASDM;
00320 
00321 public:
00322 
00323 
00329         static vector<string> getKeyName();
00330 
00331 
00332         virtual ~CalDelayTable();
00333         
00339         ASDM &getContainer() const;
00340         
00346         unsigned int size() ;
00347         
00353         string getName() const;
00354         
00360          static const vector<string>& getAttributesNames();
00361 
00365         Entity getEntity() const;
00366 
00371         void setEntity(Entity e);
00372                 
00380         string toXML()  ;
00381 
00382 #ifndef WITHOUT_ACS
00383         // Conversion Methods
00389         CalDelayTableIDL *toIDL() ;
00390 #endif
00391 
00392 #ifndef WITHOUT_ACS
00393 
00399         void fromIDL(CalDelayTableIDL x) ;
00400 #endif
00401         
00402         //
00403         // ====> Row creation.
00404         //
00405         
00410         CalDelayRow *newRow();
00411         
00412         
00446         CalDelayRow *newRow(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, BasebandNameMod::BasebandName basebandName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, string refAntennaName, int numReceptor, vector<double > delayError, vector<double > delayOffset, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<double > reducedChiSquared);
00447         
00448 
00449 
00462          CalDelayRow *newRow(CalDelayRow *row); 
00463 
00464         //
00465         // ====> Append a row to its table.
00466         //
00467  
00468         
00481         CalDelayRow* add(CalDelayRow* x) ; 
00482 
00483  
00484 
00485 
00486 
00487         //
00488         // ====> Methods returning rows.
00489         //
00490                 
00496         vector<CalDelayRow *> get() ;
00497         
00498 
00499 
00500  
00501         
00521         CalDelayRow* getRowByKey(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, BasebandNameMod::BasebandName basebandName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId);
00522 
00523                 
00524 
00525 
00526 
00562         CalDelayRow* lookup(string antennaName, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, BasebandNameMod::BasebandName basebandName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, string refAntennaName, int numReceptor, vector<double > delayError, vector<double > delayOffset, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<double > reducedChiSquared); 
00563 
00564 
00565 private:
00566 
00575         CalDelayTable (ASDM & container);
00576 
00577         ASDM & container;
00578         
00579         bool archiveAsBin; // If true archive binary else archive XML
00580         bool fileAsBin ; // If true file binary else file XML   
00581         
00582         Entity entity;
00583         
00584 
00585 
00589         static string tableName;
00590         
00594         static const vector<string> attributesNames;
00595         
00599         static vector<string> initAttributesNames();
00600 
00601 
00605         static vector<string> key;
00606 
00607 
00615         CalDelayRow* checkAndAdd(CalDelayRow* x) ;
00616 
00617 
00618 
00619 // A data structure to store the pointers on the table's rows.
00620 
00621 // In all cases we maintain a private vector of CalDelayRow s.
00622    vector<CalDelayRow * > privateRows;
00623    
00624 
00625                         
00626         vector<CalDelayRow *> row;
00627 
00628         
00629         void error() ; //throw(ConversionException);
00630 
00631         
00638         void fromXML(string xmlDoc) ;
00639                 
00644         void setFromMIMEFile(const string& directory);
00645         void setFromXMLFile(const string& directory);
00646         
00654         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00655   
00656         
00663          void setFromMIME(const string & mimeMsg);
00664         
00668         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00669         
00679           void toFile(string directory);
00680           
00689          void setFromFile(const string& directory);     
00690  
00691 };
00692 
00693 } // End namespace asdm
00694 
00695 #endif /* CalDelayTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines