CalPointingModelTable.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 CalPointingModelTable.h
00032  */
00033  
00034 #ifndef CalPointingModelTable_CLASS
00035 #define CalPointingModelTable_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 
00057 
00058 
00059         
00060 
00061         
00062 #include "CReceiverBand.h"
00063 using namespace ReceiverBandMod;
00064         
00065 
00066         
00067 
00068         
00069 
00070         
00071 #include "CAntennaMake.h"
00072 using namespace AntennaMakeMod;
00073         
00074 
00075         
00076 #include "CPointingModelMode.h"
00077 using namespace PointingModelModeMod;
00078         
00079 
00080         
00081 #include "CPolarizationType.h"
00082 using namespace PolarizationTypeMod;
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 
00109 #include <ConversionException.h>
00110 #include <DuplicateKey.h>
00111 #include <UniquenessViolationException.h>
00112 #include <NoSuchRow.h>
00113 #include <DuplicateKey.h>
00114 using asdm::DuplicateKey;
00115 using asdm::ConversionException;
00116 using asdm::NoSuchRow;
00117 using asdm::DuplicateKey;
00118 
00119 #ifndef WITHOUT_ACS
00120 #include <asdmIDLC.h>
00121 using asdmIDL::CalPointingModelTableIDL;
00122 #endif
00123 
00124 #include <Representable.h>
00125 
00126 namespace asdm {
00127 
00128 //class asdm::ASDM;
00129 //class asdm::CalPointingModelRow;
00130 
00131 class ASDM;
00132 class CalPointingModelRow;
00308 class CalPointingModelTable : public Representable {
00309         friend class ASDM;
00310 
00311 public:
00312 
00313 
00319         static vector<string> getKeyName();
00320 
00321 
00322         virtual ~CalPointingModelTable();
00323         
00329         ASDM &getContainer() const;
00330         
00336         unsigned int size() ;
00337         
00343         string getName() const;
00344         
00350          static const vector<string>& getAttributesNames();
00351 
00355         Entity getEntity() const;
00356 
00361         void setEntity(Entity e);
00362                 
00370         string toXML()  ;
00371 
00372 #ifndef WITHOUT_ACS
00373         // Conversion Methods
00379         CalPointingModelTableIDL *toIDL() ;
00380 #endif
00381 
00382 #ifndef WITHOUT_ACS
00383 
00389         void fromIDL(CalPointingModelTableIDL x) ;
00390 #endif
00391         
00392         //
00393         // ====> Row creation.
00394         //
00395         
00400         CalPointingModelRow *newRow();
00401         
00402         
00444         CalPointingModelRow *newRow(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, AntennaMakeMod::AntennaMake antennaMake, PointingModelModeMod::PointingModelMode pointingModelMode, PolarizationTypeMod::PolarizationType polarizationType, int numCoeff, vector<string > coeffName, vector<float > coeffVal, vector<float > coeffError, vector<bool > coeffFixed, Angle azimuthRMS, Angle elevationRms, Angle skyRMS, double reducedChiSquared);
00445         
00446 
00447 
00460          CalPointingModelRow *newRow(CalPointingModelRow *row); 
00461 
00462         //
00463         // ====> Append a row to its table.
00464         //
00465  
00466         
00479         CalPointingModelRow* add(CalPointingModelRow* x) ; 
00480 
00481  
00482 
00483 
00484 
00485         //
00486         // ====> Methods returning rows.
00487         //
00488                 
00494         vector<CalPointingModelRow *> get() ;
00495         
00496 
00497 
00498  
00499         
00515         CalPointingModelRow* getRowByKey(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId);
00516 
00517                 
00518 
00519 
00520 
00564         CalPointingModelRow* lookup(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, AntennaMakeMod::AntennaMake antennaMake, PointingModelModeMod::PointingModelMode pointingModelMode, PolarizationTypeMod::PolarizationType polarizationType, int numCoeff, vector<string > coeffName, vector<float > coeffVal, vector<float > coeffError, vector<bool > coeffFixed, Angle azimuthRMS, Angle elevationRms, Angle skyRMS, double reducedChiSquared); 
00565 
00566 
00567 private:
00568 
00577         CalPointingModelTable (ASDM & container);
00578 
00579         ASDM & container;
00580         
00581         bool archiveAsBin; // If true archive binary else archive XML
00582         bool fileAsBin ; // If true file binary else file XML   
00583         
00584         Entity entity;
00585         
00586 
00587 
00591         static string tableName;
00592         
00596         static const vector<string> attributesNames;
00597         
00601         static vector<string> initAttributesNames();
00602 
00603 
00607         static vector<string> key;
00608 
00609 
00617         CalPointingModelRow* checkAndAdd(CalPointingModelRow* x) ;
00618 
00619 
00620 
00621 // A data structure to store the pointers on the table's rows.
00622 
00623 // In all cases we maintain a private vector of CalPointingModelRow s.
00624    vector<CalPointingModelRow * > privateRows;
00625    
00626 
00627                         
00628         vector<CalPointingModelRow *> row;
00629 
00630         
00631         void error() ; //throw(ConversionException);
00632 
00633         
00640         void fromXML(string xmlDoc) ;
00641                 
00646         void setFromMIMEFile(const string& directory);
00647         void setFromXMLFile(const string& directory);
00648         
00656         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00657   
00658         
00665          void setFromMIME(const string & mimeMsg);
00666         
00670         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00671         
00681           void toFile(string directory);
00682           
00691          void setFromFile(const string& directory);     
00692  
00693 };
00694 
00695 } // End namespace asdm
00696 
00697 #endif /* CalPointingModelTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines