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 SpectralWindowTable_CLASS
00035
#define SpectralWindowTable_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
#include "CNetSideband.h"
00099
using namespace NetSidebandMod;
00100
00101
00102
00103
#include "CSidebandProcessingMode.h"
00104
using namespace SidebandProcessingModeMod;
00105
00106
00107
00108
#include "CBasebandName.h"
00109
using namespace BasebandNameMod;
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
#include "CSpectralResolutionType.h"
00122
using namespace SpectralResolutionTypeMod;
00123
00124
00125
00126
00127
00128
#include "CWindowFunction.h"
00129
using namespace WindowFunctionMod;
00130
00131
00132
00133
00134
00135
#include "CCorrelationBit.h"
00136
using namespace CorrelationBitMod;
00137
00138
00139
00140
00141
00142
#ifndef WITHOUT_ACS
00143
#include <asdmIDLC.h>
00144
using asdmIDL::SpectralWindowTableIDL;
00145
#endif
00146
00147
using asdm::Angle;
00148
using asdm::AngularRate;
00149
using asdm::ArrayTime;
00150
using asdm::Complex;
00151
using asdm::Entity;
00152
using asdm::EntityId;
00153
using asdm::EntityRef;
00154
using asdm::Flux;
00155
using asdm::Frequency;
00156
using asdm::Humidity;
00157
using asdm::Interval;
00158
using asdm::Length;
00159
using asdm::PartId;
00160
using asdm::Pressure;
00161
using asdm::Speed;
00162
using asdm::Tag;
00163
using asdm::Temperature;
00164
00165
using asdm::DuplicateKey;
00166
using asdm::ConversionException;
00167
using asdm::NoSuchRow;
00168
using asdm::DuplicateKey;
00169
00170
#include <Representable.h>
00171
00172
namespace asdm {
00173
00174
00175
00176
00177
class ASDM;
00178
class SpectralWindowRow;
00359 class SpectralWindowTable :
public Representable {
00360
friend class asdm::ASDM;
00361
00362
public:
00363
00364
00370
static vector<string>
getKeyName();
00371
00372
00373
virtual ~
SpectralWindowTable();
00374
00380
ASDM &
getContainer()
const;
00381
00387
unsigned int size() ;
00388
00394 string
getName()
const;
00395
00399
Entity getEntity()
const;
00400
00405
void setEntity(
Entity e);
00406
00407
00408
00409
00410
00415
SpectralWindowRow *
newRow();
00416
00421
SpectralWindowRow*
newRowEmpty();
00422
00423
00457
SpectralWindowRow *
newRow(
int numChan,
Frequency refFreq, vector<Frequency > chanFreq, vector<Frequency > chanWidth, vector<Frequency > effectiveBw, vector<Frequency > resolution,
Frequency totBandwidth, NetSidebandMod::NetSideband netSideband, SidebandProcessingModeMod::SidebandProcessingMode sidebandProcessingMode,
bool quantization, WindowFunctionMod::WindowFunction windowFunction,
bool oversampling, CorrelationBitMod::CorrelationBit correlationBit,
bool flagRow);
00458
00463
SpectralWindowRow *
newRowFull(
int numChan,
Frequency refFreq, vector<Frequency > chanFreq, vector<Frequency > chanWidth, vector<Frequency > effectiveBw, vector<Frequency > resolution,
Frequency totBandwidth, NetSidebandMod::NetSideband netSideband, SidebandProcessingModeMod::SidebandProcessingMode sidebandProcessingMode,
bool quantization, WindowFunctionMod::WindowFunction windowFunction,
bool oversampling, CorrelationBitMod::CorrelationBit correlationBit,
bool flagRow);
00464
00465
00478
SpectralWindowRow *
newRow(
SpectralWindowRow *row);
00479
00484
SpectralWindowRow *
newRowCopy(
SpectralWindowRow *row);
00485
00486
00487
00488
00489
00490
00491
00492
00502
SpectralWindowRow*
add(
SpectralWindowRow* x) ;
00503
00504
00505
00506
00507
00508
00509
00515 vector<SpectralWindowRow *>
get() ;
00516
00517
00518
00519
00520
00530
SpectralWindowRow*
getRowByKey(
Tag spectralWindowId);
00531
00532
00533
00534
00535
00571
SpectralWindowRow*
lookup(
int numChan,
Frequency refFreq, vector<Frequency > chanFreq, vector<Frequency > chanWidth, vector<Frequency > effectiveBw, vector<Frequency > resolution,
Frequency totBandwidth, NetSidebandMod::NetSideband netSideband, SidebandProcessingModeMod::SidebandProcessingMode sidebandProcessingMode,
bool quantization, WindowFunctionMod::WindowFunction windowFunction,
bool oversampling, CorrelationBitMod::CorrelationBit correlationBit,
bool flagRow);
00572
00573
00574
#ifndef WITHOUT_ACS
00575
00581 SpectralWindowTableIDL *
toIDL() ;
00582
#endif
00583
00584
#ifndef WITHOUT_ACS
00585
00591
void fromIDL(SpectralWindowTableIDL x)
throw(
DuplicateKey,
ConversionException);
00592
#endif
00593
00597
char *
toFITS()
const throw(
ConversionException);
00598
00602
void fromFITS(
char *fits)
throw(
ConversionException);
00603
00607 string
toVOTable()
const throw(
ConversionException);
00608
00612
void fromVOTable(string vo)
throw(
ConversionException);
00613
00620 string
toXML()
throw(
ConversionException);
00621
00627
void fromXML(string xmlDoc)
throw(
ConversionException);
00628
00634 string
toMIME();
00635
00642
void setFromMIME(
const string & mimeMsg);
00643
00653
void toFile(string directory);
00654
00663
void setFromFile(
const string& directory);
00664
00665
private:
00666
00675
SpectralWindowTable (
ASDM & container);
00676
00677
ASDM & container;
00678
00679
bool archiveAsBin;
00680
bool fileAsBin ;
00681
00682
Entity entity;
00683
00684
00685
00686 map<string,int> noAutoIncIds;
00687
void autoIncrement(string key,
SpectralWindowRow* x);
00688
00689
00693
static string tableName;
00694
00695
00699
static vector<string> key;
00700
00701
00707
SpectralWindowRow* checkAndAdd(
SpectralWindowRow* x)
throw (
DuplicateKey,
UniquenessViolationException);
00708
00709
00710
00711
00712
00713
00714 vector<SpectralWindowRow * > privateRows;
00715
00716
00717
00718 vector<SpectralWindowRow *> row;
00719
00720
00721
void error()
throw(
ConversionException);
00722
00723 };
00724
00725 }
00726
00727
#endif