LCOV - code coverage report
Current view: top level - alma/ASDM - CalAtmosphereTable.h (source / functions) Hit Total Coverage
Test: casa_coverage.info Lines: 0 7 0.0 %
Date: 2023-10-25 08:47:59 Functions: 0 1 0.0 %

          Line data    Source code
       1             : 
       2             : /*
       3             :  * ALMA - Atacama Large Millimeter Array
       4             :  * (c) European Southern Observatory, 2002
       5             :  * (c) Associated Universities Inc., 2002
       6             :  * Copyright by ESO (in the framework of the ALMA collaboration),
       7             :  * Copyright by AUI (in the framework of the ALMA collaboration),
       8             :  * All rights reserved.
       9             :  * 
      10             :  * This library is free software; you can redistribute it and/or
      11             :  * modify it under the terms of the GNU Lesser General Public
      12             :  * License as published by the Free software Foundation; either
      13             :  * version 2.1 of the License, or (at your option) any later version.
      14             :  * 
      15             :  * This library is distributed in the hope that it will be useful,
      16             :  * but WITHOUT ANY WARRANTY, without even the implied warranty of
      17             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      18             :  * Lesser General Public License for more details.
      19             :  * 
      20             :  * You should have received a copy of the GNU Lesser General Public
      21             :  * License along with this library; if not, write to the Free Software
      22             :  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
      23             :  * MA 02111-1307  USA
      24             :  *
      25             :  * Warning!
      26             :  *  -------------------------------------------------------------------- 
      27             :  * | This is generated code!  Do not modify this file.                  |
      28             :  * | If you do, all changes will be lost when the file is re-generated. |
      29             :  *  --------------------------------------------------------------------
      30             :  *
      31             :  * File CalAtmosphereTable.h
      32             :  */
      33             :  
      34             : #ifndef CalAtmosphereTable_CLASS
      35             : #define CalAtmosphereTable_CLASS
      36             : 
      37             : #include <string>
      38             : #include <vector>
      39             : #include <map>
      40             : 
      41             : 
      42             : 
      43             :         
      44             : #include <alma/ASDM/Temperature.h>
      45             :         
      46             : 
      47             :         
      48             : #include <alma/ASDM/ArrayTime.h>
      49             :         
      50             : 
      51             :         
      52             : #include <alma/ASDM/Pressure.h>
      53             :         
      54             : 
      55             :         
      56             : #include <alma/ASDM/Length.h>
      57             :         
      58             : 
      59             :         
      60             : #include <alma/ASDM/Humidity.h>
      61             :         
      62             : 
      63             :         
      64             : #include <alma/ASDM/Frequency.h>
      65             :         
      66             : 
      67             :         
      68             : #include <alma/ASDM/Tag.h>
      69             :         
      70             : 
      71             : 
      72             : 
      73             : 
      74             :         
      75             : #include <alma/Enumerations/CReceiverBand.h>
      76             :         
      77             : 
      78             :         
      79             : 
      80             :         
      81             : #include <alma/Enumerations/CBasebandName.h>
      82             :         
      83             : 
      84             :         
      85             : 
      86             :         
      87             : 
      88             :         
      89             : 
      90             :         
      91             : 
      92             :         
      93             : 
      94             :         
      95             : 
      96             :         
      97             : 
      98             :         
      99             : 
     100             :         
     101             : 
     102             :         
     103             : 
     104             :         
     105             : 
     106             :         
     107             : #include <alma/Enumerations/CPolarizationType.h>
     108             :         
     109             : 
     110             :         
     111             : 
     112             :         
     113             : 
     114             :         
     115             : #include <alma/Enumerations/CSyscalMethod.h>
     116             :         
     117             : 
     118             :         
     119             : 
     120             :         
     121             : 
     122             :         
     123             : 
     124             :         
     125             : 
     126             :         
     127             : 
     128             :         
     129             : 
     130             :         
     131             : 
     132             :         
     133             : 
     134             :         
     135             : 
     136             :         
     137             : 
     138             :         
     139             : 
     140             :         
     141             : 
     142             :         
     143             : 
     144             :         
     145             : 
     146             :         
     147             : 
     148             :         
     149             : 
     150             : 
     151             : 
     152             : #include <alma/ASDM/ConversionException.h>
     153             : #include <alma/ASDM/DuplicateKey.h>
     154             : #include <alma/ASDM/UniquenessViolationException.h>
     155             : #include <alma/ASDM/NoSuchRow.h>
     156             : #include <alma/ASDM/DuplicateKey.h>
     157             : 
     158             : 
     159             : #ifndef WITHOUT_ACS
     160             : #include <asdmIDLC.h>
     161             : #endif
     162             : 
     163             : #include <alma/ASDM/Representable.h>
     164             : 
     165             : #include <pthread.h>
     166             : 
     167             : namespace asdm {
     168             : 
     169             : //class asdm::ASDM;
     170             : //class asdm::CalAtmosphereRow;
     171             : 
     172             : class ASDM;
     173             : class CalAtmosphereRow;
     174             : /**
     175             :  * The CalAtmosphereTable class is an Alma table.
     176             :  * <BR>
     177             :  * 
     178             :  * \par Role
     179             :  * Results of atmosphere calibration by TelCal. This calibration determines the system temperatures corrected for atmospheric absorption. Ionospheric effects are not dealt with in the Table.
     180             :  * <BR>
     181             :  
     182             :  * Generated from model's revision "-1", branch ""
     183             :  *
     184             :  * <TABLE BORDER="1">
     185             :  * <CAPTION> Attributes of CalAtmosphere </CAPTION>
     186             :  * <TR BGCOLOR="#AAAAAA"> <TH> Name </TH> <TH> Type </TH> <TH> Expected shape  </TH> <TH> Comment </TH></TR>
     187             :  
     188             :  * <TR> <TH BGCOLOR="#CCCCCC" colspan="4" align="center"> Key </TD></TR>
     189             :         
     190             :  * <TR>
     191             :                 
     192             :  * <TD> antennaName </TD>
     193             :                  
     194             :  * <TD> std::string</TD>
     195             :  * <TD> &nbsp; </TD>
     196             :  * <TD> &nbsp;the name of the antenna. </TD>
     197             :  * </TR>
     198             :         
     199             :  * <TR>
     200             :                 
     201             :  * <TD> receiverBand </TD>
     202             :                  
     203             :  * <TD> ReceiverBandMod::ReceiverBand</TD>
     204             :  * <TD> &nbsp; </TD>
     205             :  * <TD> &nbsp;identifies the receiver band. </TD>
     206             :  * </TR>
     207             :         
     208             :  * <TR>
     209             :                 
     210             :  * <TD> basebandName </TD>
     211             :                  
     212             :  * <TD> BasebandNameMod::BasebandName</TD>
     213             :  * <TD> &nbsp; </TD>
     214             :  * <TD> &nbsp;identifies the baseband. </TD>
     215             :  * </TR>
     216             :         
     217             :  * <TR>
     218             :                 
     219             :  * <TD> calDataId </TD>
     220             :                  
     221             :  * <TD> Tag</TD>
     222             :  * <TD> &nbsp; </TD>
     223             :  * <TD> &nbsp;refers to a unique row in CalData Table. </TD>
     224             :  * </TR>
     225             :         
     226             :  * <TR>
     227             :                 
     228             :  * <TD> calReductionId </TD>
     229             :                  
     230             :  * <TD> Tag</TD>
     231             :  * <TD> &nbsp; </TD>
     232             :  * <TD> &nbsp;refers to a unique row in CalReduction Table. </TD>
     233             :  * </TR>
     234             :         
     235             : 
     236             : 
     237             :  * <TR> <TH BGCOLOR="#CCCCCC"  colspan="4" valign="center"> Value <br> (Mandatory) </TH></TR>
     238             :         
     239             :  * <TR>
     240             :  * <TD> startValidTime </TD> 
     241             :  * <TD> ArrayTime </TD>
     242             :  * <TD>  &nbsp;  </TD> 
     243             :  * <TD> &nbsp;the start time of result validity period. </TD>
     244             :  * </TR>
     245             :         
     246             :  * <TR>
     247             :  * <TD> endValidTime </TD> 
     248             :  * <TD> ArrayTime </TD>
     249             :  * <TD>  &nbsp;  </TD> 
     250             :  * <TD> &nbsp;the end time of result validity period. </TD>
     251             :  * </TR>
     252             :         
     253             :  * <TR>
     254             :  * <TD> numFreq (numFreq)</TD> 
     255             :  * <TD> int </TD>
     256             :  * <TD>  &nbsp;  </TD> 
     257             :  * <TD> &nbsp;the number of frequency points. </TD>
     258             :  * </TR>
     259             :         
     260             :  * <TR>
     261             :  * <TD> numLoad (numLoad)</TD> 
     262             :  * <TD> int </TD>
     263             :  * <TD>  &nbsp;  </TD> 
     264             :  * <TD> &nbsp;the number of loads. </TD>
     265             :  * </TR>
     266             :         
     267             :  * <TR>
     268             :  * <TD> numReceptor (numReceptor)</TD> 
     269             :  * <TD> int </TD>
     270             :  * <TD>  &nbsp;  </TD> 
     271             :  * <TD> &nbsp;the number of receptors. </TD>
     272             :  * </TR>
     273             :         
     274             :  * <TR>
     275             :  * <TD> forwardEffSpectrum </TD> 
     276             :  * <TD> std::vector<std::vector<float > > </TD>
     277             :  * <TD>  numReceptor, numFreq </TD> 
     278             :  * <TD> &nbsp;the spectra of forward efficiencies (one value per receptor, per frequency). </TD>
     279             :  * </TR>
     280             :         
     281             :  * <TR>
     282             :  * <TD> frequencyRange </TD> 
     283             :  * <TD> std::vector<Frequency > </TD>
     284             :  * <TD>  2 </TD> 
     285             :  * <TD> &nbsp;the frequency range. </TD>
     286             :  * </TR>
     287             :         
     288             :  * <TR>
     289             :  * <TD> groundPressure </TD> 
     290             :  * <TD> Pressure </TD>
     291             :  * <TD>  &nbsp;  </TD> 
     292             :  * <TD> &nbsp;the ground pressure. </TD>
     293             :  * </TR>
     294             :         
     295             :  * <TR>
     296             :  * <TD> groundRelHumidity </TD> 
     297             :  * <TD> Humidity </TD>
     298             :  * <TD>  &nbsp;  </TD> 
     299             :  * <TD> &nbsp;the ground relative humidity. </TD>
     300             :  * </TR>
     301             :         
     302             :  * <TR>
     303             :  * <TD> frequencySpectrum </TD> 
     304             :  * <TD> std::vector<Frequency > </TD>
     305             :  * <TD>  numFreq </TD> 
     306             :  * <TD> &nbsp;the frequencies. </TD>
     307             :  * </TR>
     308             :         
     309             :  * <TR>
     310             :  * <TD> groundTemperature </TD> 
     311             :  * <TD> Temperature </TD>
     312             :  * <TD>  &nbsp;  </TD> 
     313             :  * <TD> &nbsp;the ground temperature. </TD>
     314             :  * </TR>
     315             :         
     316             :  * <TR>
     317             :  * <TD> polarizationTypes </TD> 
     318             :  * <TD> std::vector<PolarizationTypeMod::PolarizationType > </TD>
     319             :  * <TD>  numReceptor </TD> 
     320             :  * <TD> &nbsp;the polarizations of the receptors (an array with one value per receptor). </TD>
     321             :  * </TR>
     322             :         
     323             :  * <TR>
     324             :  * <TD> powerSkySpectrum </TD> 
     325             :  * <TD> std::vector<std::vector<float > > </TD>
     326             :  * <TD>  numReceptor, numFreq </TD> 
     327             :  * <TD> &nbsp;the powers on the sky (one value per receptor per frequency). </TD>
     328             :  * </TR>
     329             :         
     330             :  * <TR>
     331             :  * <TD> powerLoadSpectrum </TD> 
     332             :  * <TD> std::vector<std::vector<std::vector<float > > > </TD>
     333             :  * <TD>  numLoad, numReceptor, numFreq </TD> 
     334             :  * <TD> &nbsp;the powers on the loads (one value per load per receptor per frequency). </TD>
     335             :  * </TR>
     336             :         
     337             :  * <TR>
     338             :  * <TD> syscalType </TD> 
     339             :  * <TD> SyscalMethodMod::SyscalMethod </TD>
     340             :  * <TD>  &nbsp;  </TD> 
     341             :  * <TD> &nbsp;the type of calibration used. </TD>
     342             :  * </TR>
     343             :         
     344             :  * <TR>
     345             :  * <TD> tAtmSpectrum </TD> 
     346             :  * <TD> std::vector<std::vector<Temperature > > </TD>
     347             :  * <TD>  numReceptor, numFreq </TD> 
     348             :  * <TD> &nbsp;the spectra of atmosphere physical  temperatures (one value per receptor per frequency). </TD>
     349             :  * </TR>
     350             :         
     351             :  * <TR>
     352             :  * <TD> tRecSpectrum </TD> 
     353             :  * <TD> std::vector<std::vector<Temperature > > </TD>
     354             :  * <TD>  numReceptor, numFreq </TD> 
     355             :  * <TD> &nbsp;the spectra of the receptors temperatures (one value  per receptor per frequency). </TD>
     356             :  * </TR>
     357             :         
     358             :  * <TR>
     359             :  * <TD> tSysSpectrum </TD> 
     360             :  * <TD> std::vector<std::vector<Temperature > > </TD>
     361             :  * <TD>  numReceptor, numFreq </TD> 
     362             :  * <TD> &nbsp;the spectra of system temperatures (one value  per receptor per frequency). </TD>
     363             :  * </TR>
     364             :         
     365             :  * <TR>
     366             :  * <TD> tauSpectrum </TD> 
     367             :  * <TD> std::vector<std::vector<float > > </TD>
     368             :  * <TD>  numReceptor, numFreq </TD> 
     369             :  * <TD> &nbsp;the spectra of atmosheric optical depths (one value  per receptor per frequency). </TD>
     370             :  * </TR>
     371             :         
     372             :  * <TR>
     373             :  * <TD> tAtm </TD> 
     374             :  * <TD> std::vector<Temperature > </TD>
     375             :  * <TD>  numReceptor </TD> 
     376             :  * <TD> &nbsp;the atmosphere physical temperatures (one value per receptor). </TD>
     377             :  * </TR>
     378             :         
     379             :  * <TR>
     380             :  * <TD> tRec </TD> 
     381             :  * <TD> std::vector<Temperature > </TD>
     382             :  * <TD>  numReceptor </TD> 
     383             :  * <TD> &nbsp;the receptors temperatures (one value per receptor). </TD>
     384             :  * </TR>
     385             :         
     386             :  * <TR>
     387             :  * <TD> tSys </TD> 
     388             :  * <TD> std::vector<Temperature > </TD>
     389             :  * <TD>  numReceptor </TD> 
     390             :  * <TD> &nbsp;the system temperatures (one value per receptor). </TD>
     391             :  * </TR>
     392             :         
     393             :  * <TR>
     394             :  * <TD> tau </TD> 
     395             :  * <TD> std::vector<float > </TD>
     396             :  * <TD>  numReceptor </TD> 
     397             :  * <TD> &nbsp;the atmospheric optical depths (one value per receptor). </TD>
     398             :  * </TR>
     399             :         
     400             :  * <TR>
     401             :  * <TD> water </TD> 
     402             :  * <TD> std::vector<Length > </TD>
     403             :  * <TD>  numReceptor </TD> 
     404             :  * <TD> &nbsp;the water vapor path lengths (one value per receptor). </TD>
     405             :  * </TR>
     406             :         
     407             :  * <TR>
     408             :  * <TD> waterError </TD> 
     409             :  * <TD> std::vector<Length > </TD>
     410             :  * <TD>  numReceptor </TD> 
     411             :  * <TD> &nbsp;the uncertainties of water vapor contents (one value per receptor). </TD>
     412             :  * </TR>
     413             :         
     414             : 
     415             : 
     416             :  * <TR> <TH BGCOLOR="#CCCCCC"  colspan="4" valign="center"> Value <br> (Optional) </TH></TR>
     417             :         
     418             :  * <TR>
     419             :  * <TD> alphaSpectrum</TD> 
     420             :  * <TD> std::vector<std::vector<float > > </TD>
     421             :  * <TD>  numReceptor, numFreq  </TD>
     422             :  * <TD>&nbsp; the alpha coefficients, two loads only (one value per receptor per frequency). </TD>
     423             :  * </TR>
     424             :         
     425             :  * <TR>
     426             :  * <TD> forwardEfficiency</TD> 
     427             :  * <TD> std::vector<float > </TD>
     428             :  * <TD>  numReceptor  </TD>
     429             :  * <TD>&nbsp; the forward efficiencies (one value per receptor). </TD>
     430             :  * </TR>
     431             :         
     432             :  * <TR>
     433             :  * <TD> forwardEfficiencyError</TD> 
     434             :  * <TD> std::vector<double > </TD>
     435             :  * <TD>  numReceptor  </TD>
     436             :  * <TD>&nbsp; the uncertainties on forwardEfficiency (one value per receptor). </TD>
     437             :  * </TR>
     438             :         
     439             :  * <TR>
     440             :  * <TD> sbGain</TD> 
     441             :  * <TD> std::vector<float > </TD>
     442             :  * <TD>  numReceptor  </TD>
     443             :  * <TD>&nbsp; the relative gains of LO1 sideband (one value per receptor). </TD>
     444             :  * </TR>
     445             :         
     446             :  * <TR>
     447             :  * <TD> sbGainError</TD> 
     448             :  * <TD> std::vector<float > </TD>
     449             :  * <TD>  numReceptor  </TD>
     450             :  * <TD>&nbsp; the uncertainties on the relative gains of LO1 sideband (one value per receptor). </TD>
     451             :  * </TR>
     452             :         
     453             :  * <TR>
     454             :  * <TD> sbGainSpectrum</TD> 
     455             :  * <TD> std::vector<std::vector<float > > </TD>
     456             :  * <TD>  numReceptor, numFreq  </TD>
     457             :  * <TD>&nbsp; the spectra of relative sideband gains (one value  per receptor per frequency). </TD>
     458             :  * </TR>
     459             :         
     460             : 
     461             :  * </TABLE>
     462             :  */
     463             : class CalAtmosphereTable : public Representable {
     464             :         friend class ASDM;
     465             : 
     466             : public:
     467             : 
     468             : 
     469             :         /**
     470             :          * Return the list of field names that make up key key
     471             :          * as an array of strings.
     472             :          * @return a vector of string.
     473             :          */     
     474             :         static const std::vector<std::string>& getKeyName();
     475             : 
     476             : 
     477             :         virtual ~CalAtmosphereTable();
     478             :         
     479             :         /**
     480             :          * Return the container to which this table belongs.
     481             :          *
     482             :          * @return the ASDM containing this table.
     483             :          */
     484             :         ASDM &getContainer() const;
     485             :         
     486             :         /**
     487             :          * Return the number of rows in the table.
     488             :          *
     489             :          * @return the number of rows in an unsigned int.
     490             :          */
     491             :         unsigned int size() const;
     492             :         
     493             :         /**
     494             :          * Return the name of this table.
     495             :          *
     496             :          * This is a instance method of the class.
     497             :          *
     498             :          * @return the name of this table in a string.
     499             :          */
     500             :         std::string getName() const;
     501             :         
     502             :         /**
     503             :          * Return the name of this table.
     504             :          *
     505             :          * This is a static method of the class.
     506             :          *
     507             :          * @return the name of this table in a string.
     508             :          */
     509             :         static std::string name() ;     
     510             :         
     511             :         /**
     512             :          * Return the version information about this table.
     513             :          *
     514             :          */
     515             :          std::string getVersion() const ;
     516             :         
     517             :         /**
     518             :          * Return the names of the attributes of this table.
     519             :          *
     520             :          * @return a vector of string
     521             :          */
     522             :          static const std::vector<std::string>& getAttributesNames();
     523             : 
     524             :         /**
     525             :          * Return the default sorted list of attributes names in the binary representation of the table.
     526             :          *
     527             :          * @return a const reference to a vector of string
     528             :          */
     529             :          static const std::vector<std::string>& defaultAttributesNamesInBin();
     530             :          
     531             :         /**
     532             :          * Return this table's Entity.
     533             :          */
     534             :         Entity getEntity() const;
     535             : 
     536             :         /**
     537             :          * Set this table's Entity.
     538             :          * @param e An entity. 
     539             :          */
     540             :         void setEntity(Entity e);
     541             :                 
     542             :         /**
     543             :          * Produces an XML representation conform
     544             :          * to the schema defined for CalAtmosphere (CalAtmosphereTable.xsd).
     545             :          *
     546             :          * @returns a string containing the XML representation.
     547             :          * @throws ConversionException
     548             :          */
     549             :         std::string toXML()  ;
     550             : 
     551             : #ifndef WITHOUT_ACS
     552             :         // Conversion Methods
     553             :         /**
     554             :          * Convert this table into a CalAtmosphereTableIDL CORBA structure.
     555             :          *
     556             :          * @return a pointer to a CalAtmosphereTableIDL
     557             :          */
     558             :         asdmIDL::CalAtmosphereTableIDL *toIDL() ;
     559             :         
     560             :         /**
     561             :          * Fills the CORBA data structure passed in parameter
     562             :          * with the content of this table.
     563             :          *
     564             :          * @param x a reference to the asdmIDL::CalAtmosphereTableIDL to be populated
     565             :          * with the content of this.
     566             :          */
     567             :          void toIDL(asdmIDL::CalAtmosphereTableIDL& x) const;
     568             :          
     569             : #endif
     570             : 
     571             : #ifndef WITHOUT_ACS
     572             :         /**
     573             :          * Populate this table from the content of a CalAtmosphereTableIDL Corba structure.
     574             :          *
     575             :          * @throws DuplicateKey Thrown if the method tries to add a row having a key that is already in the table.
     576             :          * @throws ConversionException
     577             :          */     
     578             :         void fromIDL(asdmIDL::CalAtmosphereTableIDL x) ;
     579             : #endif
     580             :         
     581             :         //
     582             :         // ====> Row creation.
     583             :         //
     584             :         
     585             :         /**
     586             :          * Create a new row with default values.
     587             :          * @return a pointer on a CalAtmosphereRow
     588             :          */
     589             :         CalAtmosphereRow *newRow();
     590             :         
     591             :         
     592             :         /**
     593             :          * Create a new row initialized to the specified values.
     594             :          * @return a pointer on the created and initialized row.
     595             :         
     596             :          * @param antennaName
     597             :         
     598             :          * @param receiverBand
     599             :         
     600             :          * @param basebandName
     601             :         
     602             :          * @param calDataId
     603             :         
     604             :          * @param calReductionId
     605             :         
     606             :          * @param startValidTime
     607             :         
     608             :          * @param endValidTime
     609             :         
     610             :          * @param numFreq
     611             :         
     612             :          * @param numLoad
     613             :         
     614             :          * @param numReceptor
     615             :         
     616             :          * @param forwardEffSpectrum
     617             :         
     618             :          * @param frequencyRange
     619             :         
     620             :          * @param groundPressure
     621             :         
     622             :          * @param groundRelHumidity
     623             :         
     624             :          * @param frequencySpectrum
     625             :         
     626             :          * @param groundTemperature
     627             :         
     628             :          * @param polarizationTypes
     629             :         
     630             :          * @param powerSkySpectrum
     631             :         
     632             :          * @param powerLoadSpectrum
     633             :         
     634             :          * @param syscalType
     635             :         
     636             :          * @param tAtmSpectrum
     637             :         
     638             :          * @param tRecSpectrum
     639             :         
     640             :          * @param tSysSpectrum
     641             :         
     642             :          * @param tauSpectrum
     643             :         
     644             :          * @param tAtm
     645             :         
     646             :          * @param tRec
     647             :         
     648             :          * @param tSys
     649             :         
     650             :          * @param tau
     651             :         
     652             :          * @param water
     653             :         
     654             :          * @param waterError
     655             :         
     656             :      */
     657             :         CalAtmosphereRow *newRow(std::string antennaName, ReceiverBandMod::ReceiverBand receiverBand, BasebandNameMod::BasebandName basebandName, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numFreq, int numLoad, int numReceptor, std::vector<std::vector<float > > forwardEffSpectrum, std::vector<Frequency > frequencyRange, Pressure groundPressure, Humidity groundRelHumidity, std::vector<Frequency > frequencySpectrum, Temperature groundTemperature, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, std::vector<std::vector<float > > powerSkySpectrum, std::vector<std::vector<std::vector<float > > > powerLoadSpectrum, SyscalMethodMod::SyscalMethod syscalType, std::vector<std::vector<Temperature > > tAtmSpectrum, std::vector<std::vector<Temperature > > tRecSpectrum, std::vector<std::vector<Temperature > > tSysSpectrum, std::vector<std::vector<float > > tauSpectrum, std::vector<Temperature > tAtm, std::vector<Temperature > tRec, std::vector<Temperature > tSys, std::vector<float > tau, std::vector<Length > water, std::vector<Length > waterError);
     658             :         
     659             : 
     660             : 
     661             :         /**
     662             :          * Create a new row using a copy constructor mechanism.
     663             :          * 
     664             :          * The method creates a new CalAtmosphereRow owned by this. Each attribute of the created row 
     665             :          * is a (deep) copy of the corresponding attribute of row. The method does not add 
     666             :          * the created row to this, its simply parents it to this, a call to the add method
     667             :          * has to be done in order to get the row added (very likely after having modified
     668             :          * some of its attributes).
     669             :          * If row is null then the method returns a new CalAtmosphereRow with default values for its attributes. 
     670             :          *
     671             :          * @param row the row which is to be copied.
     672             :          */
     673             :          CalAtmosphereRow *newRow(CalAtmosphereRow *row); 
     674             : 
     675             :         //
     676             :         // ====> Append a row to its table.
     677             :         //
     678             :  
     679             :         
     680             :         /**
     681             :          * Add a row.
     682             :          * @param x a pointer to the CalAtmosphereRow to be added.
     683             :          *
     684             :          * @return a pointer to a CalAtmosphereRow. If the table contains a CalAtmosphereRow whose attributes (key and mandatory values) are equal to x ones
     685             :          * then returns a pointer on that CalAtmosphereRow, otherwise returns x.
     686             :          *
     687             :          * @throw DuplicateKey { thrown when the table contains a CalAtmosphereRow with a key equal to the x one but having
     688             :          * and a value section different from x one }
     689             :          *
     690             :         
     691             :          */
     692             :         CalAtmosphereRow* add(CalAtmosphereRow* x) ; 
     693             : 
     694             :  
     695             : 
     696             : 
     697             : 
     698             :         //
     699             :         // ====> Methods returning rows.
     700             :         //
     701             :                 
     702             :         /**
     703             :          * Get a collection of pointers on the rows of the table.
     704             :          * @return Alls rows in a vector of pointers of CalAtmosphereRow. The elements of this vector are stored in the order 
     705             :          * in which they have been added to the CalAtmosphereTable.
     706             :          */
     707             :         std::vector<CalAtmosphereRow *> get() ;
     708             :         
     709             :         /**
     710             :          * Get a const reference on the collection of rows pointers internally hold by the table.
     711             :          * @return A const reference of a vector of pointers of CalAtmosphereRow. The elements of this vector are stored in the order 
     712             :          * in which they have been added to the CalAtmosphereTable.
     713             :          *
     714             :          */
     715             :          const std::vector<CalAtmosphereRow *>& get() const ;
     716             :         
     717             : 
     718             : 
     719             :  
     720             :         
     721             :         /**
     722             :          * Returns a CalAtmosphereRow* given a key.
     723             :          * @return a pointer to the row having the key whose values are passed as parameters, or 0 if
     724             :          * no row exists for that key.
     725             :         
     726             :          * @param antennaName
     727             :         
     728             :          * @param receiverBand
     729             :         
     730             :          * @param basebandName
     731             :         
     732             :          * @param calDataId
     733             :         
     734             :          * @param calReductionId
     735             :         
     736             :          *
     737             :          */
     738             :         CalAtmosphereRow* getRowByKey(std::string antennaName, ReceiverBandMod::ReceiverBand receiverBand, BasebandNameMod::BasebandName basebandName, Tag calDataId, Tag calReductionId);
     739             : 
     740             :                 
     741             : 
     742             : 
     743             : 
     744             :         /**
     745             :          * Look up the table for a row whose all attributes 
     746             :          * are equal to the corresponding parameters of the method.
     747             :          * @return a pointer on this row if any, null otherwise.
     748             :          *
     749             :                         
     750             :          * @param antennaName
     751             :                         
     752             :          * @param receiverBand
     753             :                         
     754             :          * @param basebandName
     755             :                         
     756             :          * @param calDataId
     757             :                         
     758             :          * @param calReductionId
     759             :                         
     760             :          * @param startValidTime
     761             :                         
     762             :          * @param endValidTime
     763             :                         
     764             :          * @param numFreq
     765             :                         
     766             :          * @param numLoad
     767             :                         
     768             :          * @param numReceptor
     769             :                         
     770             :          * @param forwardEffSpectrum
     771             :                         
     772             :          * @param frequencyRange
     773             :                         
     774             :          * @param groundPressure
     775             :                         
     776             :          * @param groundRelHumidity
     777             :                         
     778             :          * @param frequencySpectrum
     779             :                         
     780             :          * @param groundTemperature
     781             :                         
     782             :          * @param polarizationTypes
     783             :                         
     784             :          * @param powerSkySpectrum
     785             :                         
     786             :          * @param powerLoadSpectrum
     787             :                         
     788             :          * @param syscalType
     789             :                         
     790             :          * @param tAtmSpectrum
     791             :                         
     792             :          * @param tRecSpectrum
     793             :                         
     794             :          * @param tSysSpectrum
     795             :                         
     796             :          * @param tauSpectrum
     797             :                         
     798             :          * @param tAtm
     799             :                         
     800             :          * @param tRec
     801             :                         
     802             :          * @param tSys
     803             :                         
     804             :          * @param tau
     805             :                         
     806             :          * @param water
     807             :                         
     808             :          * @param waterError
     809             :                          
     810             :          */
     811             :         CalAtmosphereRow* lookup(std::string antennaName, ReceiverBandMod::ReceiverBand receiverBand, BasebandNameMod::BasebandName basebandName, Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, int numFreq, int numLoad, int numReceptor, std::vector<std::vector<float > > forwardEffSpectrum, std::vector<Frequency > frequencyRange, Pressure groundPressure, Humidity groundRelHumidity, std::vector<Frequency > frequencySpectrum, Temperature groundTemperature, std::vector<PolarizationTypeMod::PolarizationType > polarizationTypes, std::vector<std::vector<float > > powerSkySpectrum, std::vector<std::vector<std::vector<float > > > powerLoadSpectrum, SyscalMethodMod::SyscalMethod syscalType, std::vector<std::vector<Temperature > > tAtmSpectrum, std::vector<std::vector<Temperature > > tRecSpectrum, std::vector<std::vector<Temperature > > tSysSpectrum, std::vector<std::vector<float > > tauSpectrum, std::vector<Temperature > tAtm, std::vector<Temperature > tRec, std::vector<Temperature > tSys, std::vector<float > tau, std::vector<Length > water, std::vector<Length > waterError); 
     812             : 
     813             : 
     814             :         void setUnknownAttributeBinaryReader(const std::string& attributeName, BinaryAttributeReaderFunctor* barFctr);
     815             :         BinaryAttributeReaderFunctor* getUnknownAttributeBinaryReader(const std::string& attributeName) const;
     816             : 
     817             : private:
     818             : 
     819             :         /**
     820             :          * Create a CalAtmosphereTable.
     821             :          * <p>
     822             :          * This constructor is private because only the
     823             :          * container can create tables.  All tables must know the container
     824             :          * to which they belong.
     825             :          * @param container The container to which this table belongs.
     826             :          */ 
     827             :         CalAtmosphereTable (ASDM & container);
     828             : 
     829             :         ASDM & container;
     830             :         
     831             :         bool archiveAsBin; // If true archive binary else archive XML
     832             :         bool fileAsBin ; // If true file binary else file XML   
     833             :         
     834             :         std::string version ; 
     835             :         
     836             :         Entity entity;
     837             :         
     838             : 
     839             :         
     840             :         
     841             : 
     842             : 
     843             :         /**
     844             :          * If this table has an autoincrementable attribute then check if *x verifies the rule of uniqueness and throw exception if not.
     845             :          * Check if *x verifies the key uniqueness rule and throw an exception if not.
     846             :          * Append x to its table.
     847             :          * @throws DuplicateKey
     848             :          
     849             :          */
     850             :         CalAtmosphereRow* checkAndAdd(CalAtmosphereRow* x, bool skipCheckUniqueness=false) ;
     851             :         
     852             :         /**
     853             :          * Brutally append an CalAtmosphereRow x to the collection of rows already stored in this table. No uniqueness check is done !
     854             :          *
     855             :          * @param CalAtmosphereRow* x a pointer onto the CalAtmosphereRow to be appended.
     856             :          */
     857             :          void append(CalAtmosphereRow* x) ;
     858             :          
     859             :         /**
     860             :          * Brutally append an CalAtmosphereRow x to the collection of rows already stored in this table. No uniqueness check is done !
     861             :          *
     862             :          * @param CalAtmosphereRow* x a pointer onto the CalAtmosphereRow to be appended.
     863             :          */
     864             :          void addWithoutCheckingUnique(CalAtmosphereRow* x) ;
     865             :          
     866             :          
     867             : 
     868             : 
     869             : 
     870             : // A data structure to store the pointers on the table's rows.
     871             : 
     872             : // In all cases we maintain a private vector of CalAtmosphereRow s.
     873             :    std::vector<CalAtmosphereRow * > privateRows;
     874             :    
     875             : 
     876             :                         
     877             :         std::vector<CalAtmosphereRow *> row;
     878             : 
     879             :         
     880             :         void error() ; //throw(ConversionException);
     881             : 
     882             :         
     883             :         /**
     884             :          * Populate this table from the content of a XML document that is required to
     885             :          * be conform to the XML schema defined for a CalAtmosphere (CalAtmosphereTable.xsd).
     886             :          * @throws ConversionException
     887             :          * 
     888             :          */
     889             :         void fromXML(std::string& xmlDoc) ;
     890             :                 
     891             :         std::map<std::string, BinaryAttributeReaderFunctor *> unknownAttributes2Functors;
     892             : 
     893             :         /**
     894             :           * Private methods involved during the build of this table out of the content
     895             :           * of file(s) containing an external representation of a CalAtmosphere table.
     896             :           */
     897             :         void setFromMIMEFile(const std::string& directory);
     898             :         /*
     899             :         void openMIMEFile(const std::string& directory);
     900             :         */
     901             :         void setFromXMLFile(const std::string& directory);
     902             :         
     903             :                  /**
     904             :          * Serialize this into a stream of bytes and encapsulates that stream into a MIME message.
     905             :          * @returns a string containing the MIME message.
     906             :          *
     907             :          * @param byteOrder a const pointer to a static instance of the class ByteOrder.
     908             :          * 
     909             :          */
     910             :         std::string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
     911             :   
     912             :         
     913             :    /** 
     914             :      * Extracts the binary part of a MIME message and deserialize its content
     915             :          * to fill this with the result of the deserialization. 
     916             :          * @param mimeMsg the string containing the MIME message.
     917             :          * @throws ConversionException
     918             :          */
     919             :          void setFromMIME(const std::string & mimeMsg);
     920             :         
     921             :         /**
     922             :           * Private methods involved during the export of this table into disk file(s).
     923             :           */
     924             :         std::string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
     925             :         
     926             :         /**
     927             :           * Stores a representation (binary or XML) of this table into a file.
     928             :           *
     929             :           * Depending on the boolean value of its private field fileAsBin a binary serialization  of this (fileAsBin==true)  
     930             :           * will be saved in a file "CalAtmosphere.bin" or an XML representation (fileAsBin==false) will be saved in a file "CalAtmosphere.xml".
     931             :           * The file is always written in a directory whose name is passed as a parameter.
     932             :          * @param directory The name of directory  where the file containing the table's representation will be saved.
     933             :           * 
     934             :           */
     935             :           void toFile(std::string directory);
     936             :           
     937             :           /**
     938             :            * Load the table in memory if necessary.
     939             :            */
     940             :           bool loadInProgress;
     941           0 :           void checkPresenceInMemory() {
     942           0 :                 if (!presentInMemory && !loadInProgress) {
     943           0 :                         loadInProgress = true;
     944           0 :                         setFromFile(getContainer().getDirectory());
     945           0 :                         presentInMemory = true;
     946           0 :                         loadInProgress = false;
     947             :                 }
     948           0 :           }
     949             :         /**
     950             :          * Reads and parses a file containing a representation of a CalAtmosphereTable as those produced  by the toFile method.
     951             :          * This table is populated with the result of the parsing.
     952             :          * @param directory The name of the directory containing the file te be read and parsed.
     953             :          * @throws ConversionException If any error occurs while reading the 
     954             :          * files in the directory or parsing them.
     955             :          *
     956             :          */
     957             :          void setFromFile(const std::string& directory);    
     958             :  
     959             : };
     960             : 
     961             : } // End namespace asdm
     962             : 
     963             : #endif /* CalAtmosphereTable_CLASS */

Generated by: LCOV version 1.16