source: trunk/src/STApplyTable.h@ 2700

Last change on this file since 2700 was 2696, checked in by Takeshi Nakazato, 12 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

First version of single dish apply table.

STApplyTable: base class
STCalTsys: apply table for Tsys calibration
STCalSky: apply table for sky calibration


File size: 2.1 KB
Line 
1//
2// C++ Interface: STApplyTable
3//
4// Description:
5//
6// Base class for application tables.
7//
8// Author: Takeshi Nakazato
9//
10// Copyright: See COPYING file that comes with this distribution
11//
12//
13#ifndef ASAPAPPLYTABLE_H
14#define ASAPAPPLYTABLE_H
15
16#include <casa/Arrays/Vector.h>
17#include <casa/Logging/LogIO.h>
18#include <tables/Tables/Table.h>
19#include <tables/Tables/ScalarColumn.h>
20#include <measures/TableMeasures/ScalarMeasColumn.h>
21
22#include "Scantable.h"
23#include "STSelector.h"
24
25namespace asap {
26
27/**
28Abstract base class for all application tables.
29
30@author Takeshi Nakazato
31@date $Date:$
32@version $Revision:$
33*/
34class STApplyTable {
35public:
36 STApplyTable() {;}
37 STApplyTable(const Scantable& parent, const casa::String& name);
38
39 virtual ~STApplyTable();
40
41 /**
42 * Add extra columns. To be implemented in derived class
43 */
44 virtual void setup() = 0;
45
46 /***
47 * Name of the table
48 ***/
49 virtual const casa::String& name() const = 0;
50
51 const casa::Table& table() const { return table_; }
52 casa::Table table() { return table_; }
53 void attach();
54 void attachBaseColumns();
55 virtual void attachOptionalColumns() = 0;
56
57 casa::Int nrow() {return table_.nrow();}
58
59 casa::Vector<casa::uInt> getScan() {return scanCol_.getColumn();}
60 casa::Vector<casa::uInt> getCycle() {return cycleCol_.getColumn();}
61 casa::Vector<casa::uInt> getBeam() {return beamCol_.getColumn();}
62 casa::Vector<casa::uInt> getIF() {return ifCol_.getColumn();}
63 casa::Vector<casa::uInt> getPol() {return polCol_.getColumn();}
64 casa::Vector<casa::Double> getTime() {return timeCol_.getColumn();}
65
66 void setSelection(STSelector &sel);
67 void unsetSelection();
68
69protected:
70 void setbasedata(casa::uInt irow, casa::uInt scanno, casa::uInt cycleno,
71 casa::uInt beamno, casa::uInt ifno, casa::uInt polno,
72 casa::Double time);
73
74 casa::Table table_, originaltable_;
75 casa::ScalarColumn<casa::uInt> scanCol_, cycleCol_, beamCol_, ifCol_, polCol_;
76 casa::ScalarColumn<casa::Double> timeCol_;
77 casa::MEpoch::ScalarColumn timeMeasCol_;
78 STSelector sel_;
79 casa::LogIO os_;
80
81private:
82};
83
84}
85
86#endif
Note: See TracBrowser for help on using the repository browser.