27 using std::runtime_error;
30 using namespace hippodraw;
58 createNTuple (
const std::string & filename,
const std::string & hduname )
64 ftuple = dynamic_cast <
FitsNTuple * > ( ntuple );
66 catch (
const runtime_error & e ) {
81 runtime_error e (
"HippoDraw was not built with numeric Python support" );
93 m_instance -> writeNTupleToFile ( source, filename );
108 const std::string & filename,
109 const std::vector < QtCut * > & cut_list,
110 const std::vector < std::string > & column_list )
115 vector < const TupleCut * > tuple_cut_list;
120 const std::string & title = source -> title ();
122 m_instance -> writeNTupleToFile ( source, filename, title,
123 column_list, tuple_cut_list );
130 const std::string & filename,
131 const std::vector < QtCut * > & cut_list,
132 const std::vector < std::string > & column_list )
134 const DataSource & source = array -> dataSource ();
135 writeToFile ( & source, filename, cut_list, column_list );
138 const std::vector < std::string > &
143 const std::vector< std::string > & names
147 catch (
const runtime_error & e ) {
150 static const std::vector < std::string > names;
static FitsController * instance()
Returns the singleton instance of the FitsController.
hippodraw::QtCut class interface
hippodraw::FitsNTuple class interface.
static void lock()
Obtains a lock on the application's mutex.
void * data(numeric::array arr)
void writeToFile(const DataSource *source, const std::string &filename)
Writes the DataSource to a FITS file as a binary table.
static PyFitsController * s_instance
The singleton PyFitsController instance.
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...
static FitsController * m_instance
The singleton FitsController object.
const std::vector< std::string > & getNTupleNames(const std::string &filename)
Returns the names of the top level tree in the Root file.
hippodraw::PyDataSource class interface
hippodraw::PyApp class interface.
hippodraw::FitsController class interface.
static void fillCutList(std::vector< const TupleCut * > &tuple_cut_list, const std::vector< QtCut * > &cut_list)
This class is the public interface to a DataSource object that the user sees as the DataArray object ...
FitsNTuple * createNTuple(const std::string &filename, const std::string &hduname)
Creates a FitsNTuple object.
A Controller class for FITS files.
static void unlock()
Releases the lock on the application's mutex.
A DataSource class implemented with a vector < DataColumn * > objects.
PyFitsController()
The default constructor, protected from being used.
hippodraw::PyFitsController class interface.
A wrapper for FitsController.
static PyFitsController * instance()
The singleton instance method.
Base class for DataSource.