Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TextDataRep Class Reference

#include <TextDataRep.h>

Inheritance diagram for TextDataRep:

Inheritance graph
[legend]
Collaboration diagram for TextDataRep:

Collaboration graph
[legend]
List of all members.

Detailed Description

Displays data in textual representation.

Can be used to display a few numbers from the projector of another DataRep object in conjunction with a derived class of TextRepBase. Can also be used as a stand a lone display for a few numbers or a table showing the values in NTuple.

Bug:
After putting function parameters on a plot with functions, 33% of CPU time is used in X.
It doesn't matter if the text is selected or not. One can see it by the mouse flicking when over the text area.

Bug:
@@ Text display could get hidden behind non-transparent plot.

Requests:
@ The TextDataRep view should always be locked to it's target.

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

Definition at line 37 of file TextDataRep.h.

Public Types

typedef void(hippodraw::Observer::* Action )(const Observable *)
 The member function of the Observer that is called.
typedef std::list< hippodraw::Observer * > ObserverList_t
 The type of STL container to maintain list of Observer objects.

Public Member Functions

virtual bool acceptFunction (int number)
 Returns true if the DataRep accepts functions on number variables.
void addObserver (hippodraw::Observer *)
 Adds an Observer to the Observer list.
virtual void addValues (const std::vector< double > &v)
 Add the data values to the DataRep.
virtual DataRepclone ()
 The clone function returns an object of its own kind which is a copy of this object at this moment.
NTuplecreateNTuple () const
 Returns a new DataSource representation of the receiving object.
virtual void drawProjectedValues (TransformBase *transform, ViewBase *view)
 Overrides the base class implementation to draw the values based on the target DataRep.
RepBasegetCutRep ()
 Returns the point representation that draws the cuts.
const std::vector< TupleCut > & getCuts () const
 Returns a reference to the cut list.
virtual double getMean (const std::string &axis)
 Returns the mean.
virtual NTuplegetNTupleAfterCuts () const
 Returns the full NTuple but with the current set of cuts applied.
int getNumberOfEntries () const
 Returns the number of entries used for the DataRep object.
const ObserverList_tgetObservers () const
 Returns the list of observers.
virtual DataRepgetParentDataRep ()
 Gets the parent DataRep.
double getPosRange (hippodraw::Axes::Type axis)
 Returns the smallest positive number from in the range of the data.
virtual const DataSourcegetProjectedValues () const
 Returns an ntuple representation of the projected data.
virtual ProjectorBasegetProjector () const
 Returns the Projector object controlling the data.
const ColorgetRepColor () const
 Returns the color used for the representation.
RepBasegetRepresentation () const
 Returns the representation used to draw the data points.
virtual double getRMS (const std::string &axis)
 Returns the RMS.
virtual ProjectorBasegetTargetProjector ()
 Returns the ProjectorBase object from the target DataRep.
const std::stringgetTitle () const
 Returns the the current title of the object.
virtual bool hasAxis (hippodraw::Axes::Type) const
 Returns true if the data representation has specified axis type axis.
bool hasCut () const
 Returns true if the receiving object has one or more cuts.
virtual bool hasErrorDisplay () const
 Returns true if the data representation is capable of error display on the data values.
virtual bool hasNTupleBindings () const
 Returns false as this class does not have NTuple bindings.
virtual bool hasZeroRows ()
 Returns true if this DataRep has zero rows in its DataSource.
virtual bool hasZoomY () const
 Returns true if this DataRep has zoom feature on the Y axis.
bool isAxisBinned (hippodraw::Axes::Type axis) const
 Returns true if the specified axis is binned, otherwise returns false.
bool isDirty () const
 Return true if the data representation has changed is some way and it needs to be re-drawn.
bool isErrorDisplayed (hippodraw::Axes::Type) const
 Returns true if the error bars are being displayed.
virtual bool isSelected () const
 Returns true if data representation is in selected state.
virtual bool isTargetable () const
 Returns false.
virtual void matrixTranspose (bool yes)
 Transposes the X and Y axis.
const std::stringname () const
 Returns the name of the display.
virtual bool needColorRep () const
 Determines if extra space is needed for a color rep.
virtual void normalizeTo (const DataRep *target)
 Normalizes the receiving object to the target one.
virtual void notifyObservers () const
 Notifies Observer objects of a change.
Range preferredRange (hippodraw::Axes::Type axis)
 Returns the preferred range to display the data.
void removeObserver (hippodraw::Observer *)
 Removes an Observer from the Observer list.
virtual void setAxisBinding (const std::string &axis, const std::string &label)
 Sets the axis binding.
virtual void setAxisBindings (const std::vector< std::string > &bindings)
 Sets the axis bindings.
void setAxisModel (hippodraw::Axes::Type axis, AxisModelBase *)
 Sets the AxisModel for axis axis.
void setBinWidth (hippodraw::Axes::Type axis, double width)
 Sets the bin width, if binned, on specified axis to width.
void setCutRangeAt (const Range &range, unsigned int i)
 Sets the Range of the TupleCut index by i.
void setCutRep (RepBase *rep)
 Replaces existing point representation with a new one.
virtual void setDirty (bool yes=true)
 Sets the dirty flag.
void setEnabled (unsigned int i, bool yes=true)
 Sets the TupleCut indexed by i to be enabled or not.
void setErrorDisplay (hippodraw::Axes::Type axis, bool)
 Sets the display of error bar, if applicable, on the specified axis.
virtual void setParentDataRep (DataRep *parent_datarep)
 Sets the parent DataRep.
void setRange (hippodraw::Axes::Type axis, bool const_width=true)
 Sets the range of the axis.
void setRepColor (const Color &)
 Sets the color of the data representation.
virtual void setRepresentation (RepBase *pointrep)
 Sets the representation of the data points.
void setRepSize (float size)
 Sets the size of the representation.
void setRepStyle (int style)
 Sets the style type of the point representation.
virtual void setSelected (bool yes=true)
 Sets the data representation as selected.
void setTitle (const std::string &title)
 Sets the title.
 TextDataRep ()
 The default constructor.
 TextDataRep (RepBase *rep)
 A constructor taking the target DataRep and RepBase as arguments.
void toggleInverted (unsigned int i)
 Changes state of inversion flag to be the opposite of its current state.
virtual void update ()
 Updates the data representation.
virtual void update (const Observable *)
 Responds to update message from the data source.
virtual void willDelete (const Observable *)
 Notifies this Observer object that one of its Observable objects is about to be deleted.

Protected Types

typedef std::vector< TupleCutCutList_t
 The type of container for TupleCut objects.

Protected Member Functions

void drawCuts (TransformBase *transform, ViewBase *view)
 Draws the cuts.
void notifyObservers (Action action) const
 An internal method to iterate over all observers and to send the message action.
void throwRangeException ()
 Throws exception with message saying argument is out of range.

Protected Attributes

CutList_t m_cut_list
 A list of cut objects used to highlight region of the data representation.
RepBasem_cut_rep
 The point representation of the cut or range.
std::string m_name
 The name of the display as it might be displayed in a GUI.
DataRepm_parent_datarep
 There are times when a given DataRep results from some operations performed on some other DataRep.
ProjectorBasem_projector
 A projector used to transform data to projected values that will be plotted.
RepBasem_rep
 The representation used for drawing each data point in the view.
std::string m_title
 The title of the object.

Private Member Functions

 TextDataRep (const TextDataRep &)
 The copy constructor.


Member Typedef Documentation

typedef void( hippodraw::Observer::* Observable::Action)(const Observable *) [inherited]
 

The member function of the Observer that is called.

Definition at line 83 of file Observable.h.

typedef std::vector< TupleCut > DataRep::CutList_t [protected, inherited]
 

The type of container for TupleCut objects.

Definition at line 98 of file DataRep.h.

typedef std::list< hippodraw::Observer * > Observable::ObserverList_t [inherited]
 

The type of STL container to maintain list of Observer objects.

Definition at line 46 of file Observable.h.


Constructor & Destructor Documentation

TextDataRep::TextDataRep const TextDataRep  )  [private]
 

The copy constructor.

The copy constructor is private, so the public clone() function should be used to make a copy.

Definition at line 39 of file TextDataRep.cxx.

TextDataRep::TextDataRep RepBase rep  ) 
 

A constructor taking the target DataRep and RepBase as arguments.

The target is the DataRep object containing the source of the information to be displayed.

Definition at line 24 of file TextDataRep.cxx.

References DataRep::m_name, and DataRep::m_rep.

TextDataRep::TextDataRep  ) 
 

The default constructor.

Definition at line 31 of file TextDataRep.cxx.

References DataRep::m_name, and DataRep::m_rep.

Referenced by clone().


Member Function Documentation

bool DataRep::acceptFunction int  number  )  [virtual, inherited]
 

Returns true if the DataRep accepts functions on number variables.

The default implementation returns false. Derived class should re-implement this member function if they accept functions of specified number of variables.

Reimplemented in DyHistogram, ZPlot, ProfileHist, ScatterPlot, St1DHistogram, St2DHistogram, StripChart, XYPlot, YPlot, and ZPlot.

Definition at line 294 of file DataRep.cxx.

Referenced by Inspector::functionAdd().

void Observable::addObserver hippodraw::Observer  )  [inherited]
 

Adds an Observer to the Observer list.

Definition at line 49 of file Observable.cxx.

References Observable::m_list.

Referenced by CutPlotter::addCutTarget(), XyPlotter::addDataRep(), FunctionRep::FunctionRep(), BinningProjector::normalizeTo(), DataRepController::setAxisBindings(), DisplayController::setNTuple(), CutPlotter::setNTuple(), and TextPlotter::setParentDataRep().

void DataRep::addValues const std::vector< double > &  v  )  [virtual, inherited]
 

Add the data values to the DataRep.

This virtual method is provided as a convenience for those derived classes that respond to it. Nothing is done if this object has NTuple bindings. Otherwise the message is forward to its ProjectorBase object.

Definition at line 316 of file DataRep.cxx.

References DataRep::hasNTupleBindings(), and DataRep::m_projector.

Referenced by CompositePlotter::addValues().

DataRep * TextDataRep::clone  )  [virtual]
 

The clone function returns an object of its own kind which is a copy of this object at this moment.

Implements DataRep.

Definition at line 44 of file TextDataRep.cxx.

References TextDataRep().

NTuple * DataRep::createNTuple  )  const [inherited]
 

Returns a new DataSource representation of the receiving object.

The possession of the NTuple is taken by the calling object.

Definition at line 398 of file DataRep.cxx.

References DataRep::m_projector, and ProjectorBase::prepareValues().

void DataRep::drawCuts TransformBase transform,
ViewBase view
[protected, inherited]
 

Draws the cuts.

If there are cuts, draws them.

Definition at line 279 of file DataRep.cxx.

References DataRep::m_cut_list, DataRep::m_cut_rep, DataRep::m_projector, hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by DataRep::drawProjectedValues().

void TextDataRep::drawProjectedValues TransformBase transform,
ViewBase view
[virtual]
 

Overrides the base class implementation to draw the values based on the target DataRep.

Reimplemented from DataRep.

Definition at line 71 of file TextDataRep.cxx.

References getTargetProjector(), and DataRep::m_rep.

Referenced by TextPlotter::drawIn().

RepBase * DataRep::getCutRep  )  [inherited]
 

Returns the point representation that draws the cuts.

Definition at line 491 of file DataRep.cxx.

References DataRep::m_cut_rep.

const DataRep::CutList_t & DataRep::getCuts  )  const [inherited]
 

Returns a reference to the cut list.

Definition at line 442 of file DataRep.cxx.

References DataRep::m_cut_list.

Referenced by CompositePlotter::fillCutList().

double DataRep::getMean const std::string axis  )  [virtual, inherited]
 

Returns the mean.

Returns the mean data points along the axis axis.

Definition at line 332 of file DataRep.cxx.

References hippodraw::Axes::convert(), DataRep::m_projector, and num_util::type().

NTuple * DataRep::getNTupleAfterCuts  )  const [virtual, inherited]
 

Returns the full NTuple but with the current set of cuts applied.

Definition at line 325 of file DataRep.cxx.

References ProjectorBase::getNTupleAfterCuts(), and DataRep::m_projector.

Referenced by PyDataRep::getNTupleWithCuts().

int DataRep::getNumberOfEntries  )  const [inherited]
 

Returns the number of entries used for the DataRep object.

Definition at line 384 of file DataRep.cxx.

References DataRep::m_projector.

const Observable::ObserverList_t & Observable::getObservers  )  const [inherited]
 

Returns the list of observers.

Definition at line 57 of file Observable.cxx.

References Observable::m_list.

DataRep * DataRep::getParentDataRep  )  [virtual, inherited]
 

Gets the parent DataRep.

Definition at line 75 of file DataRep.cxx.

References DataRep::m_parent_datarep.

Referenced by getTargetProjector().

double DataRep::getPosRange hippodraw::Axes::Type  axis  )  [inherited]
 

Returns the smallest positive number from in the range of the data.

Definition at line 166 of file DataRep.cxx.

References ProjectorBase::getPosOn(), and DataRep::m_projector.

const DataSource * DataRep::getProjectedValues  )  const [virtual, inherited]
 

Returns an ntuple representation of the projected data.

Definition at line 259 of file DataRep.cxx.

References DataRep::m_projector, and ProjectorBase::prepareValues().

Referenced by DataRep::drawProjectedValues(), FunctionRep::FunctionRep(), FunctionRep::willDelete(), and FunctionRep::~FunctionRep().

ProjectorBase * DataRep::getProjector  )  const [virtual, inherited]
 

Returns the Projector object controlling the data.

Definition at line 135 of file DataRep.cxx.

References DataRep::m_projector.

Referenced by CompositePlotter::activeProjector(), DataRepController::bindingOptions(), CutController::connectDataRep(), Inspector::contourLevelsTextBox_returnPressed(), DataRepXML::createChildren(), DataRepXML::createDataRep(), FunctionController::createNTuple(), DataRepXML::createObject(), FunctionRep::FunctionRep(), DisplayController::getBindingProjector(), PyDataRep::getBinWidth(), FunctionController::getCovarianceMatrix(), DisplayController::getDataSourceLabels(), DisplayController::getDataSourceName(), FunctionController::getDegreesOfFreedom(), DisplayController::getNTuple(), FunctionController::getObjectiveValue(), DisplayController::getProjector(), CompositePlotter::getProjector(), getTargetProjector(), CompositePlotter::getZValue(), FunctionRep::initializeWith(), CutController::linkCutAndRep(), DataRep::normalizeTo(), PyDataRep::numberOfEntries(), CompositePlotter::processReturnValue(), CutPlotter::removeFromTarget(), CutPlotter::setAxisBinding(), DataRepController::setAxisBindings(), DisplayController::setBinner(), QtDisplay::setContourLevels(), FunctionRep::setCutRange(), and CutPlotter::setNTuple().

const Color & DataRep::getRepColor  )  const [inherited]
 

Returns the color used for the representation.

Definition at line 252 of file DataRep.cxx.

References RepBase::color(), and DataRep::m_rep.

Referenced by TextPlotter::repColor(), and CompositePlotter::repColor().

RepBase * DataRep::getRepresentation  )  const [inherited]
 

Returns the representation used to draw the data points.

Definition at line 231 of file DataRep.cxx.

References DataRep::m_rep.

Referenced by Inspector::contourLevelsTextBox_returnPressed(), Inspector::contourRadioButton1_toggled(), Inspector::contourSlider_valueChanged(), Inspector::contourTextBox_returnPressed(), DataRepXML::createChildren(), TextPlotter::representation(), CompositePlotter::representation(), and Inspector::updatePlotTab().

double DataRep::getRMS const std::string axis  )  [virtual, inherited]
 

Returns the RMS.

Returns the root mean square of the data points along the axis axis.

Definition at line 341 of file DataRep.cxx.

References hippodraw::Axes::convert(), DataRep::m_projector, and num_util::type().

ProjectorBase * TextDataRep::getTargetProjector  )  [virtual]
 

Returns the ProjectorBase object from the target DataRep.

Definition at line 56 of file TextDataRep.cxx.

References DataRep::getParentDataRep(), and DataRep::getProjector().

Referenced by drawProjectedValues().

const std::string & DataRep::getTitle  )  const [inherited]
 

Returns the the current title of the object.

Definition at line 416 of file DataRep.cxx.

References DataRep::m_projector, and DataRep::m_title.

bool TextDataRep::hasAxis hippodraw::Axes::Type   )  const [virtual]
 

Returns true if the data representation has specified axis type axis.

Note:
This member function pure virtual to avoid problems with the SIP based Python extension module. It throws an assertion if called.

Reimplemented from DataRep.

Definition at line 97 of file TextDataRep.cxx.

bool DataRep::hasCut  )  const [inherited]
 

Returns true if the receiving object has one or more cuts.

Definition at line 449 of file DataRep.cxx.

References DataRep::m_cut_list.

bool DataRep::hasErrorDisplay  )  const [virtual, inherited]
 

Returns true if the data representation is capable of error display on the data values.

The implementation in this base class returns false. This member function should be overridden by derived classes capable of displaying errors on the data points.

Reimplemented in DyHistogram, ProfileHist, St1DHistogram, and XYPlot.

Definition at line 87 of file DataRep.cxx.

bool TextDataRep::hasNTupleBindings  )  const [virtual]
 

Returns false as this class does not have NTuple bindings.

Reimplemented from DataRep.

Definition at line 49 of file TextDataRep.cxx.

bool DataRep::hasZeroRows  )  [virtual, inherited]
 

Returns true if this DataRep has zero rows in its DataSource.

Returns false if the projector is not an NTupleProjector.

Definition at line 299 of file DataRep.cxx.

References ProjectorBase::isEmpty(), and DataRep::m_projector.

Referenced by DisplayController::addDataRep(), CompositePlotter::autoScale(), CompositePlotter::autoScaleZ(), and Inspector::updateDataCutsTab().

bool DataRep::hasZoomY  )  const [virtual, inherited]
 

Returns true if this DataRep has zoom feature on the Y axis.

Reimplemented in ContourPlot, and ScatterPlot.

Definition at line 309 of file DataRep.cxx.

bool DataRep::isAxisBinned hippodraw::Axes::Type  axis  )  const [inherited]
 

Returns true if the specified axis is binned, otherwise returns false.

Definition at line 350 of file DataRep.cxx.

References DataRep::m_projector, hippodraw::Axes::X, and hippodraw::Axes::Y.

bool DataRep::isDirty  )  const [inherited]
 

Return true if the data representation has changed is some way and it needs to be re-drawn.

Definition at line 159 of file DataRep.cxx.

References ProjectorBase::isDirty(), and DataRep::m_projector.

bool DataRep::isErrorDisplayed hippodraw::Axes::Type   )  const [inherited]
 

Returns true if the error bars are being displayed.

Definition at line 195 of file DataRep.cxx.

References DataRep::m_rep, hippodraw::Axes::X, RepBase::xError(), hippodraw::Axes::Y, and RepBase::yError().

Referenced by CompositePlotter::errorDisplay().

bool DataRep::isSelected  )  const [virtual, inherited]
 

Returns true if data representation is in selected state.

See also:
setSelected

Definition at line 154 of file DataRep.cxx.

References RepBase::isSelected(), and DataRep::m_rep.

bool TextDataRep::isTargetable  )  const [virtual]
 

Returns false.

A TextDataRep is not meant to be target of another data representation.

Reimplemented from DataRep.

Definition at line 88 of file TextDataRep.cxx.

void DataRep::matrixTranspose bool  yes  )  [virtual, inherited]
 

Transposes the X and Y axis.

If internal representation of the X-Y matrix is represented by a vector with shape, then transpose the X and Y axis. Otherwise do nothing.

Note:
The implementation passes the request to the contained projector.

Definition at line 118 of file DataRep.cxx.

References DataRep::m_projector.

Referenced by CompositePlotter::matrixTranspose().

const string & DataRep::name  )  const [inherited]
 

Returns the name of the display.

See m_name.

Definition at line 69 of file DataRep.cxx.

References DataRep::m_name.

Referenced by DataRepXML::createElement(), FunctionRep::getFitterName(), DisplayController::getType(), XYPlot::hasErrorDisplay(), PlotTable::initialize(), PyDataRep::name(), XYPlot::setRepresentation(), DyHistogram::setRepresentation(), and PyDataRep::setWeight().

bool DataRep::needColorRep  )  const [virtual, inherited]
 

Determines if extra space is needed for a color rep.

Deprecated:
Use hasAxis() instead.

Definition at line 427 of file DataRep.cxx.

References DataRep::hasAxis(), and hippodraw::Axes::Z.

void DataRep::normalizeTo const DataRep target  )  [virtual, inherited]
 

Normalizes the receiving object to the target one.

Definition at line 368 of file DataRep.cxx.

References DataRep::getProjector(), and DataRep::m_projector.

void Observable::notifyObservers Action  action  )  const [protected, inherited]
 

An internal method to iterate over all observers and to send the message action.

Definition at line 69 of file Observable.cxx.

References std::bind2nd(), std::for_each(), Observable::m_list, and std::mem_fun().

void Observable::notifyObservers  )  const [virtual, inherited]
 

Notifies Observer objects of a change.

If interval counting is disabled, then Observer::Update is sent immediately. If interval counting is enabled, then the current count is incremented. If the current count is equal to the interval count, then the Observer::update message is sent and the current count reset to 0.

Reimplemented in NTuple, FitsNTuple, RootNTuple, NumArrayTuple, ListTuple, and RootNTuple.

Definition at line 90 of file Observable.cxx.

References hippodraw::Observer::update().

Referenced by XyPlotter::addDataRep(), XyPlotter::addDataRepStacked(), FunctionController::addFunctionRep(), RTuple::addRow(), StHist2DProjector::addValues(), StHist1DProjector::addValues(), XyPlotter::autoScale(), Inspector::contourLevelsTextBox_returnPressed(), Inspector::contourSlider_valueChanged(), Inspector::contourTextBox_returnPressed(), FunctionRep::fitFunction(), NumArrayTuple::notifyObservers(), NTuple::notifyObservers(), ListTuple::notifyObservers(), RootNTuple::notifyObservers(), FitsNTuple::notifyObservers(), XyPlotter::removeDataRep(), FunctionRep::restoreParameters(), CutPlotter::setActive(), XyPlotter::setAutoRanging(), QtDisplay::setContourLevels(), CutPlotter::setCutColor(), XyPlotter::setCutEnabled(), XyPlotter::setCutInverted(), XyPlotter::setCutRangeAt(), ProjectorBase::setDirty(), DataRep::setErrorDisplay(), XyPlotter::setHighRange(), XyPlotter::setLabel(), PlotterBase::setLabel(), DataSource::setLabelAt(), DataSource::setLabels(), XyPlotter::setLowRange(), DataSource::setName(), DisplayController::setNTuple(), FunctionRep::setParameters(), DataRep::setRepColor(), DyHistogram::setRepresentation(), DataRep::setRepresentation(), DataRep::setRepSize(), DataRep::setRepStyle(), XyPlotter::setScaling(), PlotterBase::setTitle(), DataSource::setTitle(), XyPlotter::setTransform(), XyPlotter::setValueRep(), PlotterBase::update(), NTupleProjector::update(), DataRep::update(), CutPlotter::update(), BinningProjector::update(), CutPlotter::updateTargets(), DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple().

Range DataRep::preferredRange hippodraw::Axes::Type  axis  )  [inherited]
 

Returns the preferred range to display the data.

Todo:
In asking for the preferred Range, should also tell binning projectors to reset the number of bins so that auto ranging will lead to same results as when plot was initially created.

Definition at line 173 of file DataRep.cxx.

References DataRep::m_projector, and ProjectorBase::preferredRange().

Referenced by CompositePlotter::autoScale(), and CompositePlotter::autoScaleZ().

void Observable::removeObserver hippodraw::Observer  )  [inherited]
 

Removes an Observer from the Observer list.

Definition at line 63 of file Observable.cxx.

References Observable::m_list.

Referenced by BinningProjector::normalizeTo(), CutPlotter::removeFromTarget(), DisplayController::removeTextObservers(), NTupleProjector::setNTuple(), FunctionRep::willDelete(), FunctionRep::~FunctionRep(), and NTupleProjector::~NTupleProjector().

void DataRep::setAxisBinding const std::string axis,
const std::string label
[virtual, inherited]
 

Sets the axis binding.

Sets binding of the axis with name axis to the NTuple column with label label. If the derived class does not have NTuple bindings, then does nothing. Derived classes may also do further processing upon reception of this method.

Reimplemented in XYPlot.

Definition at line 99 of file DataRep.cxx.

References DataRep::hasNTupleBindings(), and DataRep::m_projector.

Referenced by XYPlot::setAxisBinding(), PyDataRep::setAxisBinding(), and PyDataRep::setWeight().

void DataRep::setAxisBindings const std::vector< std::string > &  bindings  )  [virtual, inherited]
 

Sets the axis bindings.

Sets the binding of all axis to the NTuple column with the labels in the vector. If the derived class does not have NTuple bindings, then does nothing. Derived classes may also do further processing upon reception of this method.

Reimplemented in XYPlot.

Definition at line 109 of file DataRep.cxx.

References DataRep::hasNTupleBindings(), and DataRep::m_projector.

Referenced by XYPlot::setAxisBindings(), PyDataRep::setAxisBindings(), and DataRepController::setAxisBindings().

void DataRep::setAxisModel hippodraw::Axes::Type  axis,
AxisModelBase
[inherited]
 

Sets the AxisModel for axis axis.

Definition at line 142 of file DataRep.cxx.

References DataRep::m_projector, and ProjectorBase::setAxisModel().

Referenced by CompositePlotter::addDataRep().

void DataRep::setBinWidth hippodraw::Axes::Type  axis,
double  width
[inherited]
 

Sets the bin width, if binned, on specified axis to width.

Definition at line 377 of file DataRep.cxx.

References DataRep::m_projector.

void DataRep::setCutRangeAt const Range range,
unsigned int  i
[inherited]
 

Sets the Range of the TupleCut index by i.

Definition at line 464 of file DataRep.cxx.

References DataRep::m_cut_list, and DataRep::throwRangeException().

void DataRep::setCutRep RepBase rep  )  [inherited]
 

Replaces existing point representation with a new one.

Definition at line 498 of file DataRep.cxx.

References DataRep::m_cut_rep.

void DataRep::setDirty bool  yes = true  )  [virtual, inherited]
 

Sets the dirty flag.

When set, the display may need to reinitialize itself before the next drawing.

Definition at line 130 of file DataRep.cxx.

References DataRep::m_projector, and ProjectorBase::setDirty().

Referenced by CutController::linkCutAndRep(), DataRep::update(), and CutPlotter::updateTargets().

void DataRep::setEnabled unsigned int  i,
bool  yes = true
[inherited]
 

Sets the TupleCut indexed by i to be enabled or not.

Definition at line 482 of file DataRep.cxx.

References DataRep::m_cut_list, and DataRep::throwRangeException().

Referenced by Inspector::updateFunctionsTab().

void DataRep::setErrorDisplay hippodraw::Axes::Type  axis,
bool 
[inherited]
 

Sets the display of error bar, if applicable, on the specified axis.

Definition at line 180 of file DataRep.cxx.

References DataRep::m_rep, Observable::notifyObservers(), RepBase::setErrorOn(), hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by ProfileHist::ProfileHist(), XYPlot::setAxisBinding(), XYPlot::setAxisBindings(), PyDataRep::setErrorDisplay(), CompositePlotter::setErrorDisplay(), XYPlot::setRepresentation(), and DyHistogram::setRepresentation().

void DataRep::setParentDataRep DataRep parent_datarep  )  [virtual, inherited]
 

Sets the parent DataRep.

Definition at line 81 of file DataRep.cxx.

References DataRep::m_parent_datarep.

Referenced by TextPlotter::willDelete().

void DataRep::setRange hippodraw::Axes::Type  axis,
bool  const_width = true
[inherited]
 

Sets the range of the axis.

The optional const_width parameter if true, tells binning projectors to hold a constant bin width parameter.

Definition at line 210 of file DataRep.cxx.

References DataRep::m_projector, and ProjectorBase::setRange().

Referenced by CompositePlotter::autoScale(), and CompositePlotter::autoScaleZ().

void DataRep::setRepColor const Color color  )  [inherited]
 

Sets the color of the data representation.

Bug:
Should this setDirty() insead?

Definition at line 238 of file DataRep.cxx.

References DataRep::m_rep, Observable::notifyObservers(), and RepBase::setColor().

Referenced by TextPlotter::setRepColor(), and CompositePlotter::setRepColor().

void DataRep::setRepresentation RepBase pointrep  )  [virtual, inherited]
 

Sets the representation of the data points.

The pointrep replaces the existing one, and the existing one is then destroyed. Maybe be overridden in derive class to do additional processing.

Reimplemented in DyHistogram, XYPlot, and XYZPlot.

Definition at line 215 of file DataRep.cxx.

References DataRep::m_rep, and Observable::notifyObservers().

Referenced by DataRepXML::createObject(), PyDataRep::setPointRep(), XYPlot::setRepresentation(), TextPlotter::setRepresentation(), DyHistogram::setRepresentation(), and CompositePlotter::setRepresentation().

void DataRep::setRepSize float  size  )  [inherited]
 

Sets the size of the representation.

Definition at line 123 of file DataRep.cxx.

References DataRep::m_rep, Observable::notifyObservers(), and RepBase::setSize().

Referenced by DisplayController::setRepSize(), and Inspector::symbolPointSize_returnPressed().

void DataRep::setRepStyle int  style  )  [inherited]
 

Sets the style type of the point representation.

Definition at line 245 of file DataRep.cxx.

References DataRep::m_rep, Observable::notifyObservers(), and RepBase::setStyle().

Referenced by PyDataRep::setLineStyle().

void DataRep::setSelected bool  yes = true  )  [virtual, inherited]
 

Sets the data representation as selected.

Selection means the representations is drawn in its normal color, If representation is not selected, then it draws in a lighter shade.

Definition at line 147 of file DataRep.cxx.

References DataRep::m_rep, and RepBase::setSelected().

void DataRep::setTitle const std::string title  )  [inherited]
 

Sets the title.

Sets the title of the object. A title might be used to annotate the display of the object. Setting the title to the string "%t" has the meaning of setting the object's default title. The default title is the one returned by ProjectorBase::getTitle().

Definition at line 409 of file DataRep.cxx.

References DataRep::m_title.

void DataRep::throwRangeException  )  [protected, inherited]
 

Throws exception with message saying argument is out of range.

Definition at line 456 of file DataRep.cxx.

Referenced by DataRep::setCutRangeAt(), DataRep::setEnabled(), and DataRep::toggleInverted().

void DataRep::toggleInverted unsigned int  i  )  [inherited]
 

Changes state of inversion flag to be the opposite of its current state.

Definition at line 473 of file DataRep.cxx.

References DataRep::m_cut_list, and DataRep::throwRangeException().

void DataRep::update  )  [virtual, inherited]
 

Updates the data representation.

Updates the data representation, however, derived classes are allowed to be lazy and not do the actual update until needed by drawProjectedValues.

Definition at line 361 of file DataRep.cxx.

References DataRep::m_projector, and DataRep::setDirty().

Referenced by FunctionRep::update().

void DataRep::update const Observable  )  [virtual, inherited]
 

Responds to update message from the data source.

Implements hippodraw::Observer.

Reimplemented in FunctionRep, and FunctionRep.

Definition at line 64 of file DataRep.cxx.

References Observable::notifyObservers().

void hippodraw::Observer::willDelete const Observable  )  [virtual, inherited]
 

Notifies this Observer object that one of its Observable objects is about to be deleted.

Since most Observable objects are owned by its Observer, it is the Observer that issued the delete. Thus the default implementation here does nothing. Derived classes that observe objects owned by another should implement this method to remove the Observable from the list they are observing.

Reimplemented in FunctionRep, DataSourceController, CutPlotter, TextPlotter, BinningProjector, DyHist1DProjector, DyHist2DProjector, NTupleProjector, Profile2DProjector, and ProfileProjector.

Definition at line 25 of file Observer.cxx.

Referenced by DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple().


Member Data Documentation

CutList_t DataRep::m_cut_list [protected, inherited]
 

A list of cut objects used to highlight region of the data representation.

Definition at line 103 of file DataRep.h.

Referenced by DataRep::drawCuts(), FunctionRep::FunctionRep(), DataRep::getCuts(), DataRep::hasCut(), FunctionRep::setCutRange(), DataRep::setCutRangeAt(), DataRep::setEnabled(), and DataRep::toggleInverted().

RepBase* DataRep::m_cut_rep [protected, inherited]
 

The point representation of the cut or range.

Definition at line 94 of file DataRep.h.

Referenced by DataRep::DataRep(), DataRep::drawCuts(), DataRep::getCutRep(), DataRep::setCutRep(), and DataRep::~DataRep().

std::string DataRep::m_name [protected, inherited]
 

The name of the display as it might be displayed in a GUI.

For example, the name might be "Histogram" or "ScatterPlot".

Definition at line 67 of file DataRep.h.

Referenced by ColorPlot::ColorPlot(), ContourPlot::ContourPlot(), DyHistogram::DyHistogram(), FunctionRep::FunctionRep(), LineDataRep::LineDataRep(), DataRep::name(), Profile2D::Profile2D(), ProfileContour::ProfileContour(), ProfileHist::ProfileHist(), ScatterPlot::ScatterPlot(), St1DHistogram::St1DHistogram(), St2DHistogram::St2DHistogram(), StripChart::StripChart(), TextDataRep(), XYPlot::XYPlot(), XYZPlot::XYZPlot(), YPlot::YPlot(), and ZPlot::ZPlot().

DataRep* DataRep::m_parent_datarep [protected, inherited]
 

There are times when a given DataRep results from some operations performed on some other DataRep.

The following variable contains pointer to the original data rep

Definition at line 90 of file DataRep.h.

Referenced by DataRep::DataRep(), DataRep::getParentDataRep(), and DataRep::setParentDataRep().

ProjectorBase* DataRep::m_projector [protected, inherited]
 

A projector used to transform data to projected values that will be plotted.

A display may have multiple projectors that make up its composite display. This data member points to the one that should receive messages from the display. Projectors are owned by the plotters that use them, and the projectors are responsible for deleting the plotters.

Definition at line 81 of file DataRep.h.

Referenced by DataRep::addValues(), ColorPlot::ColorPlot(), ContourPlot::ContourPlot(), DataRep::createNTuple(), DataRep::DataRep(), DataRep::drawCuts(), DyHistogram::DyHistogram(), FunctionRep::fitFunction(), FunctionRep::FunctionRep(), FunctionRep::getFitter(), FunctionRep::getFunction(), DataRep::getMean(), DataRep::getNTupleAfterCuts(), DataRep::getNumberOfEntries(), DataRep::getPosRange(), DataRep::getProjectedValues(), DataRep::getProjector(), DataRep::getRMS(), DataRep::getTitle(), XYPlot::hasErrorDisplay(), DataRep::hasZeroRows(), FunctionRep::initializeWith(), DataRep::isAxisBinned(), DataRep::isDirty(), LineDataRep::LineDataRep(), DataRep::matrixTranspose(), DataRep::normalizeTo(), DataRep::preferredRange(), FunctionRep::principleErrors(), Profile2D::Profile2D(), ProfileContour::ProfileContour(), ProfileHist::ProfileHist(), FunctionRep::restoreParameters(), FunctionRep::saveParameters(), ScatterPlot::ScatterPlot(), XYPlot::setAxisBinding(), DataRep::setAxisBinding(), XYPlot::setAxisBindings(), DataRep::setAxisBindings(), DataRep::setAxisModel(), St2DHistogram::setBinContents(), St1DHistogram::setBinContents(), DataRep::setBinWidth(), FunctionRep::setCutRange(), DataRep::setDirty(), FunctionRep::setFitter(), FunctionRep::setParameters(), DataRep::setRange(), XYPlot::setRepresentation(), LineDataRep::setValue(), St1DHistogram::St1DHistogram(), St2DHistogram::St2DHistogram(), StripChart::StripChart(), DataRep::update(), XYPlot::XYPlot(), XYZPlot::XYZPlot(), YPlot::YPlot(), ZPlot::ZPlot(), and DataRep::~DataRep().

RepBase* DataRep::m_rep [protected, inherited]
 

The representation used for drawing each data point in the view.

Definition at line 85 of file DataRep.h.

Referenced by ColorPlot::ColorPlot(), ContourPlot::ContourPlot(), DataRep::DataRep(), drawProjectedValues(), DataRep::drawProjectedValues(), DyHistogram::DyHistogram(), FunctionRep::FunctionRep(), DataRep::getRepColor(), DataRep::getRepresentation(), XYPlot::hasErrorDisplay(), DataRep::isErrorDisplayed(), DataRep::isSelected(), LineDataRep::LineDataRep(), Profile2D::Profile2D(), ProfileContour::ProfileContour(), ProfileHist::ProfileHist(), ScatterPlot::ScatterPlot(), DataRep::setErrorDisplay(), DataRep::setRepColor(), DataRep::setRepresentation(), DataRep::setRepSize(), DataRep::setRepStyle(), DataRep::setSelected(), St1DHistogram::St1DHistogram(), St2DHistogram::St2DHistogram(), StripChart::StripChart(), TextDataRep(), XYPlot::XYPlot(), XYZPlot::XYZPlot(), YPlot::YPlot(), ZPlot::ZPlot(), and DataRep::~DataRep().

std::string DataRep::m_title [protected, inherited]
 

The title of the object.

The title of the object that might be used to annotate the display of the object. For example, if bound to DataSource, then the title of the DataSource object.

Definition at line 73 of file DataRep.h.

Referenced by DataRep::getTitle(), and DataRep::setTitle().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3