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{
81public:
82 // Construct from an MS DATA_DESC subtable
83 MSDataDescIndex(const MSDataDescription& dataDescription);
84
85 // Null destructor
86 virtual ~MSDataDescIndex() {}
87
88 // Look up DATA_DESC_ID's for a given spectral window id
89 Vector<Int> matchSpwId(const Int& spwId);
91
92 // Look up DATA_DESC_ID's for a given polarization id
93 Vector<Int> matchPolId(const Int& polId);
95
96 // Look up DATA_DESC_ID's for a given spectral window and polarization id.
97 Vector<Int> matchSpwIdAndPolznId(const Int& spwId, const Int& polznId);
98
99private:
100 // Disallow null constructor
102
103 // DATA_DESC subtable column accessor
105
106 // Vector cache of DataDesc id's
109};
110
111
112} //# NAMESPACE CASACORE - END
113
114#endif
115
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:48