Changeset 4029 in Sophya for trunk/SophyaExt/FitsIOServer/fabtcolread.h
- Timestamp:
- Oct 22, 2011, 1:15:49 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/FitsIOServer/fabtcolread.h
r4025 r4029 68 68 class FitsABTColRd : public AnyDataObj { 69 69 public: 70 FitsABTColRd(FitsOpenFile* fof,string collabel,int ihdu=0 71 ,long blen=100,long bsens=1,int lp=0); 72 FitsABTColRd(FitsOpenFile* fof,int colnum,int ihdu=0 73 ,long blen=100,long bsens=1,int lp=0); 70 FitsABTColRd(FitsOpenFile* fof,string collabel,int ihdu=0,int lp=0); 71 FitsABTColRd(FitsOpenFile* fof,int colnum,int ihdu=0,int lp=0); 74 72 FitsABTColRd(FitsABTColRd& fbt); 75 73 FitsABTColRd(); 76 74 virtual ~FitsABTColRd(); 77 78 void ChangeBuffer(long blen=100,long bsens=1);79 75 80 76 double ReadKey(const char *keyname); … … 83 79 string ReadKeyS(const char *keyname); 84 80 85 double Read(LONGLONG n,long nfirstel ,bool usebuffer=true);86 in line double Read(LONGLONG n,bool usebuffer=true) {return Read(n,0,usebuffer);}81 double Read(LONGLONG n,long nfirstel=0); 82 int_8 ReadLL(LONGLONG n,long nfirstel=0); 87 83 complex<r_8> ReadComplex(LONGLONG n,long nfirstel=0); 88 84 char* ReadInStr(LONGLONG n,long nfirstel=0); … … 95 91 96 92 //! return the value of the first row 97 double ReadFirstRow(long nfirstel ,bool usebuffer=false) {return Read(0,nfirstel,usebuffer);}98 double ReadFirstRow( bool usebuffer=false) {return Read(0,usebuffer);}93 double ReadFirstRow(long nfirstel) {return Read(0,nfirstel);} 94 double ReadFirstRow(void) {return Read(0);} 99 95 //! return the value of the last row 100 double ReadLastRow(long nfirstel ,bool usebuffer=false) {return Read(NBline-1,nfirstel,usebuffer);}101 double ReadLastRow( bool usebuffer=false) {return Read(NBline-1,usebuffer);}96 double ReadLastRow(long nfirstel) {return Read(NBline-1,nfirstel);} 97 double ReadLastRow(void) {return Read(NBline-1);} 102 98 103 99 LONGLONG FirstRow(long nfirstel,double val1,double val2,LONGLONG rowstart=-1); … … 144 140 //! Get the columns fits repeat that is read 145 141 inline long GetColRepeat(void) const {return ColRepeat;} 146 //! Get the read requested buffer length147 inline long GetBLen(void) const {return BuffLen;}148 //! Get the read buffer direction149 inline long GetBSens(void) const {return BuffSens;}150 142 //! Print to os 151 143 virtual void Print(ostream& os,int lp=1) const; 152 144 //! Print to stdout 153 145 inline void Print(int lp=1) const {Print(cout,lp);} 154 //! Get the read effective buffer length155 inline long GetNBuffer(void) const {return NBuffer;}156 //! Get the read bufferpointer157 inline double* GetBuffer(void) {return Buffer;}158 146 159 147 protected: 160 void Init(FitsOpenFile* fof,const char *collabel,int colnum 161 ,int ihdu,long blen,long bsens,int lp); 148 void Init(FitsOpenFile* fof,const char *collabel,int colnum,int ihdu,int lp); 162 149 void Delete(void); 163 150 … … 170 157 double NulVal; 171 158 unsigned short DbgLevel; 172 long BuffLen, BuffSens;173 159 174 160 LONGLONG NFitsRead; 175 161 FitsOpenFile* FitsOF; 176 LONGLONG LineDeb, LineFin;177 double *Buffer;178 long NBuffer;179 162 }; 180 163 … … 183 166 class FitsABTColRead : public FitsABTColRd { 184 167 public: 185 FitsABTColRead(string fname,string collabel,int ihdu=0 186 ,long blen=100,long bsens=1,int lp=0); 187 FitsABTColRead(string fname,int colnum,int ihdu=0 188 ,long blen=100,long bsens=1,int lp=0); 189 FitsABTColRead(const char *cfname,const char *collabel,int ihdu=0 190 ,long blen=100,long bsens=1,int lp=0); 191 FitsABTColRead(const char *cfname,int colnum,int ihdu=0 192 ,long blen=100,long bsens=1,int lp=0); 168 FitsABTColRead(string fname,string collabel,int ihdu=0,int lp=0); 169 FitsABTColRead(string fname,int colnum,int ihdu=0,int lp=0); 170 FitsABTColRead(const char *cfname,const char *collabel,int ihdu=0,int lp=0); 171 FitsABTColRead(const char *cfname,int colnum,int ihdu=0,int lp=0); 193 172 FitsABTColRead(FitsABTColRead& fbt); 194 173 FitsABTColRead(); … … 198 177 199 178 /////////////////////////////////////////////////////////////////// 200 //! Class for reading ALL the columns in a FITS ASCII or BINARY table (no bufferisation)179 //! Class for reading ALL the columns in a FITS ASCII or BINARY table 201 180 class FitsABTColRd1F : public AnyDataObj { 202 181 public: … … 209 188 string ReadKeyS(const char *keyname); 210 189 211 double Read(int ColNum,LONGLONG n,long nfirstel );212 in line double Read(int ColNum,LONGLONG n) {return Read(ColNum,n,0);}190 double Read(int ColNum,LONGLONG n,long nfirstel=0); 191 int_8 ReadLL(int ColNum,LONGLONG n,long nfirstel=0); 213 192 complex<r_8> ReadComplex(int ColNum,LONGLONG n,long nfirstel=0); 214 193 char* ReadInStr(int ColNum,LONGLONG n,long nfirstel=0); … … 258 237 //! Print to stdout 259 238 inline void Print(int lp=1) const {Print(cout,lp);} 260 //! Get the read effective buffer length261 239 262 240 protected:
Note:
See TracChangeset
for help on using the changeset viewer.