FitsController.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 
14 #ifndef FitsController_H
15 #define FitsController_H
16 
17 #include "pattern/libhippo.h"
18 
19 #include <map>
20 #include <string>
21 #include <vector>
22 
23 namespace hippodraw {
24 
25  class DataSource;
26  class FitsFile;
27  class PlotterBase;
28  class TupleCut;
29 
30 
40 {
41 
42  private:
43 
46  std::map < std::string, FitsFile * > m_file_map;
47 
50  mutable std::string m_version;
51 
55 
58  std::vector < std::string > m_ntuple_names;
59 
64  std::size_t calcColumnWidth ( const DataSource * source,
65  unsigned int column ) const;
66 
69  void closeFile ( const std::string & name );
70 
71  public:
72 
75  static FitsController * instance ();
76 
79  virtual ~FitsController();
80 
83  const std::string & version () const;
84 
89  FitsFile * openFile ( const std::string & file );
90 
94  const std::vector < std::string > &
95  getNTupleNames ( const std::string & file_name );
96 
102  DataSource * createNTuple ( const std::string & filename,
103  const std::string & name );
104 
113  DataSource * createNTuple ( const std::string & filename,
114  const std::string & name,
115  int index );
116 
121  void checkForImage ( PlotterBase * plotter,
122  const DataSource & source );
123 
124 
129  void writeNTupleToFile ( const DataSource * ntuple,
130  const std::string & filename );
131 
136  void writeNTupleToFile ( const std::string & name,
137  const std::string & filename );
138 
143  void writeImageToFile ( unsigned int x, unsigned int y,
144  const std::vector <double> & data,
145  const std::string & filename );
146 
156  int writeNTupleToFile ( const DataSource * source,
157  const std::string & filename,
158  const std::string & name,
159  const std::vector < std::string > & column_list,
160  const std::vector < const TupleCut * > & cut_list );
161 
162 
163 };
164 
165 } // namespace hippodraw
166 
167 #endif // FitsController_H

Generated for HippoDraw Class Library by doxygen