source: trunk/src/FitsIO/ReadExisting.hh

Last change on this file was 1123, checked in by MatthewWhiting, 12 years ago

Moving the code that reads from and writes to FITS files containing reconstructed, momentmap, mask etc arrays to the FitsIO directory, away from Cubes. Updating all include statements as well.

File size: 966 bytes
Line 
1#ifndef DUCHAMP_CUBE_READ_EXISTING_HH_
2#define DUCHAMP_CUBE_READ_EXISTING_HH_
3
4#include <duchamp/duchamp.hh>
5#include <duchamp/Cubes/cubes.hh>
6
7namespace duchamp {
8
9  class ReadExisting
10  {
11  public:
12    ReadExisting();
13    ReadExisting(Cube *cube);
14    ReadExisting(const ReadExisting& other);
15    ReadExisting& operator= (const ReadExisting& other);
16    virtual ~ReadExisting(){};
17
18    void setCube(Cube *cube){itsCube=cube;};
19    void setArray(float *array){itsArray=array;};
20    void setFilename(std::string filename){itsFilename=filename;};
21    void setFITSptr(fitsfile *fptr){itsFptr=fptr;};
22
23    OUTCOME openFile();
24    OUTCOME read();
25    OUTCOME closeFile();
26
27    virtual OUTCOME checkPars() = 0;
28    virtual OUTCOME checkFile() = 0;
29    OUTCOME checkDim();
30    virtual OUTCOME checkHeaders() = 0;
31    virtual OUTCOME readFromFile();
32
33  protected:
34    Cube *itsCube;
35    float *itsArray;
36    std::string itsFilename;
37    fitsfile *itsFptr;
38
39  };
40
41}
42
43#endif
Note: See TracBrowser for help on using the repository browser.