#include <PyDataSource.h>
Collaboration diagram for PyDataSource:
Definition at line 35 of file PyDataSource.h.
Public Member Functions | |
int | addColumn (const std::string &label, boost::python::numeric::array array) |
Add a column to a NumArrayTuple. | |
int | addColumn (const std::string &label, const std::vector< double > &col) |
Add a column to an NTuple or ListTuple. | |
void | clear () |
Clear the data elements of the DataSource. | |
boost::python::numeric::array | columnAsNumArray (unsigned int index) const |
Return a column from the ntuple as a numarray object, indexing by column number. | |
boost::python::numeric::array | columnAsNumArray (const std::string &label) const |
Return a column from the ntuple as a numarray object, indexing by column label. | |
unsigned int | columns () const |
const DataSource & | dataSource () const |
Return a reference to the underlying DataSource. | |
const std::vector< double > & | getColumn (unsigned int index) const |
Get a column as a tuple of floats by column index. | |
const std::vector< double > & | getColumn (const std::string &name) const |
Get a column as a tuple of floats by column name. | |
const std::vector< std::string > & | getLabels () const |
Get the column names. | |
const std::string & | getTitle () const |
The title of the DataSource. | |
bool | hasColumn (const std::string &colname) const |
Return true if column with label colname exists in ntuple. | |
PyDataSource (const std::string &name, DataSource *source) | |
Constructor taking an existing DataSource and its name as an argument. | |
PyDataSource (const std::string &dataSource) | |
Constructor taking the kind of DataSource as an argument. | |
PyDataSource () | |
Default constructor wraps an ordinary NTuple. | |
void | registerNTuple (const std::string &name) |
Register this ntuple by a chosen name. | |
std::string | registerNTuple () |
Register this ntuple, returning a unique name. | |
void | replaceColumn (unsigned int index, boost::python::numeric::array array) |
Replace a column by its index. | |
void | replaceColumn (const std::string &, boost::python::numeric::array array) |
Replace a column by its label. | |
void | replaceColumn (unsigned int index, const std::vector< double > &col) |
Replace a column by its index. | |
void | replaceColumn (const std::string &, const std::vector< double > &col) |
Replace a column by its label. | |
unsigned int | rows () const |
void | saveColumnFromNumArray (unsigned int index, boost::python::numeric::array array) |
Replace or add a column from a numarray object, indexing by column label. | |
void | saveColumnFromNumArray (const std::string &label, boost::python::numeric::array array) |
Replace or add a column from a numarray object, indexing by column label. | |
void | setName (const std::string &name) |
Set the name of the ntuple. | |
void | setTitle (const std::string &title) |
~PyDataSource () | |
Private Attributes | |
DataSource * | m_dataSource |
The actual DataSource object. | |
std::string | m_type |
The type of data source. | |
Classes | |
class | StopIteration |
|
Default constructor wraps an ordinary NTuple.
Definition at line 258 of file PyDataSource.cxx. References m_dataSource, and m_type. |
|
Constructor taking the kind of DataSource as an argument.
Definition at line 271 of file PyDataSource.cxx. References m_dataSource. |
|
Constructor taking an existing DataSource and its name as an argument.
Definition at line 264 of file PyDataSource.cxx. |
|
Definition at line 285 of file PyDataSource.cxx. References m_dataSource. |
|
Add a column to a NumArrayTuple.
Definition at line 402 of file PyDataSource.cxx. References NumArrayTuple::addColumn(), m_dataSource, and m_type. |
|
Add a column to an NTuple or ListTuple.
Definition at line 385 of file PyDataSource.cxx. References ListTuple::addColumn(), NTuple::addColumn(), DataSource::columns(), m_dataSource, and m_type. Referenced by hippodraw::Python::export_DataArray(), and saveColumnFromNumArray(). |
|
Clear the data elements of the DataSource.
Definition at line 413 of file PyDataSource.cxx. References DataSource::clear(), and m_dataSource. |
|
Return a column from the ntuple as a numarray object, indexing by column number.
Definition at line 450 of file PyDataSource.cxx. References columns(), DataSource::getColumn(), NumArrayTuple::getNumArray(), m_dataSource, m_type, num_util::makeNum(), and num_util::shape(). |
|
Return a column from the ntuple as a numarray object, indexing by column label.
Definition at line 436 of file PyDataSource.cxx. References DataSource::getColumn(), NumArrayTuple::getNumArray(), m_dataSource, m_type, num_util::makeNum(), and num_util::shape(). Referenced by hippodraw::Python::export_DataArray(). |
|
Definition at line 290 of file PyDataSource.cxx. References DataSource::columns(), and m_dataSource. Referenced by columnAsNumArray(), hippodraw::Python::export_DataArray(), and saveColumnFromNumArray(). |
|
Return a reference to the underlying DataSource.
Definition at line 53 of file PyDataSource.h. References m_dataSource. Referenced by hippodraw::Python::export_DataArray(), PyDataRep::PyDataRep(), QtCut::QtCut(), and QtDisplay::QtDisplay(). |
|
Get a column as a tuple of floats by column index.
Definition at line 320 of file PyDataSource.cxx. References DataSource::getColumn(), and m_dataSource. |
|
Get a column as a tuple of floats by column name.
Definition at line 315 of file PyDataSource.cxx. References DataSource::getColumn(), and m_dataSource. Referenced by hippodraw::Python::export_DataArray(). |
|
Get the column names.
Definition at line 310 of file PyDataSource.cxx. References DataSource::getLabels(), and m_dataSource. Referenced by hippodraw::Python::export_DataArray(), and hasColumn(). |
|
The title of the DataSource.
Definition at line 298 of file PyDataSource.cxx. References m_dataSource, and DataSource::title(). Referenced by hippodraw::Python::export_DataArray(). |
|
Return true if column with label colname exists in ntuple.
Definition at line 417 of file PyDataSource.cxx. References std::find(), and getLabels(). Referenced by hippodraw::Python::export_DataArray(), and saveColumnFromNumArray(). |
|
Register this ntuple by a chosen name.
Definition at line 422 of file PyDataSource.cxx. References DataSourceController::instance(), m_dataSource, DataSourceController::registerNTuple(), and DataSource::setName(). |
|
Register this ntuple, returning a unique name.
Definition at line 428 of file PyDataSource.cxx. References DataSourceController::instance(), m_dataSource, and DataSourceController::registerNTuple(). Referenced by hippodraw::Python::export_DataArray(). |
|
Replace a column by its index.
Definition at line 373 of file PyDataSource.cxx. References m_dataSource, m_type, and NumArrayTuple::replaceColumn(). |
|
Replace a column by its label.
Definition at line 360 of file PyDataSource.cxx. References m_dataSource, m_type, and NumArrayTuple::replaceColumn(). |
|
Replace a column by its index.
Definition at line 344 of file PyDataSource.cxx. References DataSource::getLabels(), m_dataSource, and replaceColumn(). |
|
Replace a column by its label.
Definition at line 326 of file PyDataSource.cxx. References m_dataSource, m_type, ListTuple::replaceColumn(), and NTuple::replaceColumn(). Referenced by hippodraw::Python::export_DataArray(), replaceColumn(), and saveColumnFromNumArray(). |
|
Definition at line 294 of file PyDataSource.cxx. References m_dataSource, and DataSource::rows(). Referenced by hippodraw::Python::export_DataArray(). |
|
Replace or add a column from a numarray object, indexing by column label.
Definition at line 546 of file PyDataSource.cxx. References columns(), extractVector(), m_dataSource, m_type, ListTuple::replaceColumn(), NTuple::replaceColumn(), and replaceColumn(). |
|
Replace or add a column from a numarray object, indexing by column label.
Definition at line 483 of file PyDataSource.cxx. References NTuple::addColumn(), ListTuple::addColumn(), addColumn(), extractVector(), hasColumn(), m_dataSource, m_type, NTuple::replaceColumn(), ListTuple::replaceColumn(), and replaceColumn(). Referenced by hippodraw::Python::export_DataArray(). |
|
Set the name of the ntuple.
Definition at line 306 of file PyDataSource.cxx. References m_dataSource, and DataSource::setName(). Referenced by hippodraw::Python::export_DataArray(). |
|
Definition at line 302 of file PyDataSource.cxx. References m_dataSource, and DataSource::setTitle(). Referenced by hippodraw::Python::export_DataArray(). |
|
The actual DataSource object.
Definition at line 161 of file PyDataSource.h. Referenced by addColumn(), clear(), columnAsNumArray(), columns(), dataSource(), getColumn(), getLabels(), getTitle(), PyDataSource(), registerNTuple(), replaceColumn(), rows(), saveColumnFromNumArray(), setName(), setTitle(), and ~PyDataSource(). |
|
The type of data source.
Definition at line 158 of file PyDataSource.h. Referenced by addColumn(), columnAsNumArray(), PyDataSource(), replaceColumn(), and saveColumnFromNumArray(). |