CalPhaseTable.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 CalPhaseTable.h
00032  */
00033  
00034 #ifndef CalPhaseTable_CLASS
00035 #define CalPhaseTable_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 <Interval.h>
00051 using  asdm::Interval;
00052 
00053 #include <Angle.h>
00054 using  asdm::Angle;
00055 
00056 #include <Tag.h>
00057 using  asdm::Tag;
00058 
00059 #include <Length.h>
00060 using  asdm::Length;
00061 
00062 #include <Frequency.h>
00063 using  asdm::Frequency;
00064 
00065 
00066 
00067 
00068         
00069 #include "CBasebandName.h"
00070 using namespace BasebandNameMod;
00071         
00072 
00073         
00074 #include "CReceiverBand.h"
00075 using namespace ReceiverBandMod;
00076         
00077 
00078         
00079 #include "CAtmPhaseCorrection.h"
00080 using namespace AtmPhaseCorrectionMod;
00081         
00082 
00083         
00084 
00085         
00086 
00087         
00088 
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097         
00098 
00099         
00100 
00101         
00102 
00103         
00104 
00105         
00106 
00107         
00108 #include "CPolarizationType.h"
00109 using namespace PolarizationTypeMod;
00110         
00111 
00112         
00113 
00114         
00115 
00116         
00117 
00118 
00119 
00120 #include <ConversionException.h>
00121 #include <DuplicateKey.h>
00122 #include <UniquenessViolationException.h>
00123 #include <NoSuchRow.h>
00124 #include <DuplicateKey.h>
00125 using asdm::DuplicateKey;
00126 using asdm::ConversionException;
00127 using asdm::NoSuchRow;
00128 using asdm::DuplicateKey;
00129 
00130 #ifndef WITHOUT_ACS
00131 #include <asdmIDLC.h>
00132 using asdmIDL::CalPhaseTableIDL;
00133 #endif
00134 
00135 #include <Representable.h>
00136 
00137 namespace asdm {
00138 
00139 //class asdm::ASDM;
00140 //class asdm::CalPhaseRow;
00141 
00142 class ASDM;
00143 class CalPhaseRow;
00328 class CalPhaseTable : public Representable {
00329         friend class ASDM;
00330 
00331 public:
00332 
00333 
00339         static vector<string> getKeyName();
00340 
00341 
00342         virtual ~CalPhaseTable();
00343         
00349         ASDM &getContainer() const;
00350         
00356         unsigned int size() ;
00357         
00363         string getName() const;
00364         
00370          static const vector<string>& getAttributesNames();
00371 
00375         Entity getEntity() const;
00376 
00381         void setEntity(Entity e);
00382                 
00390         string toXML()  ;
00391 
00392 #ifndef WITHOUT_ACS
00393         // Conversion Methods
00399         CalPhaseTableIDL *toIDL() ;
00400 #endif
00401 
00402 #ifndef WITHOUT_ACS
00403 
00409         void fromIDL(CalPhaseTableIDL x) ;
00410 #endif
00411         
00412         //
00413         // ====> Row creation.
00414         //
00415         
00420         CalPhaseRow *newRow();
00421         
00422         
00468         CalPhaseRow *newRow(BasebandNameMod::BasebandName basebandName, ReceiverBandMod::ReceiverBand receiverBand, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numBaseline, int numReceptor, vector<vector<float > > ampli, vector<vector<string > > antennaNames, vector<Length > baselineLengths, vector<vector<float > > decorrelationFactor, vector<Angle > direction, vector<Frequency > frequencyRange, Interval integrationTime, vector<vector<float > > phase, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<float > > phaseRMS, vector<vector<float > > statPhaseRMS);
00469         
00470 
00471 
00484          CalPhaseRow *newRow(CalPhaseRow *row); 
00485 
00486         //
00487         // ====> Append a row to its table.
00488         //
00489  
00490         
00503         CalPhaseRow* add(CalPhaseRow* x) ; 
00504 
00505  
00506 
00507 
00508 
00509         //
00510         // ====> Methods returning rows.
00511         //
00512                 
00518         vector<CalPhaseRow *> get() ;
00519         
00520 
00521 
00522  
00523         
00541         CalPhaseRow* getRowByKey(BasebandNameMod::BasebandName basebandName, ReceiverBandMod::ReceiverBand receiverBand, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId);
00542 
00543                 
00544 
00545 
00546 
00594         CalPhaseRow* lookup(BasebandNameMod::BasebandName basebandName, ReceiverBandMod::ReceiverBand receiverBand, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numBaseline, int numReceptor, vector<vector<float > > ampli, vector<vector<string > > antennaNames, vector<Length > baselineLengths, vector<vector<float > > decorrelationFactor, vector<Angle > direction, vector<Frequency > frequencyRange, Interval integrationTime, vector<vector<float > > phase, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<float > > phaseRMS, vector<vector<float > > statPhaseRMS); 
00595 
00596 
00597 private:
00598 
00607         CalPhaseTable (ASDM & container);
00608 
00609         ASDM & container;
00610         
00611         bool archiveAsBin; // If true archive binary else archive XML
00612         bool fileAsBin ; // If true file binary else file XML   
00613         
00614         Entity entity;
00615         
00616 
00617 
00621         static string tableName;
00622         
00626         static const vector<string> attributesNames;
00627         
00631         static vector<string> initAttributesNames();
00632 
00633 
00637         static vector<string> key;
00638 
00639 
00647         CalPhaseRow* checkAndAdd(CalPhaseRow* x) ;
00648 
00649 
00650 
00651 // A data structure to store the pointers on the table's rows.
00652 
00653 // In all cases we maintain a private vector of CalPhaseRow s.
00654    vector<CalPhaseRow * > privateRows;
00655    
00656 
00657                         
00658         vector<CalPhaseRow *> row;
00659 
00660         
00661         void error() ; //throw(ConversionException);
00662 
00663         
00670         void fromXML(string xmlDoc) ;
00671                 
00676         void setFromMIMEFile(const string& directory);
00677         void setFromXMLFile(const string& directory);
00678         
00686         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00687   
00688         
00695          void setFromMIME(const string & mimeMsg);
00696         
00700         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00701         
00711           void toFile(string directory);
00712           
00721          void setFromFile(const string& directory);     
00722  
00723 };
00724 
00725 } // End namespace asdm
00726 
00727 #endif /* CalPhaseTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines