#include <FitsController.h>
Collaboration diagram for FitsController:
Definition at line 31 of file FitsController.h.
Public Member Functions | |
void | checkForImage (PlotterBase *plotter, const DataSource &source, const std::vector< std::string > &binding) |
Check and fix plotter for FITS image data source. | |
DataSource * | createNTuple (const std::string &filename, const std::string &name, int index) |
Creates a FitsNTuple from a ASCII or binary table in a FITS file. | |
DataSource * | createNTuple (const std::string &filename, const std::string &name) |
Creates a FitsNTuple from a ASCII or binary table in a FITS file. | |
const std::vector< std::string > & | getNTupleNames (const std::string &file_name) |
Returns a temporarily list of the names of the DataSource objects in the FITS file. | |
FitsFile * | openFile (const std::string &file) |
Opens the named file, if not already opened. | |
const std::string & | version () const |
Returns the version of cfitsio being used. | |
virtual | ~FitsController () |
The destructor. | |
Static Public Member Functions | |
static FitsController * | instance () |
Returns the singleton instance of the FitsController. | |
Private Member Functions | |
void | closeFile (const std::string &name) |
Closed the named file, if found in list of opened files. | |
Private Attributes | |
std::map< std::string, FitsFile * > | m_file_map |
A map of open FITS files. | |
std::vector< std::string > | m_ntuple_names |
A list of possible NTuple names in the FITS file. | |
std::string | m_version |
The version of cfitsio being used. | |
Static Private Attributes | |
static FitsController * | s_instance = 0 |
The singleton instance of the FitsController. |
|
The destructor.
Definition at line 56 of file FitsController.cxx. |
|
Check and fix plotter for FITS image data source. If the data source for the Plotter is a FITS image file, then sets the parameters of the image. Otherwise does nothing. Definition at line 207 of file FitsController.cxx. References FitsNTuple::getFile(), FitsFileBase::Image, PlotterBase::setAspectRatio(), Range::setHigh(), Range::setLength(), Range::setLow(), PlotterBase::setOffset(), num_util::type(), hippodraw::Axes::X, and hippodraw::Axes::Y. |
|
Closed the named file, if found in list of opened files.
Definition at line 114 of file FitsController.cxx. |
|
Creates a FitsNTuple from a ASCII or binary table in a FITS file. Returns a FitsNTuple object from the file filename, with HDU number index. Use name as the HDU name. name name. If the object already exists, return it, otherwise creates and returns a new one. If error occurs in the creation, throws a DataSourceException. Since HDU may not have a name, one uses the index to find it. Definition at line 169 of file FitsController.cxx. References DataSourceController::instance(), and openFile(). |
|
Creates a FitsNTuple from a ASCII or binary table in a FITS file. Looks from an HDU with extension name name. If none exists, throws a DataSourceException. If it does exist, then returns the created FitsNTuple. Definition at line 140 of file FitsController.cxx. References getNTupleNames(), and num_util::size(). |
|
Returns a temporarily list of the names of the DataSource objects in the FITS file.
Definition at line 126 of file FitsController.cxx. References m_ntuple_names, and openFile(). Referenced by createNTuple(). |
|
Returns the singleton instance of the FitsController.
Definition at line 47 of file FitsController.cxx. References s_instance. Referenced by DisplayController::createDisplay(), HiNTupleXML::getObject(), CanvasView::helpAbout(), PyFitsController::instance(), QtFileDialog::isFitsFile(), and QtFileDialog::openFitsTuple(). |
|
Opens the named file, if not already opened. Opens and returns pointer to a FITS file. If file is not found, or file is not a FITS file, then throws DataSourceException. Definition at line 80 of file FitsController.cxx. References m_file_map. Referenced by createNTuple(), getNTupleNames(), and QtFileDialog::isFitsFile(). |
|
Returns the version of cfitsio being used.
Definition at line 62 of file FitsController.cxx. References m_version. |
|
A map of open FITS files.
Definition at line 38 of file FitsController.h. Referenced by openFile(). |
|
A list of possible NTuple names in the FITS file.
Definition at line 50 of file FitsController.h. Referenced by getNTupleNames(). |
|
The version of cfitsio being used.
Definition at line 42 of file FitsController.h. Referenced by version(). |
|
The singleton instance of the FitsController.
Definition at line 43 of file FitsController.cxx. Referenced by instance(). |