PyFitsController Class Reference

#include <PyFitsController.h>

Collaboration diagram for PyFitsController:

Collaboration graph
FitsController
[legend]
List of all members.

Detailed Description

A wrapper for FitsController.

Note:
This wrapper was used instead of the export_ pattern so that this class could generate the PyDataSource object without have circular dependency between subdirectories.
Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 35 of file PyFitsController.h.

Public Member Functions

PyDataSourcecreateDataArray (const std::string &filename, const std::string &hduname)
 Creates a DataArray Python object from the FITS file filename and the FITS HDU named hduname.
FitsNTuplecreateNTuple (const std::string &filename, const std::string &hduname)
 Creates a FitsNTuple object.
const std::vector< std::string > & getNTupleNames (const std::string &filename)
 Returns the names of the top level tree in the Root file.
void writeToFile (const PyDataSource *source, const std::string &filename, const std::vector< QtCut * > &cut_list, const std::vector< std::string > &column_list)
 Writes a copy of the PyDataSource source to a file, Write to a file a copy of the DataSource with only columns in the column_list and rows passing all the cuts in the cut_list.
void writeToFile (const DataSource *source, const std::string &filename, const std::vector< QtCut * > &cut_list, const std::vector< std::string > &column_list)
 Writes a copy of the DataSource source to a file.
void writeToFile (const PyDataSource *source, const std::string &filename)
 Writes the PyDataSource to a FITS file as a binary table.
void writeToFile (const DataSource *source, const std::string &filename)
 Writes the DataSource to a FITS file as a binary table.

Static Public Member Functions

static PyFitsControllerinstance ()
 The singleton instance method.

Private Member Functions

 PyFitsController (const PyFitsController &)
 The copy constructor, protected from being used.
 PyFitsController ()
 The default constructor, protected from being used.

Static Private Attributes

static FitsControllerm_instance = 0
 The singleton FitsController object.
static PyFitsControllers_instance = 0
 The singleton PyFitsController instance.


Constructor & Destructor Documentation

PyFitsController (  )  [private]

The default constructor, protected from being used.

Definition at line 37 of file PyFitsController.cxx.

Referenced by PyFitsController::instance().

PyFitsController ( const PyFitsController  )  [private]

The copy constructor, protected from being used.


Member Function Documentation

PyDataSource * createDataArray ( const std::string &  filename,
const std::string &  hduname 
)

Creates a DataArray Python object from the FITS file filename and the FITS HDU named hduname.

Definition at line 74 of file PyFitsController.cxx.

References PyFitsController::createNTuple().

Referenced by hippodraw::Python::export_FitsController().

FitsNTuple * createNTuple ( const std::string &  filename,
const std::string &  hduname 
)

Creates a FitsNTuple object.

Definition at line 58 of file PyFitsController.cxx.

References PyFitsController::m_instance.

Referenced by PyFitsController::createDataArray(), and hippodraw::Python::export_FitsController().

const std::vector< std::string > & getNTupleNames ( const std::string &  filename  ) 

Returns the names of the top level tree in the Root file.

Definition at line 140 of file PyFitsController.cxx.

References PyFitsController::m_instance.

Referenced by hippodraw::Python::export_FitsController().

PyFitsController * instance (  )  [static]

The singleton instance method.

Requests:
Should always build this class and throw exception if user tries to use it when code was not built with FITS support.

Definition at line 46 of file PyFitsController.cxx.

References FitsController::instance(), PyFitsController::m_instance, PyFitsController::PyFitsController(), and PyFitsController::s_instance.

Referenced by hippodraw::Python::export_FitsController().

void writeToFile ( const PyDataSource source,
const std::string &  filename,
const std::vector< QtCut * > &  cut_list,
const std::vector< std::string > &  column_list 
)

Writes a copy of the PyDataSource source to a file, Write to a file a copy of the DataSource with only columns in the column_list and rows passing all the cuts in the cut_list.

Definition at line 129 of file PyFitsController.cxx.

References PyFitsController::writeToFile().

void writeToFile ( const DataSource source,
const std::string &  filename,
const std::vector< QtCut * > &  cut_list,
const std::vector< std::string > &  column_list 
)

Writes a copy of the DataSource source to a file.

Write to a file a copy of the DataSource with only columns in the column_list and rows passing all the cuts in the cut_list.

Definition at line 107 of file PyFitsController.cxx.

References QtCut::fillCutList(), PyApp::lock(), PyFitsController::m_instance, and PyApp::unlock().

void writeToFile ( const PyDataSource source,
const std::string &  filename 
)

Writes the PyDataSource to a FITS file as a binary table.

Definition at line 99 of file PyFitsController.cxx.

References num_util::data(), and PyFitsController::writeToFile().

void writeToFile ( const DataSource source,
const std::string &  filename 
)

Writes the DataSource to a FITS file as a binary table.

Definition at line 88 of file PyFitsController.cxx.

References PyApp::lock(), PyFitsController::m_instance, and PyApp::unlock().

Referenced by hippodraw::Python::export_FitsController(), and PyFitsController::writeToFile().


Member Data Documentation

FitsController * m_instance = 0 [static, private]

The singleton FitsController object.

Definition at line 44 of file PyFitsController.h.

Referenced by PyFitsController::createNTuple(), PyFitsController::getNTupleNames(), PyFitsController::instance(), and PyFitsController::writeToFile().

PyFitsController * s_instance = 0 [static, private]

The singleton PyFitsController instance.

Definition at line 41 of file PyFitsController.h.

Referenced by PyFitsController::instance().


The documentation for this class was generated from the following files:
Generated for HippoDraw Class Library by doxygen