14 #include "msdevstudio/MSconfig.h" 38 m_parent_datarep ( 0 ),
103 const std::string & label )
190 m_rep -> setErrorOn ( axis, flag );
221 bool yes_x =
m_rep -> xError ();
222 bool yes_y =
m_rep -> yError ();
223 color =
m_rep -> getColor ();
226 rep -> setErrorOn (
Axes::X, yes_x );
227 rep -> setErrorOn (
Axes::Y, yes_y );
230 m_rep -> setColor ( color );
243 const Color color ( value );
244 m_rep -> setColor ( color );
338 std::vector<double> & columnData)
const {
348 return m_projector -> createNTupleWith ( cut_list );
491 const string & label = projector -> getXLabel ();
494 int index = projector -> indexOf ( label );
497 const Range & range = projector -> getRange (
Axes::X );
503 const vector < TupleCut > &
523 string what (
"DataRep::setCutRange: index out of range." );
524 throw std::out_of_range ( what );
void setErrorDisplay(Axes::Type axis, bool)
Sets the display of error bar, if applicable, on the specified axis.
NTuple * createNTuple() const
Returns a new NTuple representation of the receiving object.
virtual bool hasAxis(Axes::Type axis) const
Returns true if the data representation has specified axis type axis.
virtual void setAxisBinding(const std::string &axis, const std::string &label)
Sets the axis binding.
void throwRangeException()
Throws exception with message saying argument is out of range.
virtual NTuple * getNTupleAfterCuts() const
Returns the full NTuple but with the current set of cuts applied.
void toggleInverted(unsigned int i)
Changes state of inversion flag to be the opposite of its current state.
virtual void setSelected(bool yes=true)
Sets the representation to be selected if yes is true, otherwise set it to be deselected.
const Range & setBinWidth(Axes::Type axis, double width)
Sets the bin width, if binned, on specified axis to width.
void setRange(const Range &range)
Sets the range of the cut.
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
virtual void setColor(const Color &)
Sets the color of the representation.
bool hasCut() const
Returns true if the receiving object has one or more regional cuts.
const Color & getRepColor() const
Returns the color used for the representation.
virtual double getMean(const std::string &axis)
Returns the mean.
virtual DataRep * getParentDataRep() const
Gets the parent DataRep.
RepBase * getCutRep()
Returns the point representation that draws the cuts.
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.
hippodraw::ProjectorBase class interface.
virtual void setSize(float value)
Sets the size of the representation.
virtual ProjectorBase * clone()=0
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
virtual double getPosOn(Axes::Type) const =0
Returns the minimum positive value.
virtual void setParentDataRep(DataRep *parent_datarep)
Sets the parent DataRep.
virtual void willDelete(const Observable *)
Notifies this Observer object that one of its Observable objects is about to be deleted.
RepBase * m_rep
The representation used for drawing each data point in the view.
bool isAxisBinned(Axes::Type axis) const
Returns true if the specified axis is binned, otherwise returns false.
std::string m_name
The name of the display as it might be displayed in a GUI.
void setAxisModel(Axes::Type axis, AxisModelBase *)
Sets the AxisModel for axis axis.
virtual void setSelected(bool yes=true)
Sets the data representation as selected.
void setRepColor(const Color &)
Sets the color of the data representation.
virtual void fillColumnAfterCuts(const std::string &column, std::vector< double > &columnData) const
Fill the vector with values from named column with the present set of cuts applied.
virtual bool isImageConvertable() const
Returns true if the receiving object can be converted to an image.
void setRepStyle(int style)
Sets the style type of the point representation.
void setCutRangeAt(const Range &range, unsigned int i)
Sets the Range of the TupleCut index by i.
A derived class of PointRepBase class that draws a representation of a cut range. ...
virtual bool isTargetable() const
Returns true if the receiving object is target-able.
hippodraw::DataRep class interface.
virtual void notifyObservers() const
Notifies Observer objects of a change.
virtual void matrixTranspose(bool yes)
Transposes the X and Y axis.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
virtual const DataSource * getProjectedValues() const
Returns an DataSource representation of the projected data.
virtual void update()
Updates the data representation.
NTuple * createNTupleUnderRegion() const
Returns a NTuple that is a copy of the projector's DataSource with rows not passing region cuts remov...
virtual void setAxisBindings(const std::vector< std::string > &bindings)
Sets the axis bindings.
const std::string & getTitle() const
Returns the the current title of the object.
Value
A few common colors.
bool isErrorDisplayed(Axes::Type) const
Returns true if the error bars are being displayed.
virtual void setAxisModel(Axes::Type axis, AxisModelBase *)
Sets the AxisModel for axis axis.
DataRep * m_parent_datarep
There are times when a given DataRep results from some operations performed on some other DataRep...
virtual NTuple * getNTupleAfterCuts() const
Template for projectors that can return subsets of the NTuple used by the DataRep.
The base class for data representations.
hippodraw::NTuple class interface.
Base class for DataSource.
virtual RepBase * clone()=0
Returns a copy of the object.
virtual void addValues(const std::vector< double > &v)
Add the data values to the DataRep.
ProjectorBase * m_projector
A projector used to transform data to projected values that will be plotted.
hippodraw::TupleCut class interface
intp size(numeric::array arr)
virtual ~DataRep()
The destructor.
The base class for the point representation hierarchy.
RepBase * getRepresentation() const
Returns the representation used to draw the data points.
virtual bool xError() const
Returns true if the point representation displays error on the X axis.
virtual bool hasZoomY() const
Returns true if this DataRep has zoom feature on the Y axis.
virtual void setStyle(unsigned int style)
Sets the symbol of the representation.
void setRange(Axes::Type axis, bool const_width=true)
Sets the range of the axis.
virtual bool isSelected() const
Returns true if data representation is in selected state.
A Color class for creating the color object following the standard RGB color space.
virtual DataRep * clone()=0
The clone function returns an object of its own kind which is a copy of this object.
virtual bool hasZeroRows()
Returns true if this DataRep has zero rows in its DataSource.
const std::string & name() const
Returns the name of the display.
Type convert(const std::string &axis)
Converts from string representation ot Axes::Type representation.
void set(Color::Value value)
Sets the Color of the PointRepBase object.
void setEnabled(unsigned int i, bool yes=true)
Sets the TupleCut indexed by i to be enabled or not.
A DataSource class implemented with std::vector<double> to store the column data. ...
virtual bool needColorRep() const
Determines if extra space is needed for a color rep.
Range preferredRange(Axes::Type axis) const
Returns the preferred range to display the data.
virtual void drawProjectedValues(TransformBase *transform, ViewBase *view)
Draws the projected values.
void removeCut()
Remove a region cut on the data representation.
virtual void normalizeTo(const DataRep *target)
Normalizes the receiving object to the target one.
PyArray_TYPES type(numeric::array arr)
void drawCuts(TransformBase *transform, ViewBase *view)
Draws the cuts.
virtual bool needsMatrixSet() const
Returns true if this data representation needs an XY matrix parameters to be set in order to display ...
Expresses a range of values.
The base class for the Projector hierarchy.
A transform that transforms coordinates from one coordinate system to another.
virtual ProjectorBase * getProjector() const
Returns the Projector object controlling the data.
virtual const Color & color() const
Returns the representation's color.
The abstract base class for views.
void setColumn(unsigned int col)
Sets the column in the DataSource to be used.
int getNumberOfEntries() const
Returns the number of entries used for the DataRep object.
void addCut()
Adds a cut to the data representation.
void setRepSize(double size)
Sets the size of the representation.
virtual void setPointRep(RepBase *pointrep)
Sets the representation of the data points.
bool isDirty() const
Returns true if the projector has been marked dirty.
bool isDirty() const
Return true if the data representation has changed is some way and it needs to be re-drawn...
CutRangeRep * m_cut_rep
The representation of the cut or highlighted range.
DataRep()
The default constructor.
CutRangeRep class interface.
virtual void setDirty(bool yes=true)
Sets the dirty flag.
virtual void setRange(Axes::Type axis, bool const_width=true)
Sets the range of the selected axis.
virtual bool hasErrorDisplay() const
Returns true if the data representation is capable of error display on the data values.
void setTitle(const std::string &title)
Sets the title.
double getPosRange(Axes::Type axis)
Returns the smallest positive number from in the range of the data.
virtual double getRMS(const std::string &axis)
Returns the RMS.
virtual bool acceptFunction(int number)
Returns true if the DataRep accepts functions on number variables.
virtual bool isSelected() const
Returns true if representation is in selected state, otherwise returns false.
const std::vector< TupleCut > & getCuts() const
Returns a reference to the cut list.
column
The column indices for 2 dimension data point tuple.
virtual bool hasNTupleBindings() const
Returns true if the DataRep's projector can bind to DataSource.
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
The AxisModelBase class maintains the Range and scaling of an axis.
virtual bool isEmpty() const =0
Returns true if the data source used by this projector is empty.
The class expresses a cut on a DataSource, i.e.
virtual Range preferredRange(Axes::Type) const
Returns the preferred Range.
void setLabel(const std::string &label)
Sets the label for the cut.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
std::string m_title
The title of the object.