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 CorrelatorModeTable_CLASS
00035
#define CorrelatorModeTable_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
#include "CBasebandName.h"
00083
using namespace BasebandNameMod;
00084
00085
00086
00087
00088
00089
#include "CAccumMode.h"
00090
using namespace AccumModeMod;
00091
00092
00093
00094
00095
00096
#include "CAxisName.h"
00097
using namespace AxisNameMod;
00098
00099
00100
00101
#include "CFilterMode.h"
00102
using namespace FilterModeMod;
00103
00104
00105
00106
#include "CCorrelatorName.h"
00107
using namespace CorrelatorNameMod;
00108
00109
00110
00111
#ifndef WITHOUT_ACS
00112
#include <asdmIDLC.h>
00113
using asdmIDL::CorrelatorModeTableIDL;
00114
#endif
00115
00116
using asdm::Angle;
00117
using asdm::AngularRate;
00118
using asdm::ArrayTime;
00119
using asdm::Complex;
00120
using asdm::Entity;
00121
using asdm::EntityId;
00122
using asdm::EntityRef;
00123
using asdm::Flux;
00124
using asdm::Frequency;
00125
using asdm::Humidity;
00126
using asdm::Interval;
00127
using asdm::Length;
00128
using asdm::PartId;
00129
using asdm::Pressure;
00130
using asdm::Speed;
00131
using asdm::Tag;
00132
using asdm::Temperature;
00133
00134
using asdm::DuplicateKey;
00135
using asdm::ConversionException;
00136
using asdm::NoSuchRow;
00137
using asdm::DuplicateKey;
00138
00139
#include <Representable.h>
00140
00141
namespace asdm {
00142
00143
00144
00145
00146
class ASDM;
00147
class CorrelatorModeRow;
00223 class CorrelatorModeTable :
public Representable {
00224
friend class asdm::ASDM;
00225
00226
public:
00227
00228
00234
static vector<string>
getKeyName();
00235
00236
00237
virtual ~
CorrelatorModeTable();
00238
00244
ASDM &
getContainer()
const;
00245
00251
unsigned int size() ;
00252
00258 string
getName()
const;
00259
00263
Entity getEntity()
const;
00264
00269
void setEntity(
Entity e);
00270
00271
00272
00273
00274
00279
CorrelatorModeRow *
newRow();
00280
00285
CorrelatorModeRow*
newRowEmpty();
00286
00287
00309
CorrelatorModeRow *
newRow(
int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode,
int binMode, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName);
00310
00315
CorrelatorModeRow *
newRowFull(
int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode,
int binMode, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName);
00316
00317
00330
CorrelatorModeRow *
newRow(
CorrelatorModeRow *row);
00331
00336
CorrelatorModeRow *
newRowCopy(
CorrelatorModeRow *row);
00337
00338
00339
00340
00341
00342
00343
00344
00354
CorrelatorModeRow*
add(
CorrelatorModeRow* x) ;
00355
00356
00357
00358
00359
00360
00361
00367 vector<CorrelatorModeRow *>
get() ;
00368
00369
00370
00371
00372
00382
CorrelatorModeRow*
getRowByKey(
Tag almaCorrelatorModeId);
00383
00384
00385
00386
00387
00411
CorrelatorModeRow*
lookup(
int numBaseband, vector<BasebandNameMod::BasebandName > basebandNames, vector<int > basebandConfig, AccumModeMod::AccumMode accumMode,
int binMode, vector<AxisNameMod::AxisName > axesOrderArray, vector<FilterModeMod::FilterMode > filterMode, CorrelatorNameMod::CorrelatorName correlatorName);
00412
00413
00414
#ifndef WITHOUT_ACS
00415
00421 CorrelatorModeTableIDL *
toIDL() ;
00422
#endif
00423
00424
#ifndef WITHOUT_ACS
00425
00431
void fromIDL(CorrelatorModeTableIDL x)
throw(
DuplicateKey,
ConversionException);
00432
#endif
00433
00437
char *
toFITS()
const throw(
ConversionException);
00438
00442
void fromFITS(
char *fits)
throw(
ConversionException);
00443
00447 string
toVOTable()
const throw(
ConversionException);
00448
00452
void fromVOTable(string vo)
throw(
ConversionException);
00453
00460 string
toXML()
throw(
ConversionException);
00461
00467
void fromXML(string xmlDoc)
throw(
ConversionException);
00468
00474 string
toMIME();
00475
00482
void setFromMIME(
const string & mimeMsg);
00483
00493
void toFile(string directory);
00494
00503
void setFromFile(
const string& directory);
00504
00505
private:
00506
00515
CorrelatorModeTable (
ASDM & container);
00516
00517
ASDM & container;
00518
00519
bool archiveAsBin;
00520
bool fileAsBin ;
00521
00522
Entity entity;
00523
00524
00525
00526 map<string,int> noAutoIncIds;
00527
void autoIncrement(string key,
CorrelatorModeRow* x);
00528
00529
00533
static string tableName;
00534
00535
00539
static vector<string> key;
00540
00541
00547
CorrelatorModeRow* checkAndAdd(
CorrelatorModeRow* x)
throw (
DuplicateKey,
UniquenessViolationException);
00548
00549
00550
00551
00552
00553
00554 vector<CorrelatorModeRow * > privateRows;
00555
00556
00557
00558 vector<CorrelatorModeRow *> row;
00559
00560
00561
void error()
throw(
ConversionException);
00562
00563 };
00564
00565 }
00566
00567
#endif