casacore
Loading...
Searching...
No Matches
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: 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 TABLES_TILEDFILEHELPER_H
27#define TABLES_TILEDFILEHELPER_H
28
29
30//# Includes
31#include <casacore/casa/aips.h>
32#include <casacore/tables/DataMan/TiledStMan.h>
33#include <casacore/tables/Tables/TableDesc.h>
34
35
36namespace casacore { //# NAMESPACE CASACORE - BEGIN
37
38// <summary>
39// Helper class for tiled access to an array in a file.
40// </summary>
41
42// <use visibility=local>
43
44// <reviewed reviewer="" date="" tests="tTiledFileAccess.cc">
45// </reviewed>
46
47// <prerequisite>
48//# Classes you should understand before using this one.
49// <li> Description of Tiled Storage Manager in module file
50// <linkto module=Tables:TiledStMan>Tables.h</linkto>
51// </prerequisite>
52
53// <synopsis>
54// TiledFileHelper is a helper class for class
55// <linkto class=TiledFileAccess>TiledFileAccess</linkto>.
56// It sets up a table description containing one array column
57// to make it possible to use the
58// <linkto class=TiledStMan>tiled storage manager</linkto>
59// to access an array in an arbitrary file.
60// </synopsis>
61
62// <motivation>
63// This class was created to be able to read an image in a FITS file.
64// </motivation>
65
66//# <todo asof="$DATE:$">
67//# A List of bugs, limitations, extensions or planned refinements.
68//# </todo>
69
70
72{
73public:
74 // Create a TiledFileHelper object.
75 // Tell if the data is stored in big or little endian canonical format.
77 DataType dtype, const TSMOption&,
78 Bool writable, Bool bigEndian);
79
81
82 // Forbid copy constructor.
84
85 // Forbid assignment.
87
88 virtual const TableDesc& getDesc() const;
89
91 { return fileSet_p[0]; }
92
93 // Return the class name.
94 virtual String dataManagerType() const;
95
96 // These functions are pure virtual, but not needed here.
97 // They throw an exception.
98 // <group>
99 virtual DataManager* clone() const;
100 virtual Bool flush (AipsIO&, Bool);
101 virtual void create64 (rownr_t);
104 virtual void readHeader (rownr_t, Bool);
105 // </group>
106
107private:
109};
110
111
112
113} //# NAMESPACE CASACORE - END
114
115#endif
Abstract base class for a data manager.
String fileName() const
Compose a unique filename from the table name and sequence number.
String: the storage and methods of handling collections of characters.
Definition String.h:223
virtual DataManager * clone() const
These functions are pure virtual, but not needed here.
TiledFileHelper(const String &fileName, const IPosition &shape, DataType dtype, const TSMOption &, Bool writable, Bool bigEndian)
Create a TiledFileHelper object.
virtual const TableDesc & getDesc() const
Get the table description needed for the hypercolumn description.
virtual TSMCube * getHypercube(rownr_t, IPosition &)
Get the hypercube in which the given row is stored.
virtual Bool flush(AipsIO &, Bool)
Flush and optionally fsync the data.
virtual TSMCube * getHypercube(rownr_t)
TiledFileHelper & operator=(const TiledFileHelper &)=delete
Forbid assignment.
virtual void readHeader(rownr_t, Bool)
Let a derived class read the header info.
TiledFileHelper(const TiledFileHelper &)=delete
Forbid copy constructor.
virtual void create64(rownr_t)
Let the data manager initialize itself for a new table.
virtual String dataManagerType() const
Return the class name.
PtrBlock< TSMFile * > fileSet_p
The assembly of all TSMFile objects.
Definition TiledStMan.h:511
this file contains all the compiler specific defines
Definition mainpage.dox:28
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
Definition ExprNode.h:1991
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
uInt64 rownr_t
Define the type of a row number in a table.
Definition aipsxtype.h:44