casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TiledFileHelper.h
Go to the documentation of this file.
1 //# TiledFileHelper.h: Helper class for tiled access to an array in a file
2 //# Copyright (C) 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 //# $Id$
27 
28 #ifndef TABLES_TILEDFILEHELPER_H
29 #define TABLES_TILEDFILEHELPER_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
36 
37 
38 namespace casacore { //# NAMESPACE CASACORE - BEGIN
39 
40 // <summary>
41 // Helper class for tiled access to an array in a file.
42 // </summary>
43 
44 // <use visibility=local>
45 
46 // <reviewed reviewer="" date="" tests="tTiledFileAccess.cc">
47 // </reviewed>
48 
49 // <prerequisite>
50 //# Classes you should understand before using this one.
51 // <li> Description of Tiled Storage Manager in module file
52 // <linkto module=Tables:TiledStMan>Tables.h</linkto>
53 // </prerequisite>
54 
55 // <synopsis>
56 // TiledFileHelper is a helper class for class
57 // <linkto class=TiledFileAccess>TiledFileAccess</linkto>.
58 // It sets up a table description containing one array column
59 // to make it possible to use the
60 // <linkto class=TiledStMan>tiled storage manager</linkto>
61 // to access an array in an arbitrary file.
62 // </synopsis>
63 
64 // <motivation>
65 // This class was created to be able to read an image in a FITS file.
66 // </motivation>
67 
68 //# <todo asof="$DATE:$">
69 //# A List of bugs, limitations, extensions or planned refinements.
70 //# </todo>
71 
72 
74 {
75 public:
76  // Create a TiledFileHelper object.
77  // Tell if the data is stored in big or little endian canonical format.
79  DataType dtype, const TSMOption&,
80  Bool writable, Bool bigEndian);
81 
83 
84  virtual const TableDesc& getDesc() const;
85 
87  { return fileSet_p[0]; }
88 
89  // Return the class name.
90  virtual String dataManagerType() const;
91 
92  // These functions are pure virtual, but not needed here.
93  // They throw an exception.
94  // <group>
95  virtual DataManager* clone() const;
96  virtual Bool flush (AipsIO&, Bool);
97  virtual void create64 (rownr_t);
98  virtual TSMCube* getHypercube (rownr_t);
100  virtual void readHeader (rownr_t, Bool);
101  // </group>
102 
103 private:
104  // Forbid copy constructor and assignment.
105  // <group>
108  // </group>
109 
110 
112 };
113 
114 
115 
116 } //# NAMESPACE CASACORE - END
117 
118 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:118
Tiled hypercube in a table.
Definition: TSMCube.h:105
AipsIO is the object persistency mechanism of Casacore.
Definition: AipsIO.h:168
TiledFileHelper & operator=(const TiledFileHelper &)
Helper class for tiled access to an array in a file.
String fileName() const
Compose a unique filename from the table name and sequence number.
Base class for Tiled Storage Manager classes.
Definition: TiledStMan.h:106
virtual TSMCube * getHypercube(rownr_t)
virtual void create64(rownr_t)
Let the data manager initialize itself for a new table.
PtrBlock< TSMFile * > fileSet_p
The assembly of all TSMFile objects.
Definition: TiledStMan.h:507
virtual void readHeader(rownr_t, Bool)
Let a derived class read the header info.
Options for the Tiled Storage Manager Access.
Definition: TSMOption.h:116
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual const TableDesc & getDesc() const
Get the table description needed for the hypercolumn description.
File object for Tiled Storage Manager.
Definition: TSMFile.h:81
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1987
virtual DataManager * clone() const
These functions are pure virtual, but not needed here.
uInt64 rownr_t
Define the type of a row number in a table.
Definition: aipsxtype.h:46
virtual Bool flush(AipsIO &, Bool)
Flush and optionally fsync the data.
Abstract base class for a data manager.
Definition: DataManager.h:220
String: the storage and methods of handling collections of characters.
Definition: String.h:225
Define the structure of a Casacore table.
Definition: TableDesc.h:190
TiledFileHelper(const String &fileName, const IPosition &shape, DataType dtype, const TSMOption &, Bool writable, Bool bigEndian)
Create a TiledFileHelper object.
virtual String dataManagerType() const
Return the class name.