Go to the documentation of this file.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 CalGainTable_CLASS
00035 #define CalGainTable_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
00046
00047 #include <ArrayTime.h>
00048 using asdm::ArrayTime;
00049
00050 #include <Tag.h>
00051 using asdm::Tag;
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 #include <ConversionException.h>
00077 #include <DuplicateKey.h>
00078 #include <UniquenessViolationException.h>
00079 #include <NoSuchRow.h>
00080 #include <DuplicateKey.h>
00081 using asdm::DuplicateKey;
00082 using asdm::ConversionException;
00083 using asdm::NoSuchRow;
00084 using asdm::DuplicateKey;
00085
00086 #ifndef WITHOUT_ACS
00087 #include <asdmIDLC.h>
00088 using asdmIDL::CalGainTableIDL;
00089 #endif
00090
00091 #include <Representable.h>
00092
00093 namespace asdm {
00094
00095
00096
00097
00098 class ASDM;
00099 class CalGainRow;
00205 class CalGainTable : public Representable {
00206 friend class ASDM;
00207
00208 public:
00209
00210
00216 static vector<string> getKeyName();
00217
00218
00219 virtual ~CalGainTable();
00220
00226 ASDM &getContainer() const;
00227
00233 unsigned int size() ;
00234
00240 string getName() const;
00241
00247 static const vector<string>& getAttributesNames();
00248
00252 Entity getEntity() const;
00253
00258 void setEntity(Entity e);
00259
00267 string toXML() ;
00268
00269 #ifndef WITHOUT_ACS
00270
00276 CalGainTableIDL *toIDL() ;
00277 #endif
00278
00279 #ifndef WITHOUT_ACS
00280
00286 void fromIDL(CalGainTableIDL x) ;
00287 #endif
00288
00289
00290
00291
00292
00297 CalGainRow *newRow();
00298
00299
00327 CalGainRow *newRow(Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight);
00328
00329
00330
00343 CalGainRow *newRow(CalGainRow *row);
00344
00345
00346
00347
00348
00349
00362 CalGainRow* add(CalGainRow* x) ;
00363
00364
00365
00366
00367
00368
00369
00370
00371
00377 vector<CalGainRow *> get() ;
00378
00379
00380
00381
00382
00394 CalGainRow* getRowByKey(Tag calDataId, Tag calReductionId);
00395
00396
00397
00398
00399
00429 CalGainRow* lookup(Tag calDataId, Tag calReductionId, ArrayTime startValidTime, ArrayTime endValidTime, float gain, bool gainValid, float fit, float fitWeight, bool totalGainValid, float totalFit, float totalFitWeight);
00430
00431
00432 private:
00433
00442 CalGainTable (ASDM & container);
00443
00444 ASDM & container;
00445
00446 bool archiveAsBin;
00447 bool fileAsBin ;
00448
00449 Entity entity;
00450
00451
00452
00456 static string tableName;
00457
00461 static const vector<string> attributesNames;
00462
00466 static vector<string> initAttributesNames();
00467
00468
00472 static vector<string> key;
00473
00474
00482 CalGainRow* checkAndAdd(CalGainRow* x) ;
00483
00484
00485
00486
00487
00488
00489 vector<CalGainRow * > privateRows;
00490
00491
00492
00493 vector<CalGainRow *> row;
00494
00495
00496 void error() ;
00497
00498
00505 void fromXML(string xmlDoc) ;
00506
00511 void setFromMIMEFile(const string& directory);
00512 void setFromXMLFile(const string& directory);
00513
00521 string toMIME(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00522
00523
00530 void setFromMIME(const string & mimeMsg);
00531
00535 string MIMEXMLPart(const asdm::ByteOrder* byteOrder=asdm::ByteOrder::Machine_Endianity);
00536
00546 void toFile(string directory);
00547
00556 void setFromFile(const string& directory);
00557
00558 };
00559
00560 }
00561
00562 #endif