Repository navigation
Expand file tree
/
Copy pathAdiosStManColumn.h
More file actions
109 lines (85 loc) · 3.68 KB
/
Copy pathAdiosStManColumn.h
File metadata and controls
109 lines (85 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// (c) University of Western Australia
// International Centre of Radio Astronomy Research
// M468, 35 Stirling Hwy
// Crawley, Perth WA 6009
// Australia
//
// Shanghai Astronomical Observatory, Chinese Academy of Sciences
// 80 Nandan Road, Shanghai 200030, China
//
// This library is free software: you can redistribute it and/or
// modify it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this library. If not, see <http://www.gnu.org/licenses/>.
//
// Any bugs, questions, concerns and/or suggestions please email to
// lbq@shao.ac.cn, jason.wang@icrar.org
#ifndef ADIOSSTMANCOLUMN_H
#define ADIOSSTMANCOLUMN_H
#include "AdiosStMan.h"
#ifdef CASACORE_VERSION_1
#include <tables/Tables/StManColumn.h>
#include <casa/Arrays/Array.h>
#endif
#ifdef CASACORE_VERSION_2
#include <casacore/tables/DataMan/StManColumn.h>
#include <casacore/casa/Arrays/Array.h>
#endif
namespace casacore {
class AdiosStManColumn : public StManColumn
{
public:
AdiosStManColumn (AdiosStMan* aParent, int aDataType, uInt aColNr);
~AdiosStManColumn ();
IPosition getShapeColumn();
int getDataTypeSize();
int getDataType();
void setColumnName(String aName);
String getColumnName();
virtual void initAdiosRead() = 0;
virtual void initAdiosWrite(uInt aNrRows) = 0;
// *** access a row for an array column ***
virtual void putArrayV (uInt rownr, const void* dataPtr);
virtual void getArrayV (uInt rownr, void* dataPtr);
// *** access a slice of a row for an array column ***
// *** inactive by default
// *** only active when canAccessSlice() returns true in child class
virtual void getSliceV (uInt aRowNr, const Slicer& ns, void* dataPtr);
// *** access all rows for an array column ***
// *** inactive by default
// *** only active when canAccessArrayColumn() returns true in child class
virtual void getArrayColumnV(void* dataPtr);
// *** access a slice of all rows for an array column ***
// *** inactive by default
// *** only active when canAccessColumnSlice() returns true in child class
virtual void getColumnSliceV(const Slicer& ns, void *dataPtr);
virtual void flush() = 0;
protected:
void getArrayWrapper(uint64_t rowStart, uint64_t nrRows, const Slicer& ns, void* dataPtr);
virtual void getArrayMetaV (uint64_t rowStart, uint64_t nrRows, const Slicer& ns, void* data);
virtual void putArrayMetaV (uint64_t row, const void* data);
// StMan pointer
AdiosStMan *itsStManPtr;
// Column property
String itsColumnName;
char itsColumnType; // 's' for scalar, 'd' for direct array, 'i' for indirect array
IPosition itsShape;
int itsDataTypeSize;
int itsCasaDataType;
ADIOS_DATATYPES itsAdiosDataType;
// ADIOS read
uint64_t readStart[10];
uint64_t readCount[10];
// ADIOS write
int64_t *itsAdiosWriteIDs;
};
}
#endif