Changeset 4025 in Sophya for trunk/SophyaExt/FitsIOServer/fabtcolread.h
- Timestamp:
- Oct 3, 2011, 6:32:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fabtcolread.h
r4023 r4025 85 85 double Read(LONGLONG n,long nfirstel,bool usebuffer=true); 86 86 inline double Read(LONGLONG n,bool usebuffer=true) {return Read(n,0,usebuffer);} 87 complex<r_8> ReadComplex(LONGLONG n,long nfirstel=0); 88 char* ReadInStr(LONGLONG n,long nfirstel=0); 87 89 88 90 LONGLONG Read(LONGLONG n1,LONGLONG n2,TVector<uint_2>& data); … … 161 163 162 164 string ColLabel,ColTUnit,ColTForm; 163 int ColNum,ColTypeCode, NBcol;165 int ColNum,ColTypeCode,ColDispWidth,NBcol; 164 166 long ColRepeat; 165 167 LONGLONG NBline; 168 char *StrBuff; 166 169 167 170 double NulVal; … … 195 198 196 199 /////////////////////////////////////////////////////////////////// 197 //! Class for reading ALL the columns in a FITS ASCII or BINARY table 200 //! Class for reading ALL the columns in a FITS ASCII or BINARY table (no bufferisation) 198 201 class FitsABTColRd1F : public AnyDataObj { 199 202 public: 200 FitsABTColRd1F(FitsOpenFile* fof,int ihdu=0 201 ,long blen=100,long bsens=1,int lp=0); 203 FitsABTColRd1F(FitsOpenFile* fof,int ihdu=0,int lp=0); 202 204 virtual ~FitsABTColRd1F(); 203 204 void ChangeBuffer(long blen=100,long bsens=1);205 205 206 206 double ReadKey(const char *keyname); … … 209 209 string ReadKeyS(const char *keyname); 210 210 211 double Read(int ColNum,LONGLONG n,long nfirstel,bool usebuffer=true); 212 inline double Read(int ColNum,LONGLONG n,bool usebuffer=true) {return Read(ColNum,n,0,usebuffer);} 211 double Read(int ColNum,LONGLONG n,long nfirstel); 212 inline double Read(int ColNum,LONGLONG n) {return Read(ColNum,n,0);} 213 complex<r_8> ReadComplex(int ColNum,LONGLONG n,long nfirstel=0); 214 char* ReadInStr(int ColNum,LONGLONG n,long nfirstel=0); 213 215 int GetColNum(const char *colname); 214 216 … … 252 254 inline long GetColRepeat(int ColNum) const 253 255 {if(ColNum<0 || ColNum>=NBcol) return -999; else return ColRepeat[ColNum];} 254 //! Get the read requested buffer length255 inline long GetBLen(void) const {return BuffLen;}256 //! Get the read buffer direction257 inline long GetBSens(void) const {return BuffSens;}258 256 //! Print to os 259 257 virtual void Print(ostream& os,int lp=1) const; … … 261 259 inline void Print(int lp=1) const {Print(cout,lp);} 262 260 //! Get the read effective buffer length 263 inline long GetNBuffer(void) const {return NBuffer;}264 //! Get the read bufferpointer265 inline double* GetBuffer(int ColNum)266 {if(ColNum<0 || ColNum>=NBcol) return NULL; else return Buffer[ColNum];}267 261 268 262 protected: 269 void Init(FitsOpenFile* fof,int ihdu, long blen,long bsens,int lp);263 void Init(FitsOpenFile* fof,int ihdu,int lp); 270 264 void Delete(void); 271 265 272 266 vector<string> ColLabel,ColTUnit,ColTForm; 273 vector<int> ColTypeCode ;267 vector<int> ColTypeCode, ColDispWidth; 274 268 vector<long> ColRepeat; 275 269 int NBcol; 276 270 LONGLONG NBline; 271 vector<char*> StrBuff; 277 272 278 273 double NulVal; 279 274 unsigned short DbgLevel; 280 long BuffLen, BuffSens;281 275 282 276 FitsOpenFile* FitsOF; 283 vector<LONGLONG> LineDeb, LineFin;284 double **Buffer;285 long NBuffer;286 277 }; 287 278 … … 291 282 class FitsABTColRead1F : public FitsABTColRd1F { 292 283 public: 293 FitsABTColRead1F(string fname,int ihdu=0 294 ,long blen=100,long bsens=1,int lp=0); 295 FitsABTColRead1F(const char *cfname,int ihdu=0 296 ,long blen=100,long bsens=1,int lp=0); 284 FitsABTColRead1F(string fname,int ihdu=0,int lp=0); 285 FitsABTColRead1F(const char *cfname,int ihdu=0,int lp=0); 297 286 virtual ~FitsABTColRead1F(); 298 287 };
Note:
See TracChangeset
for help on using the changeset viewer.