CalBandpassTable.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 CalBandpassTable.h
00032  */
00033  
00034 #ifndef CalBandpassTable_CLASS
00035 #define CalBandpassTable_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 <Tag.h>
00051 using  asdm::Tag;
00052 
00053 #include <Frequency.h>
00054 using  asdm::Frequency;
00055 
00056 
00057 
00058 
00059         
00060 #include "CBasebandName.h"
00061 using namespace BasebandNameMod;
00062         
00063 
00064         
00065 #include "CNetSideband.h"
00066 using namespace NetSidebandMod;
00067         
00068 
00069         
00070 #include "CAtmPhaseCorrection.h"
00071 using namespace AtmPhaseCorrectionMod;
00072         
00073 
00074         
00075 #include "CCalCurveType.h"
00076 using namespace CalCurveTypeMod;
00077         
00078 
00079         
00080 #include "CReceiverBand.h"
00081 using namespace ReceiverBandMod;
00082         
00083 
00084         
00085 
00086         
00087 
00088         
00089 
00090         
00091 
00092         
00093 
00094         
00095 
00096         
00097 
00098         
00099 
00100         
00101 #include "CPolarizationType.h"
00102 using namespace PolarizationTypeMod;
00103         
00104 
00105         
00106 
00107         
00108 
00109         
00110 
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::CalBandpassTableIDL;
00128 #endif
00129 
00130 #include <Representable.h>
00131 
00132 namespace asdm {
00133 
00134 //class asdm::ASDM;
00135 //class asdm::CalBandpassRow;
00136 
00137 class ASDM;
00138 class CalBandpassRow;
00320 class CalBandpassTable : public Representable {
00321         friend class ASDM;
00322 
00323 public:
00324 
00325 
00331         static vector<string> getKeyName();
00332 
00333 
00334         virtual ~CalBandpassTable();
00335         
00341         ASDM &getContainer() const;
00342         
00348         unsigned int size() ;
00349         
00355         string getName() const;
00356         
00362          static const vector<string>& getAttributesNames();
00363 
00367         Entity getEntity() const;
00368 
00373         void setEntity(Entity e);
00374                 
00382         string toXML()  ;
00383 
00384 #ifndef WITHOUT_ACS
00385         // Conversion Methods
00391         CalBandpassTableIDL *toIDL() ;
00392 #endif
00393 
00394 #ifndef WITHOUT_ACS
00395 
00401         void fromIDL(CalBandpassTableIDL x) ;
00402 #endif
00403         
00404         //
00405         // ====> Row creation.
00406         //
00407         
00412         CalBandpassRow *newRow();
00413         
00414         
00456         CalBandpassRow *newRow(BasebandNameMod::BasebandName basebandName, NetSidebandMod::NetSideband sideband, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, CalCurveTypeMod::CalCurveType typeCurve, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numAntenna, int numPoly, int numReceptor, vector<string > antennaNames, string refAntennaName, vector<Frequency > freqLimits, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<vector<float > > > curve, vector<double > reducedChiSquared);
00457         
00458 
00459 
00472          CalBandpassRow *newRow(CalBandpassRow *row); 
00473 
00474         //
00475         // ====> Append a row to its table.
00476         //
00477  
00478         
00491         CalBandpassRow* add(CalBandpassRow* x) ; 
00492 
00493  
00494 
00495 
00496 
00497         //
00498         // ====> Methods returning rows.
00499         //
00500                 
00506         vector<CalBandpassRow *> get() ;
00507         
00508 
00509 
00510  
00511         
00533         CalBandpassRow* getRowByKey(BasebandNameMod::BasebandName basebandName, NetSidebandMod::NetSideband sideband, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, CalCurveTypeMod::CalCurveType typeCurve, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId);
00534 
00535                 
00536 
00537 
00538 
00582         CalBandpassRow* lookup(BasebandNameMod::BasebandName basebandName, NetSidebandMod::NetSideband sideband, AtmPhaseCorrectionMod::AtmPhaseCorrection atmPhaseCorrection, CalCurveTypeMod::CalCurveType typeCurve, ReceiverBandMod::ReceiverBand receiverBand, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numAntenna, int numPoly, int numReceptor, vector<string > antennaNames, string refAntennaName, vector<Frequency > freqLimits, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<vector<float > > > curve, vector<double > reducedChiSquared); 
00583 
00584 
00585 private:
00586 
00595         CalBandpassTable (ASDM & container);
00596 
00597         ASDM & container;
00598         
00599         bool archiveAsBin; // If true archive binary else archive XML
00600         bool fileAsBin ; // If true file binary else file XML   
00601         
00602         Entity entity;
00603         
00604 
00605 
00609         static string tableName;
00610         
00614         static const vector<string> attributesNames;
00615         
00619         static vector<string> initAttributesNames();
00620 
00621 
00625         static vector<string> key;
00626 
00627 
00635         CalBandpassRow* checkAndAdd(CalBandpassRow* x) ;
00636 
00637 
00638 
00639 // A data structure to store the pointers on the table's rows.
00640 
00641 // In all cases we maintain a private vector of CalBandpassRow s.
00642    vector<CalBandpassRow * > privateRows;
00643    
00644 
00645                         
00646         vector<CalBandpassRow *> row;
00647 
00648         
00649         void error() ; //throw(ConversionException);
00650 
00651         
00658         void fromXML(string xmlDoc) ;
00659                 
00664         void setFromMIMEFile(const string& directory);
00665         void setFromXMLFile(const string& directory);
00666         
00674         string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00675   
00676         
00683          void setFromMIME(const string & mimeMsg);
00684         
00688         string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00689         
00699           void toFile(string directory);
00700           
00709          void setFromFile(const string& directory);     
00710  
00711 };
00712 
00713 } // End namespace asdm
00714 
00715 #endif /* CalBandpassTable_CLASS */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines