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 TotalPowerTable_CLASS
00035
#define TotalPowerTable_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
#ifndef WITHOUT_ACS
00070
#include <asdmIDLC.h>
00071
using asdmIDL::TotalPowerTableIDL;
00072
#endif
00073
00074
using asdm::Angle;
00075
using asdm::AngularRate;
00076
using asdm::ArrayTime;
00077
using asdm::Complex;
00078
using asdm::Entity;
00079
using asdm::EntityId;
00080
using asdm::EntityRef;
00081
using asdm::Flux;
00082
using asdm::Frequency;
00083
using asdm::Humidity;
00084
using asdm::Interval;
00085
using asdm::Length;
00086
using asdm::PartId;
00087
using asdm::Pressure;
00088
using asdm::Speed;
00089
using asdm::Tag;
00090
using asdm::Temperature;
00091
00092
using asdm::DuplicateKey;
00093
using asdm::ConversionException;
00094
using asdm::NoSuchRow;
00095
using asdm::DuplicateKey;
00096
00097
#include <Representable.h>
00098
00099
namespace asdm {
00100
00101
00102
00103
00104
class ASDM;
00105
class TotalPowerRow;
00233 class TotalPowerTable :
public Representable {
00234
friend class asdm::ASDM;
00235
00236
public:
00237
00238
00244
static vector<string>
getKeyName();
00245
00246
00247
virtual ~
TotalPowerTable();
00248
00254
ASDM &
getContainer()
const;
00255
00261
unsigned int size() ;
00262
00268 string
getName()
const;
00269
00273
Entity getEntity()
const;
00274
00279
void setEntity(
Entity e);
00280
00281
00282
00283
00284
00289
TotalPowerRow *
newRow();
00290
00295
TotalPowerRow *
newRowEmpty();
00296
00334
TotalPowerRow *
newRow(
Tag configDescriptionId,
Tag fieldId,
ArrayTime time,
Tag execBlockId, vector<Tag> stateId,
int scanNumber,
int subscanNumber,
int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol,
bool flagRow,
Interval interval);
00335
00340
TotalPowerRow *
newRowFull(
Tag configDescriptionId,
Tag fieldId,
ArrayTime time,
Tag execBlockId, vector<Tag> stateId,
int scanNumber,
int subscanNumber,
int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol,
bool flagRow,
Interval interval);
00341
00354
TotalPowerRow *
newRow(
TotalPowerRow *row);
00355
00360
TotalPowerRow *
newRowCopy(
TotalPowerRow *row);
00361
00362
00363
00364
00365
00366
00379
TotalPowerRow*
add(
TotalPowerRow* x) ;
00380
00381
00382
00383
00384
00385
00391 vector<TotalPowerRow *>
get() ;
00392
00393
00401 vector <TotalPowerRow*> *
getByContext(
Tag configDescriptionId,
Tag fieldId);
00402
00403
00417
TotalPowerRow*
getRowByKey(
Tag configDescriptionId,
Tag fieldId,
ArrayTime time);
00418
00419
00420
00421
00422
00462
TotalPowerRow*
lookup(
Tag configDescriptionId,
Tag fieldId,
ArrayTime time,
Tag execBlockId, vector<Tag> stateId,
int scanNumber,
int subscanNumber,
int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol,
bool flagRow,
Interval interval);
00463
00464
00465
#ifndef WITHOUT_ACS
00466
00472 TotalPowerTableIDL *
toIDL() ;
00473
#endif
00474
00475
#ifndef WITHOUT_ACS
00476
00482
void fromIDL(TotalPowerTableIDL x)
throw(
DuplicateKey,
ConversionException);
00483
#endif
00484
00488
char *
toFITS()
const throw(
ConversionException);
00489
00493
void fromFITS(
char *fits)
throw(
ConversionException);
00494
00498 string
toVOTable()
const throw(
ConversionException);
00499
00503
void fromVOTable(string vo)
throw(
ConversionException);
00504
00511 string
toXML()
throw(
ConversionException);
00512
00518
void fromXML(string xmlDoc)
throw(
ConversionException);
00519
00525 string
toMIME();
00526
00533
void setFromMIME(
const string & mimeMsg);
00534
00543
void toFile(string directory);
00544
00553
void setFromFile(
const string& directory);
00554
private:
00555
00564
TotalPowerTable (
ASDM & container);
00565
00566
ASDM & container;
00567
00568
bool archiveAsBin;
00569
bool fileAsBin;
00570
00571
Entity entity;
00572
00573
00574
00578
static string tableName;
00579
00580
00584
static vector<string> key;
00585
00586
00592
TotalPowerRow* checkAndAdd(
TotalPowerRow* x)
throw (
DuplicateKey);
00593
00594
00595
00596
00597
00598
00599 vector<TotalPowerRow * > privateRows;
00600
00601
00607
void getByRequiredValue(vector <TotalPowerRow*>& vin, vector <TotalPowerRow*>& vout,
Tag execBlockId, vector<Tag> stateId,
int scanNumber,
int subscanNumber,
int integrationNumber, vector<vector<Length > > uvw, vector<vector<Interval > > exposure, vector<vector<ArrayTime > > timeCentroid, vector<vector<vector<float > > > floatData, vector<int > flagAnt, vector<vector<int > > flagPol,
bool flagRow,
Interval interval);
00608
00609
00610
00611
00612
00613
00614
00615
void error()
throw(
ConversionException);
00616
00617
00618
00619 map<string, vector<TotalPowerRow*> > context;
00620
00621 string Key(
const Tag& configDescriptionId,
const Tag& fiedId);
00622
00623
TotalPowerRow * insertByTime(
TotalPowerRow* x, vector<TotalPowerRow *>&row);
00624
00625 };
00626
00627 }
00628
00629
#endif