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 GainTrackingTable_CLASS
00035
#define GainTrackingTable_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
00095
00096
00097
00098
#ifndef WITHOUT_ACS
00099
#include <asdmIDLC.h>
00100
using asdmIDL::GainTrackingTableIDL;
00101
#endif
00102
00103
using asdm::Angle;
00104
using asdm::AngularRate;
00105
using asdm::ArrayTime;
00106
using asdm::Complex;
00107
using asdm::Entity;
00108
using asdm::EntityId;
00109
using asdm::EntityRef;
00110
using asdm::Flux;
00111
using asdm::Frequency;
00112
using asdm::Humidity;
00113
using asdm::Interval;
00114
using asdm::Length;
00115
using asdm::PartId;
00116
using asdm::Pressure;
00117
using asdm::Speed;
00118
using asdm::Tag;
00119
using asdm::Temperature;
00120
00121
using asdm::DuplicateKey;
00122
using asdm::ConversionException;
00123
using asdm::NoSuchRow;
00124
using asdm::DuplicateKey;
00125
00126
#include <Representable.h>
00127
00128
namespace asdm {
00129
00130
00131
00132
00133
class ASDM;
00134
class GainTrackingRow;
00243 class GainTrackingTable :
public Representable {
00244
friend class asdm::ASDM;
00245
00246
public:
00247
00248
00254
static vector<string>
getKeyName();
00255
00256
00257
virtual ~
GainTrackingTable();
00258
00264
ASDM &
getContainer()
const;
00265
00271
unsigned int size() ;
00272
00278 string
getName()
const;
00279
00283
Entity getEntity()
const;
00284
00289
void setEntity(
Entity e);
00290
00291
00292
00293
00294
00299
GainTrackingRow *
newRow();
00300
00305
GainTrackingRow*
newRowEmpty();
00306
00307
00335
GainTrackingRow *
newRow(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
float attenuator,
Interval delayoff1,
Interval delayoff2,
Angle phaseoff1,
Angle phaseoff2,
AngularRate rateoff1,
AngularRate rateoff2);
00336
00341
GainTrackingRow *
newRowFull(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
float attenuator,
Interval delayoff1,
Interval delayoff2,
Angle phaseoff1,
Angle phaseoff2,
AngularRate rateoff1,
AngularRate rateoff2);
00342
00343
00356
GainTrackingRow *
newRow(
GainTrackingRow *row);
00357
00362
GainTrackingRow *
newRowCopy(
GainTrackingRow *row);
00363
00364
00365
00366
00367
00368
00385
GainTrackingRow*
add(
GainTrackingRow* x) ;
00386
00387
00388
00389
00390
00391
00392
00393
00394
00400 vector<GainTrackingRow *>
get() ;
00401
00402
00410 vector <GainTrackingRow*> *
getByContext(
Tag antennaId,
int feedId,
Tag spectralWindowId);
00411
00412
00413
00414
00415
00431
GainTrackingRow*
getRowByKey(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval);
00432
00433
00434
00435
00436
00466
GainTrackingRow*
lookup(
Tag antennaId,
int feedId,
Tag spectralWindowId,
ArrayTimeInterval timeInterval,
float attenuator,
Interval delayoff1,
Interval delayoff2,
Angle phaseoff1,
Angle phaseoff2,
AngularRate rateoff1,
AngularRate rateoff2);
00467
00468
00469
#ifndef WITHOUT_ACS
00470
00476 GainTrackingTableIDL *
toIDL() ;
00477
#endif
00478
00479
#ifndef WITHOUT_ACS
00480
00486
void fromIDL(GainTrackingTableIDL x)
throw(
DuplicateKey,
ConversionException);
00487
#endif
00488
00492
char *
toFITS()
const throw(
ConversionException);
00493
00497
void fromFITS(
char *fits)
throw(
ConversionException);
00498
00502 string
toVOTable()
const throw(
ConversionException);
00503
00507
void fromVOTable(string vo)
throw(
ConversionException);
00508
00515 string
toXML()
throw(
ConversionException);
00516
00522
void fromXML(string xmlDoc)
throw(
ConversionException);
00523
00529 string
toMIME();
00530
00537
void setFromMIME(
const string & mimeMsg);
00538
00548
void toFile(string directory);
00549
00558
void setFromFile(
const string& directory);
00559
00560
private:
00561
00570
GainTrackingTable (
ASDM & container);
00571
00572
ASDM & container;
00573
00574
bool archiveAsBin;
00575
bool fileAsBin ;
00576
00577
Entity entity;
00578
00579
00580
00584
static string tableName;
00585
00586
00590
static vector<string> key;
00591
00592
00598
GainTrackingRow* checkAndAdd(
GainTrackingRow* x)
throw (
DuplicateKey);
00599
00600
00601
00602
00610
GainTrackingRow * insertByStartTime(
GainTrackingRow* x, vector<GainTrackingRow* >& row);
00611
00612
00613
00614
00615
00616
00617 vector<GainTrackingRow * > privateRows;
00618
00619
00620
00621
00622
00623
00624
00625
00626
typedef vector <GainTrackingRow* > TIME_ROWS;
00627 map<string, TIME_ROWS > context;
00628
00633 string Key(
Tag antennaId,
int feedId,
Tag spectralWindowId) ;
00634
00635
00636
00637
00643
void getByKeyNoAutoIncNoTime(vector <GainTrackingRow*>& vin, vector <GainTrackingRow*>& vout,
Tag antennaId,
int feedId,
Tag spectralWindowId);
00644
00645
00646
00647
void error()
throw(
ConversionException);
00648
00649 };
00650
00651 }
00652
00653
#endif