| [1505] | 1 | /* Interface Fits BINARY/ASCII Table     cmv 21/05/2001 */ | 
|---|
|  | 2 | #ifndef FBTNTINTF_H_SEEN | 
|---|
|  | 3 | #define FBTNTINTF_H_SEEN | 
|---|
|  | 4 |  | 
|---|
|  | 5 | #include "machdefs.h" | 
|---|
|  | 6 | #include <iostream.h> | 
|---|
|  | 7 | #include <string.h> | 
|---|
|  | 8 | #include <string> | 
|---|
|  | 9 |  | 
|---|
|  | 10 | #include "anydataobj.h" | 
|---|
|  | 11 | #include "ntupintf.h" | 
|---|
|  | 12 | #include "FitsIO/fitsio.h" | 
|---|
|  | 13 |  | 
|---|
|  | 14 | #include <vector> | 
|---|
|  | 15 |  | 
|---|
|  | 16 | namespace SOPHYA { | 
|---|
|  | 17 |  | 
|---|
|  | 18 | class FitsBTNtuIntf : public AnyDataObj, public NTupleInterface { | 
|---|
|  | 19 | public: | 
|---|
| [1507] | 20 | FitsBTNtuIntf(string fname,int ihdu=0,int_4 blen=100,int_4 bsens=1,uint_2 lp=0); | 
|---|
|  | 21 | FitsBTNtuIntf(char *cfname,int ihdu=0,int_4 blen=100,int_4 bsens=1,uint_2 lp=0); | 
|---|
|  | 22 | FitsBTNtuIntf(FitsBTNtuIntf& fbtnt); | 
|---|
| [1505] | 23 | FitsBTNtuIntf(); | 
|---|
|  | 24 | virtual ~FitsBTNtuIntf(); | 
|---|
|  | 25 |  | 
|---|
|  | 26 | void SetNulVal(r_8 nulval=0.) {NulVal = nulval;} | 
|---|
| [1507] | 27 | void ChangeBuffer(int_4 blen,int_4 bsens=1); | 
|---|
| [1505] | 28 | virtual void Print(ostream& os,int lp=1) const; | 
|---|
|  | 29 | inline  void Print(int lp=1) const {Print(cout,lp);} | 
|---|
|  | 30 |  | 
|---|
|  | 31 | virtual uint_4 NbLines() const ; | 
|---|
|  | 32 | virtual uint_4 NbColumns() const ; | 
|---|
|  | 33 | virtual r_8 * GetLineD(int n) const ; | 
|---|
|  | 34 | virtual r_8 GetCell(int n, int k) const ; | 
|---|
|  | 35 | virtual string VarList_C(const char* nomx=NULL) const ; | 
|---|
|  | 36 |  | 
|---|
|  | 37 | protected: | 
|---|
| [1507] | 38 | inline void SetBuffer(int_4 blen=100,int_4 bsens=1) | 
|---|
|  | 39 | {BuffLen = (blen<=0)?1:blen; BuffSens = bsens;} | 
|---|
|  | 40 | void DeAllocBuff(void); | 
|---|
|  | 41 | void AllocBuff(void); | 
|---|
| [1505] | 42 | void Init(void); | 
|---|
|  | 43 | void Delete(void); | 
|---|
|  | 44 | void printerror(int sta) const; | 
|---|
|  | 45 |  | 
|---|
|  | 46 | string FitsFN; | 
|---|
|  | 47 | int IHdu; | 
|---|
|  | 48 | uint_2 DbgLevel; | 
|---|
|  | 49 | fitsfile *FitsPtr; | 
|---|
|  | 50 | long NBline; | 
|---|
|  | 51 | int  NBcol; | 
|---|
|  | 52 | r_8 NulVal; | 
|---|
| [1507] | 53 | int_4 BuffLen, BuffSens; | 
|---|
| [1505] | 54 | mutable uint_4 NFitsRead; | 
|---|
|  | 55 | mutable long LineDeb, LineFin; | 
|---|
|  | 56 | vector<string> ColName; | 
|---|
|  | 57 | bool* ColReadable; | 
|---|
|  | 58 | double **Buffer; | 
|---|
|  | 59 | mutable r_8 * mRet; | 
|---|
|  | 60 | }; | 
|---|
|  | 61 |  | 
|---|
|  | 62 | } // namespace SOPHYA | 
|---|
|  | 63 | #endif    /* FBTNTINTF_H_SEEN */ | 
|---|