FitsNTuple.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 
14 #ifndef FitsNTuple_H
15 #define FitsNTuple_H
16 
17 #include "datasrcs/DataSource.h"
18 
19 namespace hippodraw {
20 
21  class DataColumn;
22  class FitsFile;
23 
32 {
33 
34 private:
35 
38  std::vector < DataColumn * > m_columns;
39 
43 
47  int m_hdu_num;
48 
54  FitsNTuple ( );
55 
59  void checkLabel ( const std::string & label );
60 
61 public:
62 
65  FitsNTuple ( FitsFile * file );
66 
69  virtual ~FitsNTuple();
70 
74  virtual void copy ( const DataSource & );
75 
78  const FitsFile * getFile () const;
79 
83  virtual void notifyObservers ( ) const;
84 
87  virtual unsigned int rows () const;
88 
93  std::size_t size ( unsigned int c ) const;
94 
97  virtual bool empty () const;
98 
102  virtual void clear ();
103 
107  virtual void reserve ( unsigned int count );
108 
111  virtual double
112  operator [] ( std::vector < unsigned int > & indices ) const;
113 
114  virtual double valueAt ( unsigned int row, unsigned int column ) const;
115 
124  int addColumn ( const std::string & label,
125  const std::vector < double > & column );
126 
135  virtual int addColumn ( const std::string & label,
136  const std::vector < double > & column,
137  const std::vector < intptr_t > & shape );
138 
146  void replaceColumn ( unsigned int index,
147  const std::vector < double > & data );
148 
156  virtual void replaceColumn ( unsigned int index,
157  const std::vector < double > & data,
158  const std::vector < intptr_t > & shape );
159 
166  void replaceColumn ( const std::string & label,
167  const std::vector < double > & data,
168  const std::vector < intptr_t > & shape );
169 
172  virtual const std::vector < double > & getRow ( unsigned int ) const;
173 
180  virtual void setShape ( std::vector < unsigned int > & shape );
181 
184  const std::vector < unsigned int > & getShape () const;
185 
186  virtual bool fillRange ( unsigned int column, Range & ) const;
187 
190  virtual void fillShape ( std::vector < intptr_t > & shape,
191  unsigned int index ) const;
192 
198  virtual const std::vector < double > & getColumn ( unsigned int c ) const;
199 
200 private:
201 
204  void initColumns ();
205 
209  int fillDataCache ( unsigned int column );
210 
213  virtual double * doubleArrayAt ( unsigned int row,
214  unsigned int column ) const;
215 
216 };
217 
218 } // namespace hippodraw
219 
220 #endif // FitsNTuple_H

Generated for HippoDraw Class Library by doxygen