Changeset 2812 for trunk/external-alma/atnf/PKSIO/NROFITSDataset.h
- Timestamp:
- 04/15/13 12:12:26 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/atnf/PKSIO/NROFITSDataset.h
r2784 r2812 39 39 40 40 #include <string> 41 #include <map> 41 42 42 43 using namespace std ; … … 97 98 98 99 protected: 100 // stracture representing property of fields 101 struct FieldProperty { 102 //string name; // field name 103 int size; // data size [byte] 104 //string unit; // unit of the field 105 long offset; // offset from the head of scan record [byte] 106 }; 107 99 108 // fill header information 100 109 int fillHeader( int sameEndian ) ; 101 110 102 111 // Read char data 103 int readHeader( string &v, c har *name ) ;104 int readTable( char *v, c har *name, int clen, int idx=0 ) ;105 int readTable( vector<char *> &v, c har *name, int idx=0 ) ;106 int readColumn( vector<string> &v, c har *name, int idx=0 ) ;112 int readHeader( string &v, const char *name ) ; 113 int readTable( char *v, const char *name, int clen, int idx=0 ) ; 114 int readTable( vector<char *> &v, const char *name, int idx=0 ) ; 115 int readColumn( vector<string> &v, const char *name, int idx=0 ) ; 107 116 108 117 // Read int data 109 int readHeader( int &v, c har *name) ;110 int readTable( int &v, c har *name, int b, int idx=0 ) ;111 int readTable( vector<int> &v, c har *name, int b, int idx=0 ) ;112 int readColumn( vector<int> &v, c har *name, int b, int idx=0 ) ;118 int readHeader( int &v, const char *name) ; 119 int readTable( int &v, const char *name, int b, int idx=0 ) ; 120 int readTable( vector<int> &v, const char *name, int b, int idx=0 ) ; 121 int readColumn( vector<int> &v, const char *name, int b, int idx=0 ) ; 113 122 114 123 // Read float data 115 int readHeader( float &v, c har *name) ;116 int readTable( float &v, c har *name, int b, int idx=0 ) ;117 int readTable( vector<float> &v, c har *name, int b, int idx=0 ) ;118 int readColumn( vector<float> &v, c har *name, int b, int idx=0 ) ;124 int readHeader( float &v, const char *name) ; 125 int readTable( float &v, const char *name, int b, int idx=0 ) ; 126 int readTable( vector<float> &v, const char *name, int b, int idx=0 ) ; 127 int readColumn( vector<float> &v, const char *name, int b, int idx=0 ) ; 119 128 120 129 // Read double data 121 int readHeader( double &v, c har *name) ;122 int readTable( double &v, c har *name, int b, int idx=0 ) ;123 int readTable( vector<double> &v, c har *name, int b, int idx=0 ) ;124 int readColumn( vector<double> &v, c har *name, int b, int idx=0 ) ;130 int readHeader( double &v, const char *name) ; 131 int readTable( double &v, const char *name, int b, int idx=0 ) ; 132 int readTable( vector<double> &v, const char *name, int b, int idx=0 ) ; 133 int readColumn( vector<double> &v, const char *name, int b, int idx=0 ) ; 125 134 126 135 // read ARRY … … 143 152 144 153 // get offset bytes for attributes 145 long getOffset( c har *name ) ;154 long getOffset( const char *name ) ; 146 155 147 156 // move pointer to target position 148 int movePointer( char *name, int idx=0 ) ; 149 150 // convert frequency frame 151 // virtual double toLSR( double v, double t, double x, double y ) ; 157 int movePointer( const char *name, int idx=0 ) ; 152 158 153 159 // number of column for scan header … … 163 169 vector<int> arrayid_ ; 164 170 165 // field names 166 vector<string> names_ ; 167 168 // field units 169 vector<string> units_ ; 170 171 // sizes of each field 172 vector<int> sizes_ ; 173 174 // offsets from the beginning of the file 175 vector<long> offsets_ ; 171 // field properties 172 // Key = field name 173 // Value = field properties 174 map<string, FieldProperty> properties_ ; 176 175 177 176 // spectral data
Note: See TracChangeset
for help on using the changeset viewer.