casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ObservationRecord.h
Go to the documentation of this file.
1 /*
2  * ObservationRecord.h
3  *
4  * Created on: Jan 27, 2016
5  * Author: nakazato
6  */
7 
8 #ifndef SINGLEDISH_FILLER_OBSERVATIONRECORD_H_
9 #define SINGLEDISH_FILLER_OBSERVATIONRECORD_H_
10 
14 
15 namespace casa { //# NAMESPACE CASA - BEGIN
16 namespace sdfiller { //# NAMESPACE SDFILLER - BEGIN
17 
21 
22  // mandatory
27 
28  // optional
33 
34  // method
35  void clear() {
36  telescope_name = "";
38  observer = "";
39  project = "";
40  schedule_type = "";
41  release_date = -1.0;
42  schedule = "";
43  log.resize();
44  }
45 
48  time_range = other.time_range;
49  observer = other.observer;
50  project = other.project;
52  release_date = other.release_date;
53  schedule = other.schedule;
54  log = other.log;
55  return *this;
56  }
57 
58  void add(AssociatingTable &table, AssociatingColumns &/*columns*/) {
59  table.addRow(1, true);
60  }
61 
63  if (columns.nrow() <= irow) {
64  return false;
65  }
66 
67  columns.telescopeName().put(irow, telescope_name);
68  columns.timeRange().put(irow, time_range);
69  columns.observer().put(irow, observer);
70  columns.project().put(irow, project);
71  if (schedule_type.size() > 0) {
72  columns.scheduleType().put(irow, schedule_type);
73  }
74  if (0.0 <= release_date) {
75  columns.releaseDate().put(irow, release_date);
76  }
77  if (schedule.size() > 0) {
78  columns.schedule().put(irow, schedule);
79  }
80  if (log.size() > 0) {
81  columns.log().put(irow, log);
82  }
83  return true;
84  }
85 };
86 
87 } //# NAMESPACE SDFILLER - END
88 } //# NAMESPACE CASA - END
89 
90 #endif /* SINGLEDISH_FILLER_OBSERVATIONRECORD_H_ */
void addRow(uInt nrrow=1, Bool initialize=False)
Add one or more rows at the end of the table.
Definition: Table.h:1235
casacore::String telescope_name
mandatory
A Table intended to hold a MeasurementSet OBSERVATION table.
Definition: MSObservation.h:78
A class to provide easy read-write access to MSObservation columns.
Definition: MSObsColumns.h:181
casacore::String schedule_type
optional
ScalarColumn< Double > & releaseDate()
Definition: MSObsColumns.h:196
void put(uInt rownr, const Array< T > &array)
Put the array in a particular cell (i.e.
size_type size() const
Capacity, size.
Definition: String.h:342
uInt nrow() const
Convenience function that returns the number of rows in any of the columns.
Definition: MSObsColumns.h:111
ObservationRecord & operator=(ObservationRecord const &other)
casacore::MSObservationColumns AssociatingColumns
ArrayColumn< String > & schedule()
Definition: MSObsColumns.h:199
ArrayColumn< String > & log()
Definition: MSObsColumns.h:193
void add(AssociatingTable &table, AssociatingColumns &)
double Double
Definition: aipstype.h:55
ArrayColumn< Double > & timeRange()
Definition: MSObsColumns.h:202
ScalarColumn< String > & scheduleType()
Definition: MSObsColumns.h:200
casacore::Vector< casacore::String > schedule
casacore::MSObservation AssociatingTable
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Vector< casacore::String > log
ScalarColumn< String > & observer()
Definition: MSObsColumns.h:194
casacore::Bool fill(casacore::uInt irow, AssociatingColumns &columns)
ScalarColumn< String > & project()
Definition: MSObsColumns.h:195
void put(uInt rownr, const T &value)
Put the value in a particular cell (i.e.
Definition: ScalarColumn.h:198
casacore::Vector< casacore::Double > time_range
String: the storage and methods of handling collections of characters.
Definition: String.h:223
size_t size() const
Definition: ArrayBase.h:101
void resize(size_t len, Bool copyValues=False)
Definition: Vector.h:167
ScalarColumn< String > & telescopeName()
Definition: MSObsColumns.h:201
unsigned int uInt
Definition: aipstype.h:51