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: aips2-request@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//#
27//# $Id$
28
29#ifndef MS_MSDATADESCINDEX_H
30#define MS_MSDATADESCINDEX_H
31
32//# includes
33#include <casacore/casa/aips.h>
34#include <casacore/ms/MeasurementSets/MSDataDescription.h>
35#include <casacore/ms/MeasurementSets/MSDataDescColumns.h>
36#include <casacore/casa/Arrays/Vector.h>
37#include <casacore/casa/BasicSL/String.h>
38
39namespace casacore { //# NAMESPACE CASACORE - BEGIN
40
41//# forward declarations
42
43// <summary>
44// Class to handle lookup or indexing into a MS DATA_DESC subtable
45// </summary>
46
47// <use visibility=export>
48//
49// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
50// </reviewed>
51
52// <prerequisite>
53// <li> MeasurementSet
54// <li> MSDataDescription
55// </prerequisite>
56//
57// <etymology>
58// From "MeasurementSet", "DATA_DESC subtable" and "index".
59// </etymology>
60//
61// <synopsis>
62// This class provides lookup and indexing into an MS DATA_DESC
63// subtable. These services include returning rows numbers
64// (which for the DATA_DESC subtable are DATA_DESC_ID's) associated
65// with specific data in the subtable.
66// </synopsis>
67//
68// <example>
69// </example>
70//
71// <motivation>
72// Collect together all subtable indexing and lookup for the
73// DATA_DESC subtable, for encapsulation and efficiency.
74// </motivation>
75//
76// <thrown>
77// <li>
78// <li>
79// </thrown>
80//
81
83{
84public:
85 // Construct from an MS DATA_DESC subtable
86 MSDataDescIndex(const MSDataDescription& dataDescription);
87
88 // Null destructor
89 virtual ~MSDataDescIndex() {}
90
91 // Look up DATA_DESC_ID's for a given spectral window id
92 Vector<Int> matchSpwId(const Int& spwId);
94
95 // Look up DATA_DESC_ID's for a given polarization id
96 Vector<Int> matchPolId(const Int& polId);
98
99 // Look up DATA_DESC_ID's for a given spectral window and polarization id.
100 Vector<Int> matchSpwIdAndPolznId(const Int& spwId, const Int& polznId);
101
102private:
103 // Disallow null constructor
105
106 // DATA_DESC subtable column accessor
108
109 // Vector cache of DataDesc id's
112};
113
114
115} //# NAMESPACE CASACORE - END
116
117#endif
118
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.
this file contains all the compiler specific defines
Definition mainpage.dox:28
int Int
Definition aipstype.h:50