CalFocusTable.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 CalFocusTable.h
00032  */
00033  
00034 #ifndef CalFocusTable_CLASS
00035 #define CalFocusTable_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 <Temperature.h>
00051 using  asdm::Temperature;
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 
00070         
00071 
00072         
00073 
00074         
00075 #include "CReceiverBand.h"
00076 using namespace ReceiverBandMod;
00077         
00078 
00079         
00080 
00081         
00082 #include "CAtmPhaseCorrection.h"
00083 using namespace AtmPhaseCorrectionMod;
00084         
00085 
00086         
00087 #include "CFocusMethod.h"
00088 using namespace FocusMethodMod;
00089         
00090 
00091         
00092 
00093         
00094 
00095         
00096 
00097         
00098 #include "CPolarizationType.h"
00099 using namespace PolarizationTypeMod;
00100         
00101 
00102         
00103 
00104         
00105 
00106         
00107 
00108         
00109 
00110         
00111 
00112         
00113 
00114         
00115 
00116         
00117 
00118         
00119 
00120         
00121 
00122         
00123 
00124         
00125 
00126         
00127 
00128         
00129 
00130         
00131 
00132 
00133 
00134 #include <ConversionException.h>
00135 #include <DuplicateKey.h>
00136 #include <UniquenessViolationException.h>
00137 #include <NoSuchRow.h>
00138 #include <DuplicateKey.h>
00139 using asdm::DuplicateKey;
00140 using asdm::ConversionException;
00141 using asdm::NoSuchRow;
00142 using asdm::DuplicateKey;
00143 
00144 #ifndef WITHOUT_ACS
00145 #include <asdmIDLC.h>
00146 using asdmIDL::CalFocusTableIDL;
00147 #endif
00148 
00149 #include <Representable.h>
00150 
00151 namespace asdm {
00152 
00153 //class asdm::ASDM;
00154 //class asdm::CalFocusRow;
00155 
00156 class ASDM;
00157 class CalFocusRow;
00389 class CalFocusTable : public Representable {
00390         friend class ASDM;
00391 
00392 public:
00393 
00394 
00400         static vector<string> getKeyName();
00401 
00402 
00403         virtual ~CalFocusTable();
00404         
00410         ASDM &getContainer() const;
00411         
00417         unsigned int size() ;
00418         
00424         string getName() const;
00425         
00431          static const vector<string>& getAttributesNames();
00432 
00436         Entity getEntity() const;
00437 
00442         void setEntity(Entity e);
00443                 
00451         string toXML()  ;
00452 
00453 #ifndef WITHOUT_ACS
00454         // Conversion Methods
00460         CalFocusTableIDL *toIDL() ;
00461 #endif
00462 
00463 #ifndef WITHOUT_ACS
00464 
00470         void fromIDL(CalFocusTableIDL x) ;
00471 #endif
00472         
00473         //
00474         // ====> Row creation.
00475         //
00476         
00481         CalFocusRow *newRow();
00482         
00483         
00525         CalFocusRow *newRow(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, Temperature ambientTemperature, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, FocusMethodMod::FocusMethod focusMethod, vector<Frequency > frequencyRange, vector<Angle > pointingDirection, int numReceptor, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<bool > wereFixed, vector<vector<Length > > offset, vector<vector<Length > > offsetError, vector<vector<bool > > offsetWasTied, vector<vector<double > > reducedChiSquared);
00526         
00527 
00528 
00541          CalFocusRow *newRow(CalFocusRow *row); 
00542 
00543         //
00544         // ====> Append a row to its table.
00545         //
00546  
00547         
00560         CalFocusRow* add(CalFocusRow* x) ; 
00561 
00562  
00563 
00564 
00565 
00566         //
00567         // ====> Methods returning rows.
00568         //
00569                 
00575         vector<CalFocusRow *> get() ;
00576         
00577 
00578 
00579  
00580         
00596         CalFocusRow* getRowByKey(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId);
00597 
00598                 
00599 
00600 
00601 
00645         CalFocusRow* lookup(string antennaName, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, Temperature ambientTemperature, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, FocusMethodMod::FocusMethod focusMethod, vector<Frequency > frequencyRange, vector<Angle > pointingDirection, int numReceptor, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<bool > wereFixed, vector<vector<Length > > offset, vector<vector<Length > > offsetError, vector<vector<bool > > offsetWasTied, vector<vector<double > > reducedChiSquared); 
00646 
00647 
00648 private:
00649 
00658         CalFocusTable (ASDM & container);
00659 
00660         ASDM & container;
00661         
00662         bool archiveAsBin; // If true archive binary else archive XML
00663         bool fileAsBin ; // If true file binary else file XML   
00664         
00665         Entity entity;
00666         
00667 
00668 
00672         static string tableName;
00673         
00677         static const vector<string> attributesNames;
00678         
00682         static vector<string> initAttributesNames();
00683 
00684 
00688         static vector<string> key;
00689 
00690 
00698         CalFocusRow* checkAndAdd(CalFocusRow* x) ;
00699 
00700 
00701 
00702 // A data structure to store the pointers on the table's rows.
00703 
00704 // In all cases we maintain a private vector of CalFocusRow s.
00705    vector<CalFocusRow * > privateRows;
00706    
00707 
00708                         
00709         vector<CalFocusRow *> row;
00710 
00711         
00712         void error() ; //throw(ConversionException);
00713 
00714         
00721         void fromXML(string xmlDoc) ;
00722                 
00727         void setFromMIMEFile(const string& directory);
00728         void setFromXMLFile(const string& directory);
00729         
00737         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00738   
00739         
00746          void setFromMIME(const string & mimeMsg);
00747         
00751         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00752         
00762           void toFile(string directory);
00763           
00772          void setFromFile(const string& directory);     
00773  
00774 };
00775 
00776 } // End namespace asdm
00777 
00778 #endif /* CalFocusTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines