casacore
Loading...
Searching...
No Matches
MSSelectableMainColumn.h
Go to the documentation of this file.
1// -*- C++ -*-
2// # MSSelectableMainColumn.h: The generic interface for tables that can be used with MSSelection
3// # Copyright (C) 1996,1997,1998,1999,2001
4// # Associated Universities, Inc. Washington DC, USA.
5// #
6// # This library is free software; you can redistribute it and/or modify it
7// # under the terms of the GNU Library General Public License as published by
8// # the Free Software Foundation; either version 2 of the License, or (at your
9// # option) any later version.
10// #
11// # This library is distributed in the hope that it will be useful, but WITHOUT
12// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14// # License for more details.
15// #
16// # You should have received a copy of the GNU Library General Public License
17// # along with this library; if not, write to the Free Software Foundation,
18// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19// #
20// # Correspondence concerning AIPS++ should be addressed as follows:
21// # Internet email: casa-feedback@nrao.edu.
22// # Postal address: AIPS++ Project Office
23// # National Radio Astronomy Observatory
24// # 520 Edgemont Road
25// # Charlottesville, VA 22903-2475 USA
26
27#ifndef MS_MSSELECTABLEMAINCOLUMN_H
28#define MS_MSSELECTABLEMAINCOLUMN_H
29
30#include <casacore/casa/aips.h>
31#include <casacore/casa/BasicSL/String.h>
32#include <casacore/casa/Arrays/Vector.h>
33#include <casacore/casa/Arrays/Matrix.h>
34#include <casacore/casa/Arrays/Cube.h>
35#include <casacore/tables/TaQL/ExprNode.h>
36#include <casacore/ms/MeasurementSets/MeasurementSet.h>
37#include <casacore/ms/MeasurementSets/MSMainEnums.h>
38#include <casacore/ms/MSSel/MSSelectionError.h>
39#include <casacore/ms/MSSel/MSSelectableTable.h>
40#include <casacore/ms/MeasurementSets/MSMainColumns.h>
41namespace casacore { // # NAMESPACE CASACORE - BEGIN
42
44 public:
45 MSSelectableMainColumn(const Table& msLikeTable) { init(msLikeTable); }
48
49 virtual void init(const Table& msLikeTable) { table_p = &msLikeTable; }
50 const Table* table() { return table_p; }
51 virtual const ArrayColumn<Bool>& flag() = 0;
52 virtual Bool flagRow(rownr_t i) = 0;
55 virtual const MeasurementSet* asMS() = 0;
56
57 protected:
58 const Table* table_p;
59};
60
62 public:
64 MSMainColInterface(const Table& msAsTable) : MSSelectableMainColumn(msAsTable) {
65 init(msAsTable);
66 }
67
69 if (msCols_p) delete msCols_p;
70 }
71
72 virtual void init(const Table& msAsTable) {
74 ms_p = MeasurementSet(msAsTable);
76 }
77 virtual const ArrayColumn<Bool>& flag() { return msCols_p->flag(); }
78
79 // virtual Bool flagRow(const Int& i) {return allTrue(msCols_p->flag()(i));}
80 virtual Bool flagRow(rownr_t i) { return msCols_p->flagRow()(i); }
81 virtual const ScalarQuantColumn<Double>& exposureQuant() { return msCols_p->exposureQuant(); }
82 virtual const ScalarQuantColumn<Double>& timeQuant() { return msCols_p->timeQuant(); }
83
84 virtual const MeasurementSet* asMS() { return static_cast<const MeasurementSet*>(table()); }
85
86 private:
89};
90
91} // namespace casacore
92
93#endif
virtual void init(const Table &msAsTable)
virtual Bool flagRow(rownr_t i)
virtual Bool flagRow(const Int& i) {return allTrue(msCols_p->flag()(i));}
virtual const ScalarQuantColumn< Double > & exposureQuant()
MSMainColInterface(const Table &msAsTable)
virtual const ArrayColumn< Bool > & flag()
virtual const ScalarQuantColumn< Double > & timeQuant()
virtual const MeasurementSet * asMS()
MSSelectableMainColumn(const Table &msLikeTable)
virtual const ArrayColumn< Bool > & flag()=0
virtual Bool flagRow(rownr_t i)=0
virtual void init(const Table &msLikeTable)
virtual const ScalarQuantColumn< Double > & exposureQuant()=0
virtual const ScalarQuantColumn< Double > & timeQuant()=0
virtual const MeasurementSet * asMS()=0
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
void init()
Other internal helper function(s).
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44