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// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/DataMan/TiledStMan.h>
32#include <casacore/tables/Tables/TableDesc.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// <summary>
37// Helper class for tiled access to an array in a file.
38// </summary>
39
40// <use visibility=local>
41
42// <reviewed reviewer="" date="" tests="tTiledFileAccess.cc">
43// </reviewed>
44
45// <prerequisite>
46// # Classes you should understand before using this one.
47// <li> Description of Tiled Storage Manager in module file
48// <linkto module=Tables:TiledStMan>Tables.h</linkto>
49// </prerequisite>
50
51// <synopsis>
52// TiledFileHelper is a helper class for class
53// <linkto class=TiledFileAccess>TiledFileAccess</linkto>.
54// It sets up a table description containing one array column
55// to make it possible to use the
56// <linkto class=TiledStMan>tiled storage manager</linkto>
57// to access an array in an arbitrary file.
58// </synopsis>
59
60// <motivation>
61// This class was created to be able to read an image in a FITS file.
62// </motivation>
63
64// # <todo asof="$DATE:$">
65// # A List of bugs, limitations, extensions or planned refinements.
66// # </todo>
67
69 public:
70 // Create a TiledFileHelper object.
71 // Tell if the data is stored in big or little endian canonical format.
72 TiledFileHelper(const String& fileName, const IPosition& shape, DataType dtype, const TSMOption&,
73 Bool writable, Bool bigEndian);
74
76
77 // Forbid copy constructor.
79
80 // Forbid assignment.
82
83 virtual const TableDesc& getDesc() const;
84
85 TSMFile* file() { return fileSet_p[0]; }
86
87 // Return the class name.
88 virtual String dataManagerType() const;
89
90 // These functions are pure virtual, but not needed here.
91 // They throw an exception.
92 // <group>
93 virtual DataManager* clone() const;
94 virtual Bool flush(AipsIO&, Bool);
95 virtual void create64(rownr_t);
98 virtual void readHeader(rownr_t, Bool);
99 // </group>
100
101 private:
103};
104
105} // namespace casacore
106
107#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:355
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.
TiledStMan()
Create a TiledStMan.
Block< TSMFile * > fileSet_p
The assembly of all TSMFile objects.
Definition TiledStMan.h:482
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
IPosition shape(const RecordFieldId &) const
Get the actual shape of this field.
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