#include <ProfileContour.h>
Inheritance diagram for ProfileContour:
This data representations uses slices of two columns on the X and Y axis and shows the average value of a third column in color. An example is shown below.
ProfileContour data representation
Matan Shacham <matan@slac.stanford.edu>
Definition at line 29 of file ProfileContour.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. | |
DataRep * | clone () |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
NTuple * | createNTuple () const |
Returns a new DataSource representation of the receiving object. | |
virtual void | drawProjectedValues (TransformBase *transform, ViewBase *view) |
Draws the projected values. | |
RepBase * | getCutRep () |
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 NTuple * | getNTupleAfterCuts () 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_t & | getObservers () const |
Returns the list of observers. | |
virtual DataRep * | getParentDataRep () |
Gets the parent DataRep. | |
double | getPosRange (hippodraw::Axes::Type axis) |
Returns the smallest positive number from in the range of the data. | |
virtual const DataSource * | getProjectedValues () const |
Returns an ntuple representation of the projected data. | |
virtual ProjectorBase * | getProjector () const |
Returns the Projector object controlling the data. | |
const Color & | getRepColor () const |
Returns the color used for the representation. | |
RepBase * | getRepresentation () 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 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 true if the DataRep's projector can bind to ntuple. | |
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 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 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. | |
ProfileContour () | |
The default constructor. | |
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. | |
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< TupleCut > | CutList_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. | |
RepBase * | m_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. | |
DataRep * | m_parent_datarep |
There are times when a given DataRep results from some operations performed on some other DataRep. | |
ProjectorBase * | m_projector |
A projector used to transform data to projected values that will be plotted. | |
RepBase * | m_rep |
The representation used for drawing each data point in the view. | |
std::string | m_title |
The title of the object. |
|
The member function of the Observer that is called.
Definition at line 83 of file Observable.h. |
|
The type of container for TupleCut objects.
|
|
The type of STL container to maintain list of Observer objects.
Definition at line 46 of file Observable.h. |
|
The default constructor.
Definition at line 22 of file ProfileContour.cxx. References DataRep::m_name, DataRep::m_projector, and DataRep::m_rep. Referenced by clone(). |
|
Returns
The default implementation returns 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(). |
|
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(). |
|
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(). |
|
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 31 of file ProfileContour.cxx. References ProfileContour(). |
|
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(). |
|
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(). |
|
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 NTuple. Some DataRep object may be dependent on the projected value objects are returned in a certain order. Reimplemented in TextDataRep. Definition at line 269 of file DataRep.cxx. References DataRep::drawCuts(), DataRep::getProjectedValues(), and DataRep::m_rep. Referenced by CompositePlotter::drawProjValues(). |
|
Returns the point representation that draws the cuts.
Definition at line 491 of file DataRep.cxx. References DataRep::m_cut_rep. |
|
Returns a reference to the cut list.
Definition at line 442 of file DataRep.cxx. References DataRep::m_cut_list. Referenced by CompositePlotter::fillCutList(). |
|
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(). |
|
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(). |
|
Returns the number of entries used for the DataRep object.
Definition at line 384 of file DataRep.cxx. References DataRep::m_projector. |
|
Returns the list of observers.
Definition at line 57 of file Observable.cxx. References Observable::m_list. |
|
Gets the parent DataRep.
Definition at line 75 of file DataRep.cxx. References DataRep::m_parent_datarep. Referenced by TextDataRep::getTargetProjector(). |
|
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. |
|
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(). |
|
|
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(). |
|
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(). |
|
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(). |
|
Returns the the current title of the object.
Definition at line 416 of file DataRep.cxx. References DataRep::m_projector, and DataRep::m_title. |
|
Returns
Reimplemented from DataRep. Definition at line 40 of file ProfileContour.cxx. References hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z. |
|
Returns
Definition at line 449 of file DataRep.cxx. References DataRep::m_cut_list. |
|
Returns
The implementation in this base class returns Reimplemented in DyHistogram, ProfileHist, St1DHistogram, and XYPlot. Definition at line 87 of file DataRep.cxx. |
|
Returns
The implementation in this base class is to return Reimplemented in FunctionRep, FunctionRep, LineDataRep, St1DHistogram, St2DHistogram, and TextDataRep. Definition at line 92 of file DataRep.cxx. Referenced by DataRep::addValues(), CutController::connectDataRep(), DataRepXML::createChildren(), DisplayController::getNTuple(), DisplayController::hasNTupleBindings(), CompositePlotter::hasNTupleBindings(), DataRep::setAxisBinding(), and DataRep::setAxisBindings(). |
|
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(). |
|
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. |
|
Returns
Definition at line 350 of file DataRep.cxx. References DataRep::m_projector, hippodraw::Axes::X, and hippodraw::Axes::Y. |
|
Return
Definition at line 159 of file DataRep.cxx. References ProjectorBase::isDirty(), and DataRep::m_projector. |
|
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(). |
|
Returns
Definition at line 154 of file DataRep.cxx. References RepBase::isSelected(), and DataRep::m_rep. |
|
Returns
Most derived classes of DataRep are target-able and return Reimplemented in FunctionRep, FunctionRep, and TextDataRep. Definition at line 391 of file DataRep.cxx. |
|
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.
Definition at line 118 of file DataRep.cxx. References DataRep::m_projector. Referenced by CompositePlotter::matrixTranspose(). |
|
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(). |
|
Determines if extra space is needed for a color rep.
Definition at line 427 of file DataRep.cxx. References DataRep::hasAxis(), and hippodraw::Axes::Z. |
|
Normalizes the receiving object to the target one.
Definition at line 368 of file DataRep.cxx. References DataRep::getProjector(), and DataRep::m_projector. |
|
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(). |
|
|
Returns the preferred range to display the data.
Definition at line 173 of file DataRep.cxx. References DataRep::m_projector, and ProjectorBase::preferredRange(). Referenced by CompositePlotter::autoScale(), and CompositePlotter::autoScaleZ(). |
|
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(). |
|
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(). |
|
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(). |
|
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(). |
|
Sets the bin width, if binned, on specified axis to width.
Definition at line 377 of file DataRep.cxx. References DataRep::m_projector. |
|
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(). |
|
Replaces existing point representation with a new one.
Definition at line 498 of file DataRep.cxx. References DataRep::m_cut_rep. |
|
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(). |
|
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(). |
|
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(). |
|
Sets the parent DataRep.
Definition at line 81 of file DataRep.cxx. References DataRep::m_parent_datarep. Referenced by TextPlotter::willDelete(). |
|
Sets the range of the axis.
The optional const_width parameter if Definition at line 210 of file DataRep.cxx. References DataRep::m_projector, and ProjectorBase::setRange(). Referenced by CompositePlotter::autoScale(), and CompositePlotter::autoScaleZ(). |
|
Sets the color of the data representation.
Definition at line 238 of file DataRep.cxx. References DataRep::m_rep, Observable::notifyObservers(), and RepBase::setColor(). Referenced by TextPlotter::setRepColor(), and CompositePlotter::setRepColor(). |
|
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(). |
|
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(). |
|
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(). |
|
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(). |
|
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. |
|
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(). |
|
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(). |
|
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(). |
|
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(). |
|
Notifies 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(). |
|
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(). |
|
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(). |
|
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(), ProfileHist::ProfileHist(), ScatterPlot::ScatterPlot(), St1DHistogram::St1DHistogram(), St2DHistogram::St2DHistogram(), StripChart::StripChart(), TextDataRep::TextDataRep(), XYPlot::XYPlot(), XYZPlot::XYZPlot(), YPlot::YPlot(), and ZPlot::ZPlot(). |
|
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(). |
|
|
|
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(). |