#include <DataRepController.h>
Collaboration diagram for DataRepController:
It frequently implements the application logic which should neither be in the GUI nor in the display objects.
Definition at line 35 of file DataRepController.h.
Public Member Functions | |
const std::vector< std::string > & | bindingOptions (DataRep *rep) |
Returns the binding options, if any, for the DataRep. | |
const std::vector< std::string > & | bindingOptions (const std::string &name) |
Returns the binding options, if any, for the named DataRep. | |
void | changeDataSource (DataRep *rep, const DataSource *tuple) |
Changes the DataSource. | |
DataRep * | createDataRep (const std::string &name, const DataSource *ntuple, const std::vector< std::string > &bindings) const |
Creates a new DataRep object of class name. | |
DataRep * | createDataRep (const std::string &name) |
Creates a new DataRep object of class name. | |
void | setAxisBindings (DataRep *rep, const DataSource *ntuple, const std::vector< std::string > &bindings) const |
Sets the axis binding of the DataRep object. | |
~DataRepController () | |
The destructor. | |
Static Public Member Functions | |
static DataRepController * | instance () |
Returns the pointer to the singleton instance. | |
Protected Member Functions | |
DataRepController () | |
A default constructor for avoiding creation except by itself or with derived classes. | |
Private Member Functions | |
bool | checkBindings (const DataSource *tuple, const std::vector< std::string > &bindings) const |
Returns true if all the the string objects in the vector bindings are valid labels for the columns in DataSource tuple. | |
DataRepController (const DataRepController &) | |
A private copy constructor in order to avoid copying. | |
Private Attributes | |
std::vector< std::string > | m_null_vector |
A empty vector of strings. | |
Static Private Attributes | |
static DataRepController * | s_instance = 0 |
The pointer to the singleton object. |
|
A private copy constructor in order to avoid copying.
|
|
A default constructor for avoiding creation except by itself or with derived classes.
Definition at line 36 of file DataRepController.cxx. Referenced by instance(). |
|
The destructor.
Definition at line 40 of file DataRepController.cxx. |
|
Returns the binding options, if any, for the DataRep. If no binding options are available, return an empty vector. Definition at line 62 of file DataRepController.cxx. References NTupleProjector::bindingOptions(), DataRep::getProjector(), and m_null_vector. |
|
Returns the binding options, if any, for the named DataRep. If no binding options are available, return an empty vector. Definition at line 53 of file DataRepController.cxx. References DataRepFactory::instance(), and Factory< Type >::prototype(). Referenced by DisplayController::bindingOptions(). |
|
Changes the DataSource. Attempt to change the DataSource for the DataRep object while perserving the bindings. The object rep must be one that contains a NTupleProjector, otherwise an assertion is raised. If the ntuple doesn't have column labels required, then the old data source is restored and a DataSourceException is thrown. Definition at line 146 of file DataRepController.cxx. References setAxisBindings(). |
|
Returns
Otherwise returns Definition at line 75 of file DataRepController.cxx. Referenced by createDataRep(). |
|
Creates a new DataRep object of class name. Connects the newly created DataRep to ntuple and sets the bindings to bindings. Returns DataRep if successful, otherwise an DataRepException is thrown. Definition at line 112 of file DataRepController.cxx. References checkBindings(), Factory< Type >::create(), DataRepFactory::instance(), and setAxisBindings(). |
|
Creates a new DataRep object of class name. It should be a class that does not have NTuple bindings. Returns the DataRep object if successful, otherwise a DataRepException is thrown. Definition at line 93 of file DataRepController.cxx. References DataRepFactory::instance(), and FactoryException::what(). Referenced by DisplayController::addDataRep(), DisplayController::addDataRepStacked(), CutController::createCut(), DataRepXML::createDataRep(), and PyDataRep::PyDataRep(). |
|
Returns the pointer to the singleton instance.
Definition at line 44 of file DataRepController.cxx. References DataRepController(), and s_instance. Referenced by DisplayController::addDataRep(), DisplayController::addDataRepStacked(), DisplayController::bindingOptions(), CutController::createCut(), DataRepXML::createDataRep(), DisplayController::createDisplay(), Inspector::ntupleChanged(), and PyDataRep::PyDataRep(). |
|
Sets the axis binding of the DataRep object.
Definition at line 129 of file DataRepController.cxx. References Observable::addObserver(), DataRep::getProjector(), DataRep::setAxisBindings(), and NTupleProjector::setNTuple(). Referenced by changeDataSource(), and createDataRep(). |
|
A empty vector of strings. This vector is returned by member functions that can not obtain a reference from a DataRep. Definition at line 45 of file DataRepController.h. Referenced by bindingOptions(). |
|
The pointer to the singleton object.
Definition at line 34 of file DataRepController.cxx. Referenced by instance(). |