14 #include "msdevstudio/MSconfig.h"
31 using namespace hippodraw;
33 #ifdef ITERATOR_MEMBER_DEFECT
38 using std::max_element;
40 using std::min_element;
98 unsigned int index = 0;
99 if ( axis ==
Axes::Y ) index = 1;
100 if ( axis ==
Axes::Z ) index = 2;
112 unsigned int index = 0;
113 if ( axis ==
Axes::Y ) index = 1;
114 if ( axis ==
Axes::Z ) index = 2;
125 namespace dp = hippodraw::DataPoint3DTuple;
140 double xe = xr.
length() * 0.01;
141 double ye = yr.
length() * 0.01;
146 unsigned int size = xs.size();
147 for (
unsigned int i = 0;
i <
size;
i++ ) {
148 if ( abs ( x - xs[
i] ) < xe &&
149 abs ( y - ys[i] ) < ye ) retval = zs[
i];
168 unsigned int columns = 3;
170 vector < string > labels;
171 labels.push_back (
m_ntuple -> getLabelAt ( ix ) );
172 labels.push_back (
m_ntuple -> getLabelAt ( iy ) );
173 labels.push_back (
m_ntuple -> getLabelAt ( iz ) );
174 ntuple -> setLabels ( labels );
188 ntuple -> reserve ( size );
189 vector < double > row ( 3 );
195 for (
unsigned int i = 0;
i <
size;
i++ ) {
197 ( in_range ==
true &&
inRange (
i ) ==
false ) )
continue;
203 ntuple -> addRow ( row );
double getPos(int column) const
Returns the minimum positive value on the specified column.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of the data on the specified axis.
AxisModelBase * m_x_axis
The AxisModel along the X axis.
CutList_t m_cut_list
A list of cuts that filter the projection.
Map3Projector()
This default constructor binds to the first three columns.
virtual bool inRange(int row) const
Checks if the entries in a given row are within the range of the axis model.
bool acceptRow(unsigned int i, const CutList_t &cut_list) const
For row i of the column in the DataSource, returns true if all the cuts accept the row...
virtual Range valueRange() const
Finds the range of the projected values.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
virtual DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
Range dataRange(int column) const
Returns the range of data on the specified column.
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.
An NTupleProjector is a projector that projects data from an DataSource object.
virtual void addPointReps()
Function to add the acceptable point reps.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
hippodraw::NTuple class interface.
virtual double getZValue(double x, double y) const
Get the z value at the specified point (x,y).
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
intp size(numeric::array arr)
const DataSource * m_ntuple
The pointer to the data source being projected.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
double length() const
Returns the length of the range object.
A DataSource class implemented with std::vector<double> to store the column data. ...
The base class for the Projector hierarchy.
hippodraw::AxisModelBase class interface
const std::string & getZLabel() const
Returns the label (title) of the z axis.
DataSource * m_proj_values
The NTuple representing the result of the projection.
const Range & getRange(bool scaled) const
Returns the range represented by this AxisModel.
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
Expresses a range of values.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
hippodraw::DataPointTuple namespace interface
AxisModelBase * m_y_axis
The AxisModel along the Y axis.
unsigned int m_min_bindings
The minimum number of columns that must be bound.
virtual const std::string & getLabelAt(unsigned int index) const
Returns the label for the column at index index.
A derived class of NTupleProjector that maps 3 DataSource columns to a 3-dimensional projection...
hippodraw::Map3Projector class interface
Base class for DataSource.