00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
#ifndef FeedTable_CLASS
00035
#define FeedTable_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
#include <Angle.h>
00046
#include <AngularRate.h>
00047
#include <ArrayTime.h>
00048
#include <ArrayTimeInterval.h>
00049
#include <Complex.h>
00050
#include <Entity.h>
00051
#include <EntityId.h>
00052
#include <EntityRef.h>
00053
#include <Flux.h>
00054
#include <Frequency.h>
00055
#include <Humidity.h>
00056
#include <Interval.h>
00057
#include <Length.h>
00058
#include <PartId.h>
00059
#include <Pressure.h>
00060
#include <Speed.h>
00061
#include <Tag.h>
00062
#include <Temperature.h>
00063
#include <ConversionException.h>
00064
#include <DuplicateKey.h>
00065
#include <UniquenessViolationException.h>
00066
#include <NoSuchRow.h>
00067
#include <DuplicateKey.h>
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
#include "CPolarizationType.h"
00095
using namespace PolarizationTypeMod;
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
#ifndef WITHOUT_ACS
00110
#include <asdmIDLC.h>
00111
using asdmIDL::FeedTableIDL;
00112
#endif
00113
00114
using asdm::Angle;
00115
using asdm::AngularRate;
00116
using asdm::ArrayTime;
00117
using asdm::Complex;
00118
using asdm::Entity;
00119
using asdm::EntityId;
00120
using asdm::EntityRef;
00121
using asdm::Flux;
00122
using asdm::Frequency;
00123
using asdm::Humidity;
00124
using asdm::Interval;
00125
using asdm::Length;
00126
using asdm::PartId;
00127
using asdm::Pressure;
00128
using asdm::Speed;
00129
using asdm::Tag;
00130
using asdm::Temperature;
00131
00132
using asdm::DuplicateKey;
00133
using asdm::ConversionException;
00134
using asdm::NoSuchRow;
00135
using asdm::DuplicateKey;
00136
00137
#include <Representable.h>
00138
00139
namespace asdm {
00140
00141
00142
00143
00144
class ASDM;
00145
class FeedRow;
00284 class FeedTable :
public Representable {
00285
friend class asdm::ASDM;
00286
00287
public:
00288
00289
00295
static vector<string>
getKeyName();
00296
00297
00298
virtual ~
FeedTable();
00299
00305
ASDM &
getContainer()
const;
00306
00312
unsigned int size() ;
00313
00319 string
getName()
const;
00320
00324
Entity getEntity()
const;
00325
00330
void setEntity(
Entity e);
00331
00332
00333
00334
00335
00340
FeedRow *
newRow();
00341
00346
FeedRow*
newRowEmpty();
00347
00348
00374
FeedRow *
newRow(
Tag antennaId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval, vector<int> receiverId,
int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle);
00375
00380
FeedRow *
newRowFull(
Tag antennaId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval, vector<int> receiverId,
int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle);
00381
00382
00395
FeedRow *
newRow(
FeedRow *row);
00396
00401
FeedRow *
newRowCopy(
FeedRow *row);
00402
00403
00404
00405
00406
00407
00408
00409
00410
00420
FeedRow*
add(
FeedRow* x) ;
00421
00422
00423
00424
00425
00426
00427
00433 vector<FeedRow *>
get() ;
00434
00435
00436
00437
00438
00454
FeedRow*
getRowByKey(
int feedId,
Tag antennaId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval);
00455
00456
00457
00465 vector <FeedRow *>
getRowByFeedId(
int);
00466
00467
00468
00496
FeedRow*
lookup(
Tag antennaId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval, vector<int> receiverId,
int numReceptor, vector<vector<double > > beamOffset, vector<vector<Length > > focusReference, vector<PolarizationTypeMod::PolarizationType > polarizationTypes, vector<vector<Complex > > polResponse, vector<Angle > receptorAngle);
00497
00498
00499
#ifndef WITHOUT_ACS
00500
00506 FeedTableIDL *
toIDL() ;
00507
#endif
00508
00509
#ifndef WITHOUT_ACS
00510
00516
void fromIDL(FeedTableIDL x)
throw(
DuplicateKey,
ConversionException);
00517
#endif
00518
00522
char *
toFITS()
const throw(
ConversionException);
00523
00527
void fromFITS(
char *fits)
throw(
ConversionException);
00528
00532 string
toVOTable()
const throw(
ConversionException);
00533
00537
void fromVOTable(string vo)
throw(
ConversionException);
00538
00545 string
toXML()
throw(
ConversionException);
00546
00552
void fromXML(string xmlDoc)
throw(
ConversionException);
00553
00559 string
toMIME();
00560
00567
void setFromMIME(
const string & mimeMsg);
00568
00578
void toFile(string directory);
00579
00588
void setFromFile(
const string& directory);
00589
00590
private:
00591
00600
FeedTable (
ASDM & container);
00601
00602
ASDM & container;
00603
00604
bool archiveAsBin;
00605
bool fileAsBin ;
00606
00607
Entity entity;
00608
00609
00610
00614
static string tableName;
00615
00616
00620
static vector<string> key;
00621
00622
00628
FeedRow* checkAndAdd(
FeedRow* x)
throw (
DuplicateKey,
UniquenessViolationException);
00629
00630
00631
00632
00640
FeedRow * insertByStartTime(
FeedRow* x, vector<FeedRow* >& row);
00641
00642
00643
00644
00645
00646
00647 vector<FeedRow * > privateRows;
00648
00649
00650
00651
00652
00653
00654
00655
00656
typedef vector <vector <FeedRow* > > ID_TIME_ROWS;
00657 map<string, ID_TIME_ROWS > context;
00658
00663 string Key(
Tag antennaId,
Tag spectralWindowId) ;
00664
00665
00666
00667
00673
void getByKeyNoAutoIncNoTime(vector <FeedRow*>& vin, vector <FeedRow*>& vout,
Tag antennaId,
Tag spectralWindowId);
00674
00675
00676
00677
void error()
throw(
ConversionException);
00678
00679 };
00680
00681 }
00682
00683
#endif