Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
XYPlot Class Reference

Displays X Y pairs with or without error bars. More...

#include <XYPlot.h>

Inheritance diagram for XYPlot:
Inheritance graph
[legend]
Collaboration diagram for XYPlot:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

bool acceptFunction (int num)
 Returns true if the DataRep accepts functions on number variables.
void addCut (const TupleCut &cut)
 Adds a cut to the data representation.
void addCut ()
 Adds a cut to the data representation.
void addObserver (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 NTuple representation of the receiving object.
NTuplecreateNTupleUnderRegion () const
 Returns a NTuple that is a copy of the projector's DataSource with rows not passing region cuts removed.
virtual void drawProjectedValues (TransformBase *transform, ViewBase *view)
 Draws the projected values.
virtual void fillColumnAfterCuts (const std::string &column, std::vector< double > &columnData) const
 Fills a vector with named column data with the current set of cuts applied.
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 () const
 Gets the parent DataRep.
double getPosRange (Axes::Type axis)
 Returns the smallest positive number from in the range of the data.
virtual const DataSourcegetProjectedValues () const
 Returns an DataSource 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.
const std::string & getTitle () 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 regional cuts.
virtual bool hasErrorDisplay () const
 Returns true.
virtual bool hasNTupleBindings () const
 Returns true if the DataRep's projector can bind to DataSource.
virtual bool hasZeroRows ()
 Returns true if this DataRep has zero rows in its DataSource.
virtual bool hasZoomY () const
 Returns true to allow zooming on Y asis.
bool isAxisBinned (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 (Axes::Type) const
 Returns true if the error bars are being displayed.
virtual bool isImageConvertable () const
 Returns true if the receiving object can be converted to an image.
virtual bool isSelected () const
 Returns true if data representation is in selected state.
virtual bool isTargetable () const
 Returns true if the receiving object is target-able.
virtual void matrixTranspose (bool yes)
 Transposes the X and Y axis.
const std::string & name () const
 Returns the name of the display.
virtual bool needColorRep () const
 Determines if extra space is needed for a color rep.
virtual bool needsMatrixSet () const
 Returns true if this data representation needs an XY matrix parameters to be set in order to display itself.
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 (Axes::Type axis) const
 Returns the preferred range to display the data.
void removeCut ()
 Remove a region cut on the data representation.
void removeObserver (Observer *)
 Removes an Observer from the Observer list.
void set (Color::Value value)
 Sets the Color of the PointRepBase object.
virtual void setAxisBinding (const std::string &axis, const std::string &label)
 Sets the axis bindings.
virtual void setAxisBindings (const std::vector< std::string > &bindings)
 Sets the axis bindings.
void setAxisModel (Axes::Type axis, AxisModelBase *)
 Sets the AxisModel for axis axis.
const RangesetBinWidth (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.
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 (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.
virtual void setPointRep (RepBase *pointrep)
 Sets the representation of the data points.
void setRange (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 *point_rep)
 Sets the point representation.
void setRepSize (double 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.
void toggleInverted (unsigned int i)
 Changes state of inversion flag to be the opposite of its current state.
virtual void update (const Observable *)
 Responds to update message from the data source.
virtual void update ()
 Updates the data representation.
virtual void willDelete (const Observable *)
 Notifies this Observer object that one of its Observable objects is about to be deleted.
 XYPlot ()
 The default constructor.

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

CutRangeRepm_cut_rep
 The representation of the cut or highlighted 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.

Detailed Description

Displays X Y pairs with or without error bars.

An example is shown below

xyplot.png
XYPlot data representation
Author
Stephane Bonneaud ganda.nosp@m.lf@s.nosp@m.lac.s.nosp@m.tanf.nosp@m.ord.e.nosp@m.du
Paul F. Kunz Paul_.nosp@m.Kunz.nosp@m.@slac.nosp@m..sta.nosp@m.nford.nosp@m..edu
Sanket B. Malde sanke.nosp@m.t@st.nosp@m.anfor.nosp@m.d.ed.nosp@m.u

Definition at line 31 of file XYPlot.h.

Member Typedef Documentation

typedef void( Observer::* Action)(const Observable *)
inherited

The member function of the Observer that is called.

Definition at line 86 of file Observable.h.

typedef std::list< Observer * > ObserverList_t
inherited

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

Definition at line 45 of file Observable.h.

Constructor & Destructor Documentation

XYPlot ( )

Member Function Documentation

bool acceptFunction ( int  number)
virtual

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 from DataRep.

Definition at line 67 of file XYPlot.cxx.

void addCut ( const TupleCut cut)
inherited

Adds a cut to the data representation.

Definition at line 464 of file DataRep.cxx.

References DataRep::addCut(), DataRep::m_cut_rep, and DataRep::setDirty().

void addCut ( )
inherited

Adds a cut to the data representation.

Definition at line 486 of file DataRep.cxx.

References DataRep::getProjector(), TupleCut::setColumn(), TupleCut::setLabel(), TupleCut::setRange(), and hippodraw::Axes::X.

Referenced by DataRep::addCut(), and FunctionRep::setCutRange().

void addObserver ( hippodraw::Observer observer)
inherited
void addValues ( const std::vector< double > &  v)
virtualinherited

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 DataSource bindings. Otherwise the message is forward to its ProjectorBase object.

Definition at line 321 of file DataRep.cxx.

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

Referenced by CompositePlotter::addValues().

DataRep * 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 40 of file XYPlot.cxx.

References XYPlot::XYPlot().

NTuple * createNTuple ( ) const
inherited

Returns a new NTuple representation of the receiving object.

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

Definition at line 419 of file DataRep.cxx.

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

NTuple * createNTupleUnderRegion ( ) const
inherited

Returns a NTuple that is a copy of the projector's DataSource with rows not passing region cuts removed.

Definition at line 344 of file DataRep.cxx.

References DataRep::getCuts(), DataRep::m_cut_rep, and DataRep::m_projector.

void drawCuts ( TransformBase transform,
ViewBase view 
)
protectedinherited
void drawProjectedValues ( TransformBase transform,
ViewBase view 
)
virtualinherited

Draws the projected values.

. Each of the Projected Value objects will be drawn in view after a coordinate transform represented by transform using its m_rep object. Uses its Projector object to access the projected values stored in a DataSource. Some DataRep object may be dependent on the projected value objects are returned in a certain order.

Reimplemented in CompositeFunctionRep, TextDataRep, FunctionRep1, and FunctionRep2.

Definition at line 280 of file DataRep.cxx.

References DataRep::drawCuts(), DataRep::getProjectedValues(), and DataRep::m_rep.

Referenced by DataRep::drawCuts().

void fillColumnAfterCuts ( const std::string &  column,
std::vector< double > &  columnData 
) const
virtualinherited

Fills a vector with named column data with the current set of cuts applied.

Definition at line 337 of file DataRep.cxx.

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

RepBase * getCutRep ( )
inherited

Returns the point representation that draws the cuts.

Definition at line 552 of file DataRep.cxx.

References DataRep::m_cut_rep.

const vector< TupleCut > & getCuts ( ) const
inherited

Returns a reference to the cut list.

Definition at line 505 of file DataRep.cxx.

References DataRep::m_cut_rep.

Referenced by DataRep::createNTupleUnderRegion(), CompositePlotter::fillCutList(), FunctionRep::setCutRange(), and FunctionRep::setTupleCut().

double getMean ( const std::string &  axis)
virtualinherited

Returns the mean.

Returns the mean data points along the axis axis.

Definition at line 353 of file DataRep.cxx.

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

NTuple * getNTupleAfterCuts ( ) const
virtualinherited

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

Definition at line 330 of file DataRep.cxx.

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

int getNumberOfEntries ( ) const
inherited

Returns the number of entries used for the DataRep object.

Definition at line 405 of file DataRep.cxx.

References DataRep::m_projector.

const Observable::ObserverList_t & getObservers ( ) const
inherited

Returns the list of observers.

Definition at line 60 of file Observable.cxx.

DataRep * getParentDataRep ( ) const
virtualinherited

Gets the parent DataRep.

Definition at line 78 of file DataRep.cxx.

References DataRep::m_parent_datarep.

Referenced by TextDataRep::getTargetProjector().

double getPosRange ( Axes::Type  axis)
inherited

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

Definition at line 172 of file DataRep.cxx.

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

const DataSource * getProjectedValues ( ) const
virtualinherited
ProjectorBase * getProjector ( ) const
virtualinherited
const Color & getRepColor ( ) const
inherited

Returns the color used for the representation.

Definition at line 263 of file DataRep.cxx.

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

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

RepBase * getRepresentation ( ) const
inherited
double getRMS ( const std::string &  axis)
virtualinherited

Returns the RMS.

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

Definition at line 362 of file DataRep.cxx.

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

const std::string & getTitle ( ) const
inherited

Returns the the current title of the object.

Definition at line 437 of file DataRep.cxx.

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

bool hasAxis ( hippodraw::Axes::Type  axis) 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 124 of file XYPlot.cxx.

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

bool hasCut ( ) const
inherited

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

Definition at line 514 of file DataRep.cxx.

References DataRep::m_cut_rep.

Referenced by FunctionRep::setTupleCut().

bool hasErrorDisplay ( ) const
virtual

Returns true.

Returns true SymbolPointRep class used by this class are capable of displaying error on the data points.

Reimplemented from DataRep.

Definition at line 74 of file XYPlot.cxx.

References DataRep::m_projector, DataRep::m_rep, and DataRep::name().

bool hasNTupleBindings ( ) const
virtualinherited
bool hasZeroRows ( )
virtualinherited

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

Returns false if the projector is not an NTupleProjector.

Definition at line 304 of file DataRep.cxx.

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

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

bool hasZoomY ( ) const
virtual

Returns true to allow zooming on Y asis.

Reimplemented from DataRep.

Definition at line 131 of file XYPlot.cxx.

bool isAxisBinned ( Axes::Type  axis) const
inherited

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

Definition at line 371 of file DataRep.cxx.

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

Referenced by FunctionRep::setFitter().

bool isDirty ( ) const
inherited

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

Definition at line 165 of file DataRep.cxx.

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

bool isErrorDisplayed ( Axes::Type  axis) const
inherited

Returns true if the error bars are being displayed.

Definition at line 197 of file DataRep.cxx.

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

Referenced by CompositePlotter::errorDisplay().

bool isImageConvertable ( ) const
virtualinherited

Returns true if the receiving object can be converted to an image.

Returns true if this data representation can be converted to an image. An image is defined as a regular grid of values.

Definition at line 566 of file DataRep.cxx.

References DataRep::m_projector.

bool isSelected ( ) const
virtualinherited

Returns true if data representation is in selected state.

See Also
setSelected

Definition at line 160 of file DataRep.cxx.

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

Referenced by DataRep::setSelected().

bool isTargetable ( ) const
virtualinherited

Returns true if the receiving object is target-able.

Most derived classes of DataRep are target-able and return true. That is, they can be targets of cuts, functions, etc. If a derived class is not intended to be a target, it should return false. The implementation in this base class returns true.

Reimplemented in FunctionRep, and TextDataRep.

Definition at line 412 of file DataRep.cxx.

void matrixTranspose ( bool  yes)
virtualinherited

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 121 of file DataRep.cxx.

References DataRep::m_projector.

Referenced by CompositePlotter::matrixTranspose().

const string & name ( ) const
inherited
bool needColorRep ( ) const
virtualinherited

Determines if extra space is needed for a color rep.

Deprecated:
Use hasAxis() instead.

Definition at line 448 of file DataRep.cxx.

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

bool needsMatrixSet ( ) const
virtualinherited

Returns true if this data representation needs an XY matrix parameters to be set in order to display itself.

An example would be the Image DataRep. The implementation in this base class returns false.

Reimplemented in Image.

Definition at line 559 of file DataRep.cxx.

void normalizeTo ( const DataRep target)
virtualinherited

Normalizes the receiving object to the target one.

Definition at line 389 of file DataRep.cxx.

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

void notifyObservers ( ) const
virtualinherited

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, RootNTuple, NumArrayTuple, ListTuple, and FitsNTuple.

Definition at line 93 of file Observable.cxx.

References Observer::update().

Referenced by XyPlotter::addDataRep(), XyPlotter::addDataRepStacked(), FunctionController::addFunctionRep(), StHist1DProjector::addValues(), StHist2DProjector::addValues(), XyPlotter::autoScale(), Inspector::contourLevelsTextBox_returnPressed(), Inspector::contourSlider_valueChanged(), Inspector::contourTextBox_returnPressed(), FunctionRep::fitFunction(), XyPlotter::removeDataRep(), FunctionRep::restoreParameters(), DataRep::set(), CutPlotter::setActive(), PlotterBase::setAspectRatio(), XyPlotter::setAutoRanging(), XyPlotter::setBoxEdge(), QtDisplay::setContourLevels(), CutPlotter::setCutColor(), XyPlotter::setCutEnabled(), XyPlotter::setCutInverted(), XyPlotter::setCutRangeAt(), ProjectorBase::setDirty(), DataRep::setErrorDisplay(), XyPlotter::setHighRange(), PlotterBase::setLabel(), XyPlotter::setLabel(), DataSource::setLabelAt(), DataSource::setLabels(), XyPlotter::setLowRange(), DataSource::setName(), DisplayController::setNTuple(), FunctionRep::setParameters(), DyHistogram::setPointRep(), DyHistogramEqualEntries::setPointRep(), DataRep::setPointRep(), TextPlotter::setRepColor(), DataRep::setRepColor(), DataRep::setRepSize(), DataRep::setRepStyle(), XyPlotter::setReverse(), XyPlotter::setScaling(), XyPlotter::setShowGrid(), DataSource::setTitle(), PlotterBase::setTitle(), XyPlotter::setTransform(), XyPlotter::setValueRep(), NTupleProjector::update(), BinningProjector::update(), DataRep::update(), PlotterBase::update(), CutPlotter::update(), CutPlotter::updateTargets(), DataRep::~DataRep(), DataSource::~DataSource(), PlotterBase::~PlotterBase(), and RTuple::~RTuple().

void notifyObservers ( Action  action) const
protectedinherited

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

Definition at line 72 of file Observable.cxx.

Range preferredRange ( Axes::Type  axis) const
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 179 of file DataRep.cxx.

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

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

void removeCut ( )
inherited

Remove a region cut on the data representation.

Reimplemented in FunctionRep.

Definition at line 476 of file DataRep.cxx.

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

void removeObserver ( hippodraw::Observer observer)
inherited
void set ( Color::Value  value)
inherited

Sets the Color of the PointRepBase object.

Definition at line 241 of file DataRep.cxx.

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

Referenced by Inspector::addDataRepButton_clicked().

void setAxisBinding ( const std::string &  axis,
const std::string &  label 
)
virtual

Sets the axis bindings.

Sets binding of the axis with name axis to the NTuple column with label label. If axis is one of the error bar axes, then also set the error display appropriately.

Reimplemented from DataRep.

Definition at line 90 of file XYPlot.cxx.

References DataRep::m_projector, DataRep::setErrorDisplay(), hippodraw::Axes::X, and hippodraw::Axes::Y.

void setAxisBindings ( const std::vector< std::string > &  bindings)
virtual

Sets the axis bindings.

Sets binding all axes to the NTuple column with label in the vector. Also set the error display flag in the SymbolPointRep.

Reimplemented from DataRep.

Definition at line 110 of file XYPlot.cxx.

References ProjectorBase::getAxisBindings(), DataRep::m_projector, DataRep::setErrorDisplay(), hippodraw::Axes::X, and hippodraw::Axes::Y.

void setAxisModel ( Axes::Type  axis,
AxisModelBase model 
)
inherited

Sets the AxisModel for axis axis.

Definition at line 145 of file DataRep.cxx.

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

Referenced by CompositePlotter::addDataRep().

const Range & setBinWidth ( Axes::Type  axis,
double  width 
)
inherited

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

Definition at line 398 of file DataRep.cxx.

References DataRep::m_projector.

void setCutRangeAt ( const Range range,
unsigned int  i 
)
inherited

Sets the Range of the TupleCut index by i.

Definition at line 529 of file DataRep.cxx.

References DataRep::m_cut_rep.

void setDirty ( bool  yes = true)
virtualinherited
void setEnabled ( unsigned int  i,
bool  yes = true 
)
inherited

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

Definition at line 545 of file DataRep.cxx.

References DataRep::m_cut_rep.

void setErrorDisplay ( Axes::Type  axis,
bool  flag 
)
inherited
void setParentDataRep ( DataRep parent_datarep)
virtualinherited

Sets the parent DataRep.

Definition at line 84 of file DataRep.cxx.

References DataRep::m_parent_datarep.

Referenced by TextPlotter::willDelete().

void setPointRep ( RepBase pointrep)
virtualinherited

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, and DyHistogramEqualEntries.

Definition at line 217 of file DataRep.cxx.

References Color::black, DataRep::m_rep, Observable::notifyObservers(), hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by DataRepXML::createObject(), VariableMesh::setRepresentation(), XYPlot::setRepresentation(), TextPlotter::setRepresentation(), and CompositePlotter::setRepresentation().

void setRange ( 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 212 of file DataRep.cxx.

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

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

void setRepColor ( const Color color)
inherited

Sets the color of the data representation.

Definition at line 249 of file DataRep.cxx.

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

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

void setRepresentation ( RepBase rep)
virtual

Sets the point representation.

Sets the point representation to @ point_rep as DataRep::setRepresentation does. Also sets the error display if appropriate.

Todo:
In this and two other members, the implementation has knowledge of axis binding via string "nil". Should probably have method in projector that gives the answer if error axis is bound.

Definition at line 52 of file XYPlot.cxx.

References DataRep::m_projector, DataRep::name(), DataRep::setErrorDisplay(), DataRep::setPointRep(), hippodraw::Axes::X, and hippodraw::Axes::Y.

void setRepSize ( double  size)
inherited

Sets the size of the representation.

Definition at line 126 of file DataRep.cxx.

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

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

void setRepStyle ( int  style)
inherited

Sets the style type of the point representation.

Definition at line 256 of file DataRep.cxx.

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

void setSelected ( bool  yes = true)
virtualinherited

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 150 of file DataRep.cxx.

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

Referenced by CompositePlotter::setActivePlot().

void 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 430 of file DataRep.cxx.

References DataRep::m_title.

void throwRangeException ( )
protectedinherited

Throws exception with message saying argument is out of range.

Definition at line 521 of file DataRep.cxx.

void toggleInverted ( unsigned int  i)
inherited

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

Definition at line 536 of file DataRep.cxx.

References DataRep::m_cut_rep.

void update ( const Observable )
virtualinherited

Responds to update message from the data source.

Implements Observer.

Definition at line 67 of file DataRep.cxx.

References Observable::notifyObservers().

void update ( )
virtualinherited

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 382 of file DataRep.cxx.

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

void willDelete ( const Observable )
virtualinherited

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 ViewBase, FunctionRep, BinningProjector, NTupleProjector, Profile2DProjector, DyHist1DProjector, DyHist2DProjector, TextPlotter, CutPlotter, and ProfileProjector.

Definition at line 25 of file Observer.cxx.

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

Member Data Documentation

CutRangeRep* m_cut_rep
protectedinherited
std::string m_name
protectedinherited
DataRep* m_parent_datarep
protectedinherited

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 99 of file DataRep.h.

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

ProjectorBase* m_projector
protectedinherited

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 90 of file DataRep.h.

Referenced by DataRep::addValues(), ColorPlot::ColorPlot(), ContourPlot::ContourPlot(), FunctionRep::covarianceMatrix(), DataRep::createNTuple(), DataRep::createNTupleUnderRegion(), DataRep::DataRep(), FunctionRep::degreesOfFreedom(), DataRep::drawCuts(), FunctionRep1::drawProjectedValues(), FunctionRep2::drawProjectedValues(), CompositeFunctionRep::drawProjectedValues(), DyHistogram::DyHistogram(), DyHistogramEqualEntries::DyHistogramEqualEntries(), DataRep::fillColumnAfterCuts(), FunctionRep::fitFunction(), FunctionRep::FunctionRep(), FunctionRep::getFitter(), FunctionRep::getFunction(), DataRep::getMean(), DataRep::getNTupleAfterCuts(), DataRep::getNumberOfEntries(), DataRep::getPosRange(), DataRep::getProjectedValues(), DataRep::getProjector(), DataRep::getRMS(), DataRep::getTitle(), VariableMesh::hasErrorDisplay(), XYPlot::hasErrorDisplay(), DataRep::hasZeroRows(), Image::Image(), FunctionRep::initializeWith(), DataRep::isAxisBinned(), DataRep::isDirty(), DataRep::isImageConvertable(), LineDataRep::LineDataRep(), DataRep::matrixTranspose(), DataRep::normalizeTo(), FunctionRep::objectiveValue(), DataRep::preferredRange(), FunctionRep::principleErrors(), Profile2D::Profile2D(), ProfileContour::ProfileContour(), ProfileHist::ProfileHist(), FunctionRep::removeCut(), FunctionRep::restoreParameters(), FunctionRep::saveParameters(), ScatterPlot::ScatterPlot(), VariableMesh::setAxisBinding(), XYPlot::setAxisBinding(), DataRep::setAxisBinding(), VariableMesh::setAxisBindings(), XYPlot::setAxisBindings(), DataRep::setAxisBindings(), DataRep::setAxisModel(), St2DHistogram::setBinContents(), St1DHistogram::setBinContents(), DataRep::setBinWidth(), FunctionRep::setCutRange(), DataRep::setDirty(), FunctionRep::setFitter(), FunctionRep::setParameters(), FunctionRep::setPrincipleErrors(), DataRep::setRange(), VariableMesh::setRepresentation(), XYPlot::setRepresentation(), FunctionRep::setTupleCut(), LineDataRep::setValue(), St1DHistogram::St1DHistogram(), St2DHistogram::St2DHistogram(), StripChart::StripChart(), DataRep::update(), VariableMesh::VariableMesh(), XYPlot::XYPlot(), XYZPlot::XYZPlot(), YPlot::YPlot(), and DataRep::~DataRep().

RepBase* m_rep
protectedinherited
std::string m_title
protectedinherited

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 82 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 Class Library by doxygen