casacore
StArrayFile.h
Go to the documentation of this file.
1 //# StArrayFile.h: Read/write array in external format for a storage manager
2 //# Copyright (C) 1994,1995,1996,1997,1999,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_STARRAYFILE_H
29 #define TABLES_STARRAYFILE_H
30 
31 //# Includes
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/IO/RegularFileIO.h>
34 #include <casacore/casa/IO/TypeIO.h>
35 #include <casacore/casa/BasicSL/String.h>
36 #include <casacore/casa/BasicSL/Complex.h>
37 
38 namespace casacore { //# NAMESPACE CASACORE - BEGIN
39 
40 //# Forward Declarations
41 class MultiFileBase;
42 class IPosition;
43 
44 
45 // <summary>
46 // Read/write array in external format for a storage manager
47 // </summary>
48 
49 // <use visibility=local>
50 
51 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
52 // </reviewed>
53 
54 // <prerequisite>
55 //# Classes you should understand before using this one.
56 // <li> ToLocal
57 // <li> FromLocal
58 // </prerequisite>
59 
60 // <etymology>
61 // StManArrayFile is a class used by table storage managers
62 // to store indirect arrays in a file.
63 // </etymology>
64 
65 // <synopsis>
66 // StManArrayFile is for use by the table storage manager, in particular
67 // to read/write indirectly stored arrays.
68 // Instead of holding the data in memory, they are written directly
69 // into a file. It also allows to access a part of an array, which
70 // is needed for the table system to access an array section.
71 // It does not use a cache of its own, but it is relying on the
72 // underlying system routines to cache and buffer adequately.
73 //
74 // This class could in principle also be used for other array purposes,
75 // for example, to implement a paged array class for really huge arrays.
76 //
77 // An StManArrayFile object is connected to one file. It is possible
78 // to hold multiple arrays in the file, each with its own shape.
79 // An array is stored as its shape followed by the actual data
80 // (all in canonical format). An array of strings is written as
81 // an array of offsets pointing to the actual strings.
82 // When a string gets a new value, the new value is written at the
83 // end of the file and the file space with the old value is lost.
84 //
85 // Currently only the basic types are supported, but arbitrary types
86 // could also be supported by writing/reading an element in the normal
87 // way into the AipsIO buffer. It would only require that AipsIO
88 // would contain a function to get its buffers and to restart them.
89 // </synopsis>
90 
91 // <example>
92 // <srcblock>
93 // void writeArray (const Array<Bool>& array)
94 // {
95 // // Construct object and update file StArray.dat.
96 // StManArrayFile arrayFile("StArray.dat, ByteIO::New);
97 // // Reserve space for an array with the given shape and data type.
98 // // This writes the shape at the end of the file and reserves
99 // // space the hold the entire Bool array.
100 // // It fills in the file offset where the shape is stored
101 // // and returns the length of the shape in the file.
102 // Int64 offset;
103 // uInt shapeLength = arrayFile.putShape (array.shape(), offset, static_cast<Bool*>(0));
104 // // Now put the actual array.
105 // // This has to be put at the returned file offset plus the length
106 // // of the shape in the file.
107 // Bool deleteIt;
108 // const Bool* dataPtr = array.getStorage (deleteIt);
109 // arrayFile.put (offset+shapeLength, 0, array.nelements(), dataPtr);
110 // array.freeStorage (dataPtr, deleteIt);
111 // }
112 // </srcblock>
113 // </example>
114 
115 // <motivation>
116 // The AipsIO class was not suitable for indirect table arrays,
117 // because it uses memory to hold the data. Furthermore it is
118 // not possible to access part of the data in AipsIO.
119 // </motivation>
120 
121 // <todo asof="$DATE:$">
122 // <li> implement long double
123 // <li> support arbitrary types
124 // <li> when rewriting a string value, use the current file
125 // space if it fits
126 // </todo>
127 
128 
130 {
131 public:
132 
133  // Construct the object and attach it to the give file.
134  // The OpenOption determines how the file is opened
135  // (e.g. ByteIO::New for a new file).
136  // The buffersize is used to allocate a buffer of a proper size
137  // for the underlying filebuf object (see iostream package).
138  // A bufferSize 0 means using the default size (currently 65536).
140  uInt version=0, Bool bigEndian=True,
141  uInt bufferSize=0,
142  MultiFileBase* mfile=0);
143 
144  // Close the possibly opened file.
146 
147  // Flush and optionally fsync the data.
148  // It returns True when any data was written since the last flush.
149  Bool flush (Bool fsync);
150 
151  // Reopen the file for read/write access.
152  void reopenRW();
153 
154  // Resync the file (i.e. clear possible cache information).
155  void resync();
156 
157  // Return the current file length (merely a debug tool).
159  { return leng_p; }
160 
161  // Put the array shape and store its file offset into the offset argument.
162  // Reserve file space for the associated array.
163  // The length of the shape part in the file is returned.
164  // The file offset plus the shape length is the starting offset of the
165  // actual array data (which can be used by get and put).
166  // Space is reserved to store the reference count.
167  // <group>
168  uInt putShape (const IPosition& shape, Int64& fileOffset,
169  const Bool* dummy);
170  uInt putShape (const IPosition& shape, Int64& fileOffset,
171  const Char* dummy);
172  uInt putShape (const IPosition& shape, Int64& fileOffset,
173  const uChar* dummy);
174  uInt putShape (const IPosition& shape, Int64& fileOffset,
175  const Short* dummy);
176  uInt putShape (const IPosition& shape, Int64& fileOffset,
177  const uShort* dummy);
178  uInt putShape (const IPosition& shape, Int64& fileOffset,
179  const Int* dummy);
180  uInt putShape (const IPosition& shape, Int64& fileOffset,
181  const uInt* dummy);
182  uInt putShape (const IPosition& shape, Int64& fileOffset,
183  const Int64* dummy);
184  uInt putShape (const IPosition& shape, Int64& fileOffset,
185  const uInt64* dummy);
186  uInt putShape (const IPosition& shape, Int64& fileOffset,
187  const Float* dummy);
188  uInt putShape (const IPosition& shape, Int64& fileOffset,
189  const Double* dummy);
190 //#// uInt putShape (const IPosition& shape, Int64& fileOffset,
191 //#// const long double* dummy);
192  uInt putShape (const IPosition& shape, Int64& fileOffset,
193  const Complex* dummy);
194  uInt putShape (const IPosition& shape, Int64& fileOffset,
195  const DComplex* dummy);
196  uInt putShape (const IPosition& shape, Int64& fileOffset,
197  const String* dummy);
198  // </group>
199 
200  // Get the reference count.
202 
203  // Put the reference count.
204  // An exception is thrown if a value other than 1 is put for version 0.
205  void putRefCount (uInt refCount, Int64 offset);
206 
207  // Put nr elements at the given file offset and array offset.
208  // The file offset of the first array element is the file offset
209  // of the shape plus the length of the shape in the file.
210  // The array offset is counted in number of elements. It can be
211  // used to put only a (contiguous) section of the array.
212  // <group>
213  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Bool*);
214  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Char*);
215  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const uChar*);
216  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Short*);
217  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const uShort*);
218  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Int*);
219  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const uInt*);
220  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Int64*);
221  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const uInt64*);
222  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Float*);
223  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Double*);
224 //#// void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const long double*);
225  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const Complex*);
226  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const DComplex*);
227  void put (Int64 fileOffset, uInt arrayOffset, uInt nr, const String*);
228  // </group>
229 
230  // Get the shape at the given file offset.
231  // It will reshape the IPosition vector when needed.
232  // It returns the length of the shape in the file.
234 
235  // Get nr elements at the given file offset and array offset.
236  // The file offset of the first array element is the file offset
237  // of the shape plus the length of the shape in the file.
238  // The array offset is counted in number of elements. It can be
239  // used to get only a (contiguous) section of the array.
240  // <group>
241  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Bool*);
242  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Char*);
243  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, uChar*);
244  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Short*);
245  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, uShort*);
246  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Int*);
247  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, uInt*);
248  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Int64*);
249  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, uInt64*);
250  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Float*);
251  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Double*);
252 //#// void get (Int64 fileOffset, uInt arrayOffset, uInt nr, long double*);
253  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, Complex*);
254  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, DComplex*);
255  void get (Int64 fileOffset, uInt arrayOffset, uInt nr, String*);
256  // </group>
257 
258  // Copy the array with <src>nr</src> elements from one file offset
259  // to another.
260  // <group>
261  void copyArrayBool (Int64 to, Int64 from, uInt nr);
262  void copyArrayChar (Int64 to, Int64 from, uInt nr);
263  void copyArrayuChar (Int64 to, Int64 from, uInt nr);
264  void copyArrayShort (Int64 to, Int64 from, uInt nr);
265  void copyArrayuShort (Int64 to, Int64 from, uInt nr);
266  void copyArrayInt (Int64 to, Int64 from, uInt nr);
267  void copyArrayuInt (Int64 to, Int64 from, uInt nr);
268  void copyArrayInt64 (Int64 to, Int64 from, uInt nr);
269  void copyArrayuInt64 (Int64 to, Int64 from, uInt nr);
270  void copyArrayFloat (Int64 to, Int64 from, uInt nr);
271  void copyArrayDouble (Int64 to, Int64 from, uInt nr);
272 //#// void copyArrayLDouble (Int64 to, Int64 from, uInt nr);
273  void copyArrayComplex (Int64 to, Int64 from, uInt nr);
274  void copyArrayDComplex (Int64 to, Int64 from, uInt nr);
275  void copyArrayString (Int64 to, Int64 from, uInt nr);
276  // </group>
277 
278 private:
279  ByteIO* file_p; //# File object
280  TypeIO* iofil_p; //# IO object
281  Int64 leng_p; //# File length
282  uInt version_p; //# Version of StArrayFile file
283  Bool swput_p; //# True = put is possible
284  Bool hasPut_p; //# True = put since last flush
295 
296  // Put a single value at the current file offset.
297  // It returns the length of the value in the file.
298  // <group>
299  uInt put (const Int&);
300  uInt put (const uInt&);
301  // </group>
302 
303  // Put the array shape at the end of the file and reserve
304  // space for nr elements (each lenElem bytes long).
305  // It fills the file offset of the shape.
306  // It returns the length of the shape in the file.
307  uInt putRes (const IPosition& shape, Int64& fileOffset, float lenElem);
308 
309  // Get a single value at the current file offset.
310  // It returns the length of the value in the file.
311  // <group>
312  uInt get (Int&);
313  uInt get (uInt&);
314  // </group>
315 
316  // Copy data with the given length from one file offset to another.
317  void copyData (Int64 to, Int64 from, uInt length);
318 
319  // Position the file on the given offset.
320  void setpos (Int64 offset);
321 };
322 
323 
325 {
326  file_p->reopenRW();
327 }
329 {
330  hasPut_p = True;
331  return iofil_p->write (1, &value);
332 }
334 {
335  hasPut_p = True;
336  return iofil_p->write (1, &value);
337 }
339 {
340  return iofil_p->read (1, &value);
341 }
343 {
344  return iofil_p->read (1, &value);
345 }
346 
347 
348 
349 } //# NAMESPACE CASACORE - END
350 
351 #endif
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Char *dummy)
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Double *dummy)
casacore::StManArrayFile::StManArrayFile
StManArrayFile(const String &name, ByteIO::OpenOption, uInt version=0, Bool bigEndian=True, uInt bufferSize=0, MultiFileBase *mfile=0)
Construct the object and attach it to the give file.
casacore::StManArrayFile::copyArrayShort
void copyArrayShort(Int64 to, Int64 from, uInt nr)
casacore::IPosition
A Vector of integers, for indexing into Array<T> objects.
Definition: IPosition.h:120
casacore::StManArrayFile::copyArrayInt
void copyArrayInt(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Float *)
casacore::StManArrayFile::hasPut_p
Bool hasPut_p
Definition: StArrayFile.h:284
casacore::ByteIO::OpenOption
OpenOption
Define the possible ByteIO open options.
Definition: ByteIO.h:65
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, uChar *)
casacore::StManArrayFile::reopenRW
void reopenRW()
Reopen the file for read/write access.
Definition: StArrayFile.h:324
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Float *dummy)
Complexfwd_global_functions_Complexfwd::casacore::DComplex
std::complex< Double > DComplex
Definition: Complexfwd.h:50
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const uInt64 *)
casacore::StManArrayFile::resync
void resync()
Resync the file (i.e.
casacore::StManArrayFile::copyArrayuInt
void copyArrayuInt(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Int64 *)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, uInt64 *)
casacore::StManArrayFile::sizeFloat_p
uInt sizeFloat_p
Definition: StArrayFile.h:293
casacore::uChar
unsigned char uChar
Definition: aipstype.h:47
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const String *)
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Complex *)
casacore::StManArrayFile::copyArrayDouble
void copyArrayDouble(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::copyArrayFloat
void copyArrayFloat(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Complex *dummy)
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Int *)
casacore::StManArrayFile::sizeuShort_p
uInt sizeuShort_p
Definition: StArrayFile.h:288
casacore::StManArrayFile::sizeuChar_p
uInt sizeuChar_p
Definition: StArrayFile.h:286
casacore::StManArrayFile::copyArrayuChar
void copyArrayuChar(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::leng_p
Int64 leng_p
Definition: StArrayFile.h:281
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Char *)
casacore::StManArrayFile::copyArrayDComplex
void copyArrayDComplex(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::~StManArrayFile
~StManArrayFile()
Close the possibly opened file.
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const uInt *dummy)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, DComplex *)
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const uChar *dummy)
casacore::StManArrayFile::copyData
void copyData(Int64 to, Int64 from, uInt length)
Copy data with the given length from one file offset to another.
casacore::Float
float Float
Definition: aipstype.h:54
casacore::TypeIO::read
virtual size_t read(size_t nvalues, Bool *value)
Read the values from the ByteIO object and convert them.
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Short *)
casacore::value
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
casacore::uShort
unsigned short uShort
Definition: aipstype.h:49
casacore::Double
double Double
Definition: aipstype.h:55
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Char *)
casacore::StManArrayFile
Read/write array in external format for a storage manager.
Definition: StArrayFile.h:130
casacore::StManArrayFile::sizeInt64_p
uInt sizeInt64_p
Definition: StArrayFile.h:291
casacore::TypeIO::write
virtual size_t write(size_t nvalues, const Bool *value)
Convert the values and write them to the ByteIO object.
casacore::uInt
unsigned int uInt
Definition: aipstype.h:51
casacore::MultiFileBase
Abstract base class to combine multiple files in a single one.
Definition: MultiFileBase.h:165
casacore::shape
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
Definition: ExprNode.h:1944
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const uShort *dummy)
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const uInt64 *dummy)
casacore::StManArrayFile::copyArrayComplex
void copyArrayComplex(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Double *)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Bool *)
Get nr elements at the given file offset and array offset.
casacore::StManArrayFile::copyArrayInt64
void copyArrayInt64(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Short *)
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Int *dummy)
casacore::StManArrayFile::sizeuInt_p
uInt sizeuInt_p
Definition: StArrayFile.h:290
casacore::StManArrayFile::putRefCount
void putRefCount(uInt refCount, Int64 offset)
Put the reference count.
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Short *dummy)
casacore::StManArrayFile::sizeInt_p
uInt sizeInt_p
Definition: StArrayFile.h:289
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, String *)
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const String *dummy)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Float *)
casacore::TypeIO
Abstract base class for IO of data in a type-dependent format.
Definition: TypeIO.h:80
casacore::StManArrayFile::setpos
void setpos(Int64 offset)
Position the file on the given offset.
casacore::StManArrayFile::sizeuInt64_p
uInt sizeuInt64_p
Definition: StArrayFile.h:292
casacore::True
const Bool True
Definition: aipstype.h:43
casacore::StManArrayFile::getShape
uInt getShape(Int64 fileOffset, IPosition &shape)
Get the shape at the given file offset.
casacore::StManArrayFile::copyArrayBool
void copyArrayBool(Int64 to, Int64 from, uInt nr)
Copy the array with nr elements from one file offset to another.
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Complex *)
casacore::ByteIO::reopenRW
virtual void reopenRW()
Reopen the underlying IO stream for read/write access.
casacore::StManArrayFile::file_p
ByteIO * file_p
Definition: StArrayFile.h:279
casacore::StManArrayFile::copyArrayString
void copyArrayString(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::iofil_p
TypeIO * iofil_p
Definition: StArrayFile.h:280
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Int *)
casacore::Int64
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Int64 *)
casacore::StManArrayFile::copyArrayChar
void copyArrayChar(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const uChar *)
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const Bool *)
Put nr elements at the given file offset and array offset.
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Complexfwd_global_functions_Complexfwd::casacore::Complex
std::complex< Float > Complex
Definition: Complexfwd.h:49
casacore::StManArrayFile::sizeShort_p
uInt sizeShort_p
Definition: StArrayFile.h:287
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const DComplex *)
casacore::StManArrayFile::swput_p
Bool swput_p
Definition: StArrayFile.h:283
casacore::StManArrayFile::copyArrayuInt64
void copyArrayuInt64(Int64 to, Int64 from, uInt nr)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, uInt *)
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Bool *dummy)
Put the array shape and store its file offset into the offset argument.
casacore::Short
short Short
Definition: aipstype.h:48
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const uShort *)
casacore::StManArrayFile::version_p
uInt version_p
Definition: StArrayFile.h:282
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const DComplex *dummy)
casacore::ByteIO
Abstract base class for IO on a byte stream.
Definition: ByteIO.h:62
casacore::StManArrayFile::getRefCount
uInt getRefCount(Int64 offset)
Get the reference count.
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, Double *)
casacore::StManArrayFile::get
void get(Int64 fileOffset, uInt arrayOffset, uInt nr, uShort *)
casacore::StManArrayFile::putRes
uInt putRes(const IPosition &shape, Int64 &fileOffset, float lenElem)
Put the array shape at the end of the file and reserve space for nr elements (each lenElem bytes long...
casacore::StManArrayFile::put
void put(Int64 fileOffset, uInt arrayOffset, uInt nr, const uInt *)
casacore::StManArrayFile::flush
Bool flush(Bool fsync)
Flush and optionally fsync the data.
casacore::Char
char Char
Definition: aipstype.h:46
casacore::StManArrayFile::putShape
uInt putShape(const IPosition &shape, Int64 &fileOffset, const Int64 *dummy)
casacore::StManArrayFile::sizeDouble_p
uInt sizeDouble_p
Definition: StArrayFile.h:294
casacore::StManArrayFile::sizeChar_p
uInt sizeChar_p
Definition: StArrayFile.h:285
casacore::StManArrayFile::length
Int64 length()
Return the current file length (merely a debug tool).
Definition: StArrayFile.h:158
casacore::uInt64
unsigned long long uInt64
Definition: aipsxtype.h:39
casacore::StManArrayFile::copyArrayuShort
void copyArrayuShort(Int64 to, Int64 from, uInt nr)