casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AsdmIndex.h
Go to the documentation of this file.
1 //# AsdmIndex.h: Index for the ASDM Storage Manager
2 //# Copyright (C) 2012
3 //# Associated Universities, Inc. Washington DC, USA.
4 //# (c) European Southern Observatory, 2012
5 //# Copyright by ESO (in the framework of the ALMA collaboration)
6 //#
7 //# This library is free software; you can redistribute it and/or modify it
8 //# under the terms of the GNU Library General Public License as published by
9 //# the Free Software Foundation; either version 2 of the License, or (at your
10 //# option) any later version.
11 //#
12 //# This library is distributed in the hope that it will be useful, but WITHOUT
13 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 //# License for more details.
16 //#
17 //# You should have receied a copy of the GNU Library General Public License
18 //# along with this library; if not, write to the Free Software Foundation,
19 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
20 //#
21 //# Correspondence concerning AIPS++ should be addressed as follows:
22 //# Internet email: aips2-request@nrao.edu.
23 //# Postal address: AIPS++ Project Office
24 //# National Radio Astronomy Observatory
25 //# 520 Edgemont Road
26 //# Charlottesville, VA 22903-2475 USA
27 //#
28 //# $Id: AsdmColumn.h 19324 2011-11-21 07:29:55Z diepen $
29 
30 #ifndef ASDM_ASDMINDEX_H
31 #define ASDM_ASDMINDEX_H
32 
33 
34 //# Includes
35 #include <casa/aips.h>
36 #include <casa/vector.h>
37 #include <ostream>
38 
39 namespace casacore{
40 
41 class AipsIO;
42 }
43 
44 namespace casa {
45 
46 //# Forward declaration.
47 
48 
49 // <summary>
50 // An index entry for the ASDM Storage Manager.
51 // </summary>
52 
53 // <use visibility=local>
54 
55 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tAsdmStMan.cc">
56 // </reviewed>
57 
58 // <prerequisite>
59 //# Classes you should understand before using this one.
60 // <li> <linkto class=AsdmStMan>AsdmStMan</linkto>
61 // </prerequisite>
62 
63 // <synopsis>
64 // ASDM stores all data of a time slot in a data array for the cross-correlation
65 // data and a data array for the auto-correlation data.
66 // An object of this class defines the shapes and locations of the data for
67 // each time slot.
68 // </synopsis>
69 
70 struct AsdmIndex
71 {
72  // Get nr of complex values in cross-correlation data block.
73  casacore::uInt dataSize() const;
74 
75  // Get number of rows spanned by the data blocks.
77  { return nBl; }
78 
79  //# casacore::Data members.
80  casacore::uInt fileNr; // The file index in the list of BDFs files containing the binary data.
82  casacore::uInt stepBl; // The number of values between two consecutive baselines for the same data description.
83  casacore::uInt iSpw; // The data description index in the sequence of basebands/spectral windows in the BDF.
84  casacore::Int64 row; // The index (0-based) in the casacore::MS Main table of the first of the rows associated to this index.
85  std::vector<double> scaleFactors; //# crossdata scale factor per spw
86  casacore::Int64 fileOffset; // The offset from the beginning of the file to the beginning of the block of data
87  // to be read.
88  casacore::uInt blockOffset; // The offset from the beginning of the block of data read in the BDF
89  // to the first value of the 1st baseline of data with data description of index spw
90  casacore::Short dataType; //# data type: 0=short 1=int32 3=float cross data
91  // 10=auto 11=wvr? 12=zerolags
92 };
93 
94  // Read/write object into AipsIO.
95  // <group>
98 
99  std::ostream& operator<<(std::ostream& os, const AsdmIndex& ix);
100 
101 
102 } //# end namespace
103 
104 #endif
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
std::vector< double > scaleFactors
Definition: AsdmIndex.h:85
casacore::Short dataType
to the first value of the 1st baseline of data with data description of index spw ...
Definition: AsdmIndex.h:90
casacore::uInt dataSize() const
Get nr of complex values in cross-correlation data block.
casacore::AipsIO & operator>>(casacore::AipsIO &, AsdmIndex &)
ostream & operator<<(ostream &os, const PageHeaderCache &cache)
AipsIO is the object persistency mechanism of Casacore.
Definition: AipsIO.h:168
casacore::uInt nSpw
Definition: AsdmIndex.h:81
short Short
Definition: aipstype.h:48
casacore::uInt nBl
Definition: AsdmIndex.h:81
An index entry for the ASDM Storage Manager.
Definition: AsdmIndex.h:70
casacore::Int64 row
Definition: AsdmIndex.h:84
casacore::uInt nPol
Definition: AsdmIndex.h:81
casacore::uInt iSpw
Definition: AsdmIndex.h:83
casacore::uInt nrow() const
Get number of rows spanned by the data blocks.
Definition: AsdmIndex.h:76
casacore::Int64 fileOffset
Definition: AsdmIndex.h:86
casacore::uInt blockOffset
to be read.
Definition: AsdmIndex.h:88
casacore::uInt stepBl
Definition: AsdmIndex.h:82
casacore::uInt fileNr
Definition: AsdmIndex.h:80
unsigned int uInt
Definition: aipstype.h:51
casacore::uInt nChan
Definition: AsdmIndex.h:81
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42