hippodraw::Python Namespace Reference


Detailed Description

A namespace encapsulating functions to interface HippoDraw classes to Python using Boost.Python.

For the list of C++ member functions that are exported, see which functions are referenced by the functions declared in this name space.

Requests:
On Mac OS X, get lots of warning messages about use of long double, must have a gcc flag to fix that.
Requests:
Write m4 macro to allow user to fix path to Python includes and lib.
Requests:
Consider using ax_boost_python.m4 from autoconf macro archive.
Requests:
Consider other Python finding m4 macros from the autoconf macro archive.
Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Matthew Langston <langston@slac.stanford.edu>


Functions

void export_Canvas ()
 Exports the PyCanvas class to Python.
void export_CanvasWindow ()
 Exports the CanvasWindow class to Python.
void export_CircularBuffer ()
 Exports the CircularBuffer class to Python.
void export_Color ()
 Exports to Python the Color class and its enumerations.
void export_CutController ()
 Exports CutContoller class to Python.
void export_DataArray ()
 Export PyDataSourceWrapper.
void export_DataRep ()
 Exports the PyDataRep class to Python.
void export_DataSource ()
 Exports the DataSource class to Python.
void export_Factory_PointRep ()
 Exports the template base class of PointRepFactory.
void export_FCNBase ()
 Export the base class of objective functions.
void export_FitsController ()
 Exports the FitsController.
void export_FitsNTuple ()
 Exports the FitsNTuple.
void export_Fitter ()
 Exports the Fitter class to Python.
void export_FitterFactory ()
 Exports the FitterFactory.
void export_Function ()
 Exports the PyFunctionRep class to Python.
void export_FunctionBase ()
 Export the FunctionBase and its FunctionWrap.
void export_FunctionFactory ()
 Exports the FitterFactory.
void export_HDApp ()
 Exports the PyApp class to Python.
void export_LineStyle ()
 Export hippodraw::LineStyle enumeration.
void export_ListTuple ()
 Exports the ListTuple class to Python.
void export_NTuple ()
 Exports the NTuple class to Python.
void export_NTupleController ()
 Exports the NTupleController class to Python.
void export_NTupleFCN ()
 Exports the base class of data source objective functions.
void export_NumArrayTuple ()
 Exports the NumArrayTuple class to Python.
void export_Observer ()
 Exports the Observer class to Python.
void export_PointRepFactory ()
 Exports the PointRepFactory class to Python.
void export_PyNTuple ()
 Exports the PyNTuple class to Python.
void export_QtCut ()
 Exports the QtCut class to Python.
void export_QtDisplay ()
 Exports the QtDisplay class to Python.
void export_RepBase ()
 Exports the RepBase class to Python.
void export_RootController ()
 Exports the RootController.
void export_RootNTuple ()
 Exports the RootNTuple.
void export_StatedFCN ()
 Export the base class of stated objective functions.
void export_SymbolType ()
 Export hippodraw::Symbo::lType enum.
void exportToPython ()
 Exports HippoDraw C++ classes to Python.
void PyDataSourceExceptionTranslator (const PyDataSource::StopIteration &e)
void translate (const std::exception &e)
 Translate a C++ exception to a Python one.


Function Documentation

void export_Canvas (  ) 

Exports the PyCanvas class to Python.

Definition at line 32 of file export_Canvas.cxx.

References PyCanvas::addDisplay(), PyCanvas::addText(), PyCanvas::addTextAt(), PyCanvas::addTextAtAbs(), PyCanvas::addTextRep(), PyCanvas::clear(), PyCanvas::close(), PyCanvas::getCut(), PyCanvas::getDisplay(), PyCanvas::getDisplays(), PyCanvas::getHeight(), PyCanvas::getPickTable(), PyCanvas::getSelPickTable(), PyCanvas::getTextRepTypes(), PyCanvas::getWidth(), PyCanvas::getX(), PyCanvas::getY(), PyCanvas::mouseData(), PyCanvas::print(), PyCanvas::removeDisplay(), PyCanvas::saveAs(), PyCanvas::saveAsImage(), PyCanvas::saveSelectedImages(), PyCanvas::selectAllDisplays(), PyCanvas::selectDisplay(), PyCanvas::setHeight(), PyCanvas::setPlotMatrix(), PyCanvas::setWidth(), PyCanvas::setX(), PyCanvas::setY(), PyCanvas::show(), and PyCanvas::swapOrientation().

Referenced by exportToPython().

void export_CanvasWindow (  ) 

Exports the CanvasWindow class to Python.

Directly exports CanvasWindow to Python. There is no locking and unlocking of QApplication singleton object, so this object must be instantiated from the same thread as the QApplication object.

Definition at line 31 of file export_CanvasWindow.cxx.

References CanvasWindow::fileNew().

Referenced by exportToPython().

void export_CircularBuffer (  ) 

Exports the CircularBuffer class to Python.

Directly exports CircularBuffer to Python. There is no locking and unlocking of the QApplication singleton object. However, since invoking member functions of this class do not directly change the GUI, they may be invoked from any thread.

Bug:
@@ Probably needs wrapper for application lock

Definition at line 37 of file export_CircularBuffer.cxx.

References CircularBuffer::addRow(), CircularBuffer::clear(), DataSource::columns(), CircularBuffer::reserve(), and NTuple::rows().

Referenced by exportToPython().

void export_Color (  ) 

Exports to Python the Color class and its enumerations.

Definition at line 37 of file export_Color.cxx.

References Color::black, Color::blue, Color::cyan, Color::darkgray, Color::green, Color::lightgray, Color::magenta, Color::orange, Color::red, Color::white, and Color::yellow.

Referenced by exportToPython().

void export_CutController (  ) 

Exports CutContoller class to Python.

Definition at line 39 of file export_CutController.cxx.

References CutController::createIdCut(), and CutController::instance().

Referenced by exportToPython().

void export_DataArray (  ) 

Export PyDataSourceWrapper.

Definition at line 148 of file PyDataSource.cxx.

References PyDataSource::addColumn(), PyDataSource::addRow(), PyDataSource::append(), PyDataSource::columnAsNumArray(), PyDataSource::columns(), PyDataSource::dataSource(), PyDataSource::getColumn(), PyDataSource::getCurrentDataSource(), PyDataSource::getLabels(), PyDataSource::getTitle(), PyDataSource::hasColumn(), PyDataSourceExceptionTranslator(), PyDataSource::registerNTuple(), PyDataSource::replaceColumn(), PyDataSource::rows(), PyDataSource::saveColumnFrom(), PyDataSource::saveColumnFromNumArray(), PyDataSource::setName(), and PyDataSource::setTitle().

Referenced by exportToPython().

void export_DataRep (  ) 

Exports the PyDataRep class to Python.

Definition at line 47 of file PyDataRep.cxx.

References PyDataRep::addCut(), PyDataRep::applyCut(), PyDataRep::applyCuts(), PyDataRep::colorNames(), PyDataRep::createNTuple(), PyDataRep::createNTupleUnderRegion(), PyDataRep::getBinWidth(), PyDataRep::getColumnWithCuts(), PyDataRep::getMean(), PyDataRep::getNTupleWithCuts(), PyDataRep::getRMS(), PyDataRep::name(), PyDataRep::names(), PyDataRep::normalizeTo(), PyDataRep::numberOfEntries(), PyDataRep::set(), PyDataRep::setAxisBinding(), PyDataRep::setAxisBindings(), PyDataRep::setBinWidth(), PyDataRep::setColor(), PyDataRep::setCutRange(), PyDataRep::setErrorDisplay(), PyDataRep::setLineStyle(), PyDataRep::setPointRep(), PyDataRep::setSize(), PyDataRep::setSymbol(), and PyDataRep::setWeight().

Referenced by exportToPython().

void export_DataSource (  ) 

Exports the DataSource class to Python.

Directly exports the DataSource class to Python. There is no locking and unlocking of the QApplication singleton object. However, since invoking member functions of this class do not directly change the GUI, they may be invoked from any thread.

Requests:
Add getShape(int) function to allow user to get shape of a column.

Definition at line 38 of file export_DataSource.cxx.

References DataSource::clear(), DataSource::columns(), DataSource::getColumn(), DataSource::getLabels(), DataSource::replaceColumn(), DataSource::rows(), DataSource::setName(), DataSource::setTitle(), and DataSource::title().

Referenced by exportToPython().

void export_Factory_PointRep (  ) 

Exports the template base class of PointRepFactory.

Definition at line 40 of file export_PointRepFactory.cxx.

Referenced by exportToPython().

void export_FCNBase (  ) 

Export the base class of objective functions.

Definition at line 41 of file export_FCNBase.cxx.

Referenced by exportToPython().

void export_FitsController (  ) 

Exports the FitsController.

Definition at line 40 of file export_FitsController.cxx.

References PyFitsController::createDataArray(), PyFitsController::createNTuple(), PyFitsController::getNTupleNames(), PyFitsController::instance(), and PyFitsController::writeToFile().

Referenced by exportToPython().

void export_FitsNTuple (  ) 

Exports the FitsNTuple.

Definition at line 38 of file export_FitsNTuple.cxx.

References FitsNTuple::addColumn(), FitsNTuple::replaceColumn(), and DataSource::replaceColumn().

Referenced by exportToPython().

void export_Fitter (  ) 

Exports the Fitter class to Python.

Definition at line 40 of file export_Fitter.cxx.

References Fitter::calcBestFit(), Fitter::calcDegreesOfFreedom(), Fitter::getFCN(), Fitter::name(), Fitter::objectiveValue(), Fitter::setFixedFlags(), Fitter::setLimits(), and Fitter::setStepSize().

Referenced by exportToPython().

void export_FitterFactory (  ) 

Exports the FitterFactory.

Definition at line 39 of file export_FitterFactory.cxx.

References Factory< Fitter >::create(), FitterFactory::instance(), Factory< Fitter >::names(), and FitterFactory::setDefault().

Referenced by exportToPython().

void export_Function (  ) 

Exports the PyFunctionRep class to Python.

Definition at line 39 of file PyFunctionRep.cxx.

References PyFunctionRep::addTo(), PyFunctionRep::createResidualsDisplay(), PyFunctionRep::degreesOfFreedom(), PyFunctionRep::fitFunction(), PyFunctionRep::getFitterName(), PyFunctionRep::objectiveValue(), PyFunctionRep::parameters(), PyFunctionRep::parmNames(), PyFunctionRep::principleErrors(), PyFunctionRep::setFitRange(), PyFunctionRep::setFitRangeEnabled(), PyFunctionRep::setFitter(), PyFunctionRep::setFixedFlags(), and PyFunctionRep::setParameters().

Referenced by exportToPython().

void export_FunctionBase (  ) 

Export the FunctionBase and its FunctionWrap.

Definition at line 34 of file FunctionWrap.cxx.

References FunctionBase::getParameters(), FunctionWrap::initialize(), FunctionBase::name(), FunctionBase::parmNames(), FunctionWrap::setName(), FunctionBase::setParameters(), and FunctionWrap::setParmNames().

Referenced by exportToPython().

void export_FunctionFactory (  ) 

Exports the FitterFactory.

Definition at line 39 of file export_FunctionFactory.cxx.

References Factory< FunctionBase >::add(), Factory< FunctionBase >::create(), FunctionFactory::instance(), and Factory< FunctionBase >::names().

Referenced by exportToPython().

void export_HDApp (  ) 

Exports the PyApp class to Python.

Definition at line 51 of file PyApp.cxx.

References PyApp::currentCanvas(), PyApp::exec(), PyApp::hasTerminated(), PyApp::instance(), PyApp::lock(), PyApp::openDocument(), PyApp::quit(), PyApp::quitOnLastWindowClose(), and PyApp::unlock().

Referenced by exportToPython().

void export_LineStyle (  ) 

Export hippodraw::LineStyle enumeration.

Definition at line 36 of file export_LineStyle.cxx.

References hippodraw::Line::Dash, hippodraw::Line::DashDot, hippodraw::Line::DashDotDot, hippodraw::Line::Dot, hippodraw::Line::Invisible, and hippodraw::Line::Solid.

Referenced by exportToPython().

void export_ListTuple (  ) 

Exports the ListTuple class to Python.

Directly exports ListTuple to Python. There is no locking and unlocking of the QApplication singleton object. However, since invoking member functions of this class do not directly change the GUI, they may be invoked from any thread.

Definition at line 37 of file export_ListTuple.cxx.

References ListTuple::addColumn(), DataSource::getLabelAt(), ListTuple::notifyObservers(), ListTuple::replaceColumn(), and DataSource::setLabels().

Referenced by exportToPython().

void export_NTuple (  ) 

Exports the NTuple class to Python.

Directly exports NTuple to Python. There is no locking and unlocking of the QApplication singleton object. However, since invoking member functions of this class do not directly change the GUI, they may be invoked from any thread.

Definition at line 39 of file export_NTuple.cxx.

References DataSource::getLabelAt(), NTuple::getRow(), NTuple::setIntervalCount(), NTuple::setIntervalEnabled(), and NTuple::setLabels().

Referenced by exportToPython().

void export_NTupleController (  ) 

Exports the NTupleController class to Python.

Requests:
Provide interface to DataSourceController.

Definition at line 41 of file export_NTupleController.cxx.

References PyNTupleController::changeName(), PyNTupleController::createCircularBuffer(), PyNTupleController::createDataArray(), PyNTupleController::createNTuple(), PyNTupleController::findDataSource(), PyNTupleController::instance(), PyNTupleController::registerNTuple(), and PyNTupleController::writeNTupleToFile().

Referenced by exportToPython().

void export_NTupleFCN (  ) 

Exports the base class of data source objective functions.

Definition at line 42 of file export_NTupleFCN.cxx.

References NTupleFCN::setDataSource().

Referenced by exportToPython().

void export_NumArrayTuple (  ) 

Exports the NumArrayTuple class to Python.

Definition at line 46 of file export_NumArrayTuple.cxx.

References NumArrayTuple::addColumn(), DataSource::getLabelAt(), NumArrayTuple::notifyObservers(), NumArrayTuple::replaceColumn(), and DataSource::setLabels().

Referenced by exportToPython().

void export_Observer (  ) 

Exports the Observer class to Python.

Definition at line 34 of file ObserverWrap.cxx.

Referenced by exportToPython().

void export_PointRepFactory (  ) 

Exports the PointRepFactory class to Python.

Definition at line 54 of file export_PointRepFactory.cxx.

References Factory< RepBase >::create(), PointRepFactory::instance(), and Factory< RepBase >::names().

Referenced by exportToPython().

void export_PyNTuple (  ) 

Exports the PyNTuple class to Python.

Directly exports PyNTuple to Python. There is locking and unlocking of the QApplication singleton object where needed.

Definition at line 102 of file export_NTuple.cxx.

References PyNTuple::addColumn(), PyNTuple::addRow(), PyNTuple::append(), PyNTuple::clear(), PyNTuple::replaceColumn(), and PyNTuple::setTitle().

Referenced by exportToPython().

void export_QtCut (  ) 

Exports the QtCut class to Python.

Definition at line 37 of file export_QtCut.cxx.

References QtCut::addTarget(), QtCut::addTargets(), QtCut::createFits(), QtDisplay::createNTuple(), QtCut::createTnt(), QtCut::cutRange(), QtCut::setCutRange(), QtCut::setEnabled(), and QtCut::toggleInverted().

Referenced by exportToPython().

void export_QtDisplay (  ) 

Exports the QtDisplay class to Python.

Definition at line 73 of file QtDisplay.cxx.

References QtDisplay::addDataRep(), QtDisplay::addDataRepStacked(), QtDisplay::addFunction(), QtDisplay::addObserver(), QtDisplay::addValues(), QtDisplay::applyCut(), QtDisplay::applyCuts(), QtDisplay::createDataArray(), QtDisplay::createNTuple(), QtDisplay::currentView(), QtDisplay::deleteView(), QtDisplay::getBinWidth(), QtDisplay::getDataRep(), QtDisplay::getDataReps(), QtDisplay::getLabel(), QtDisplay::getLog(), QtDisplay::getRange(), QtDisplay::getTitle(), QtDisplay::nextView(), QtDisplay::numberOfEntries(), QtDisplay::numViews(), QtDisplay::plotterId(), QtDisplay::reset(), QtDisplay::resize(), QtDisplay::saveView(), QtDisplay::setAspectRatio(), QtDisplay::setAutoRanging(), QtDisplay::setAutoTicks(), QtDisplay::setBinWidth(), QtDisplay::setColorMap(), QtDisplay::setContourLevels(), QtDisplay::setLabel(), QtDisplay::setLog(), QtDisplay::setNumberOfBins(), QtDisplay::setOffset(), QtDisplay::setPointRep(), QtDisplay::setRange(), QtDisplay::setTicks(), QtDisplay::setTitle(), QtDisplay::setTransform(), QtDisplay::setView(), QtDisplay::unlock(), and QtDisplay::update().

Referenced by exportToPython().

void export_RepBase (  ) 

Exports the RepBase class to Python.

Definition at line 40 of file export_RepBase.cxx.

Referenced by exportToPython().

void export_RootController (  ) 

Exports the RootController.

Definition at line 42 of file export_RootController.cxx.

References QtRootController::createDataArray(), QtRootController::createNTuple(), QtRootController::getNTupleNames(), and QtRootController::instance().

Referenced by exportToPython().

void export_RootNTuple (  ) 

Exports the RootNTuple.

Definition at line 42 of file export_RootNTuple.cxx.

References QtRootNTuple::addColumn(), QtRootNTuple::columns(), QtRootNTuple::getColumn(), QtRootNTuple::getColumnShape(), QtRootNTuple::getLabels(), QtRootNTuple::getRow(), QtRootNTuple::isMultiDimensional(), RootNTuple::replaceColumn(), QtRootNTuple::rows(), and QtRootNTuple::valueAt().

Referenced by exportToPython().

void export_StatedFCN (  ) 

Export the base class of stated objective functions.

Bug:
@@@ Can export objective value but not degrees of freedom.

Definition at line 46 of file export_StatedFCN.cxx.

References StatedFCN::degreesOfFreedom(), StatedFCN::objectiveValue(), StatedFCN::setDataSource(), StatedFCN::setFunction(), and StatedFCN::setUseErrors().

Referenced by exportToPython().

void export_SymbolType (  ) 

Export hippodraw::Symbo::lType enum.

Definition at line 36 of file export_SymbolType.cxx.

References hippodraw::Symbol::CIRCLE, hippodraw::Symbol::FILLED_CIRCLE, hippodraw::Symbol::FILLED_TRIANGLE, hippodraw::Symbol::INVISIBLE, hippodraw::Symbol::PLUS, hippodraw::Symbol::SOLIDSQUARE, hippodraw::Symbol::SQUARE, hippodraw::Symbol::TIMES, and hippodraw::Symbol::TRIANGLE.

Referenced by exportToPython().

void exportToPython (  ) 

Exports HippoDraw C++ classes to Python.

Call this function from within a BOOST_PYTHON_MODULE definition to incorporate HippoDraw classes within that module.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Matthew Langston <langston@slac.stanford.edu>

Selim Tuvi <stuvi@slac.stanford.edu>

Definition at line 60 of file exportToPython.cxx.

References export_Canvas(), export_CanvasWindow(), export_CircularBuffer(), export_Color(), export_CutController(), export_DataArray(), export_DataRep(), export_DataSource(), export_Factory_PointRep(), export_FCNBase(), export_FitsController(), export_FitsNTuple(), export_Fitter(), export_FitterFactory(), export_Function(), export_FunctionBase(), export_FunctionFactory(), export_HDApp(), export_LineStyle(), export_ListTuple(), export_NTuple(), export_NTupleController(), export_NTupleFCN(), export_NumArrayTuple(), export_Observer(), export_PointRepFactory(), export_PyNTuple(), export_QtCut(), export_QtDisplay(), export_RepBase(), export_RootController(), export_RootNTuple(), export_StatedFCN(), export_SymbolType(), and translate().

Referenced by BOOST_PYTHON_MODULE().

void hippodraw::Python::PyDataSourceExceptionTranslator ( const PyDataSource::StopIteration e  ) 

Definition at line 143 of file PyDataSource.cxx.

References PyDataSource::StopIteration::what().

Referenced by export_DataArray().

void hippodraw::Python::translate ( const std::exception &  e  ) 

Translate a C++ exception to a Python one.

The exception e must a derived class of std::exception.

Attention:
This function seems to be required by GCC less than verion 3.0.

Definition at line 53 of file exportToPython.cxx.

Referenced by exportToPython().


Generated for HippoDraw Class Library by doxygen