-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHDFSPArray_RealField.h
More file actions
74 lines (63 loc) · 2.3 KB
/
HDFSPArray_RealField.h
File metadata and controls
74 lines (63 loc) · 2.3 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
/////////////////////////////////////////////////////////////////////////////
// This file is part of the hdf4 data handler for the OPeNDAP data server.
// It retrieves the real field values for some special NASA HDF data.
// Authors: MuQun Yang <myang6@hdfgroup.org>
// Copyright (c) 2010-2012 The HDF Group
/////////////////////////////////////////////////////////////////////////////
#ifndef HDFSPARRAY_REALFIELD_H
#define HDFSPARRAY_REALFIELD_H
#include "mfhdf.h"
#include "hdf.h"
#include <libdap/Array.h>
#include "HDFSPEnumType.h"
#include "BESH4MCache.h"
class HDFSPArray_RealField:public libdap::Array
{
public:
HDFSPArray_RealField (int32 rank, const std::string& filename, const int sdfd, int32 fieldref, int32 dtype, SPType & sptype, const std::string & fieldname, const std::vector<int32> & h4_dimsizes, const std::string & n = "", libdap::BaseType * v = 0):
Array (n, v),
rank (rank),
filename(filename),
sdfd (sdfd),
fieldref (fieldref),
dtype (dtype),
sptype (sptype),
fieldname (fieldname),
dimsizes(h4_dimsizes) {
}
virtual ~ HDFSPArray_RealField ()
{
}
int format_constraint (int *cor, int *step, int *edg);
libdap::BaseType *ptr_duplicate ()
{
return new HDFSPArray_RealField (*this);
}
virtual bool read ();
private:
int32 rank;
string filename;
int32 sdfd;
int32 fieldref;
int32 dtype;
SPType sptype;
std::string fieldname;
std::vector<int32>dimsizes;
//void write_data_to_cache(int32,const std::string&,short);
void write_data_to_cache(int32,const std::string&,short,const std::vector<char>&, int);
bool obtain_cached_data(BESH4Cache*,const std::string&, int,std::vector<int>&, std::vector<int>&,size_t,short);
template<typename T> int subset(const T input[],int,std::vector<int32>&,std::vector<int>&,std::vector<int>&,std::vector<int>&,std::vector<T>*,std::vector<int32>&,int);
#if 0
int subset(
const T input[],
int rank,
vector<int> & dim,
vector<int> & start,
vector<int> & stride,
vector<int> & edge,
std::vector<T> *poutput,
vector<int>& pos,
int index);
#endif
};
#endif