casacore
Loading...
Searching...
No Matches
MSDataDescIndex.h
Go to the documentation of this file.
1// # MSDataDescIndex: index or lookup in a MeasurementSet DATA_DESC subtable
2// # Copyright (C) 2000,2001,2002
3// # Associated Universities, Inc. Washington DC, USA.
4// #
5// # This library is free software; you can redistribute it and/or modify it
6// # under the terms of the GNU Library General Public License as published by
7// # the Free Software Foundation; either version 2 of the License, or (at your
8// # option) any later version.
9// #
10// # This library is distributed in the hope that it will be useful, but WITHOUT
11// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13// # License for more details.
14// #
15// # You should have received a copy of the GNU Library General Public License
16// # along with this library; if not, write to the Free Software Foundation,
17// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18// #
19// # Correspondence concerning AIPS++ should be addressed as follows:
20// # Internet email: casa-feedback@nrao.edu.
21// # Postal address: AIPS++ Project Office
22// # National Radio Astronomy Observatory
23// # 520 Edgemont Road
24// # Charlottesville, VA 22903-2475 USA
25
26#ifndef MS_MSDATADESCINDEX_H
27#define MS_MSDATADESCINDEX_H
28
29// # includes
30#include <casacore/casa/aips.h>
31#include <casacore/ms/MeasurementSets/MSDataDescription.h>
32#include <casacore/ms/MeasurementSets/MSDataDescColumns.h>
33#include <casacore/casa/Arrays/Vector.h>
34#include <casacore/casa/BasicSL/String.h>
35
36namespace casacore { // # NAMESPACE CASACORE - BEGIN
37
38// # forward declarations
39
40// <summary>
41// Class to handle lookup or indexing into a MS DATA_DESC subtable
42// </summary>
43
44// <use visibility=export>
45//
46// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
47// </reviewed>
48
49// <prerequisite>
50// <li> MeasurementSet
51// <li> MSDataDescription
52// </prerequisite>
53//
54// <etymology>
55// From "MeasurementSet", "DATA_DESC subtable" and "index".
56// </etymology>
57//
58// <synopsis>
59// This class provides lookup and indexing into an MS DATA_DESC
60// subtable. These services include returning rows numbers
61// (which for the DATA_DESC subtable are DATA_DESC_ID's) associated
62// with specific data in the subtable.
63// </synopsis>
64//
65// <example>
66// </example>
67//
68// <motivation>
69// Collect together all subtable indexing and lookup for the
70// DATA_DESC subtable, for encapsulation and efficiency.
71// </motivation>
72//
73// <thrown>
74// <li>
75// <li>
76// </thrown>
77//
78
80 public:
81 // Construct from an MS DATA_DESC subtable
82 MSDataDescIndex(const MSDataDescription& dataDescription);
83
84 // Null destructor
85 virtual ~MSDataDescIndex() {}
86
87 // Look up DATA_DESC_ID's for a given spectral window id
88 Vector<Int> matchSpwId(const Int& spwId);
90
91 // Look up DATA_DESC_ID's for a given polarization id
92 Vector<Int> matchPolId(const Int& polId);
94
95 // Look up DATA_DESC_ID's for a given spectral window and polarization id.
96 Vector<Int> matchSpwIdAndPolznId(const Int& spwId, const Int& polznId);
97
98 private:
99 // Disallow null constructor
101
102 // DATA_DESC subtable column accessor
104
105 // Vector cache of DataDesc id's
108};
109
110} // namespace casacore
111
112#endif
Vector< Int > dataDescIds_p
Vector cache of DataDesc id's.
Vector< Int > matchPolId(const Int &polId)
Look up DATA_DESC_ID's for a given polarization id.
Vector< Int > matchPolId(const Vector< Int > &polIds)
MSDataDescColumns msDataDescCols_p
DATA_DESC subtable column accessor.
Vector< Int > matchSpwId(const Vector< Int > &spwIds)
MSDataDescIndex(const MSDataDescription &dataDescription)
Construct from an MS DATA_DESC subtable.
Vector< Int > matchSpwId(const Int &spwId)
Look up DATA_DESC_ID's for a given spectral window id.
MSDataDescIndex()
Disallow null constructor.
Vector< Int > matchSpwIdAndPolznId(const Int &spwId, const Int &polznId)
Look up DATA_DESC_ID's for a given spectral window and polarization id.
virtual ~MSDataDescIndex()
Null destructor.
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
int Int
Definition aipstype.h:48