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 );
The base class for the Projector hierarchy.
hippodraw::AxisModelBase class interface
AxisModelBase * m_y_axis
The AxisModel along the Y axis.
An NTupleProjector is a projector that projects data from an DataSource object.
A derived class of NTupleProjector that maps 3 DataSource columns to a 3-dimensional projection...
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
Expresses a range of values.
hippodraw::DataPointTuple namespace interface
Base class for DataSource.
double getPos(int column) const
Returns the minimum positive value on the specified column.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
const Range & getRange(bool scaled) const
Returns the range represented by this AxisModel.
virtual double getZValue(double x, double y) const
Get the z value at the specified point (x,y).
virtual const std::string & getLabelAt(unsigned int index) const
Returns the label for the column at index index.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
Map3Projector()
This default constructor binds to the first three columns.
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
DataSource * m_proj_values
The NTuple representing the result of the projection.
const std::string & getZLabel() const
Returns the label (title) of the z axis.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
AxisModelBase * m_x_axis
The AxisModel along the X axis.
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 void setDirty(bool value=true)
Sets the dirty flag to value.
A DataSource class implemented with std::vector<double> to store the column data. ...
virtual void addPointReps()
Function to add the acceptable point reps.
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
CutList_t m_cut_list
A list of cuts that filter the projection.
intp size(numeric::array arr)
virtual DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of the data on the specified axis.
virtual Range valueRange() const
Finds the range of the projected values.
hippodraw::Map3Projector class interface
Range dataRange(int column) const
Returns the range of data on the specified column.
hippodraw::NTuple class interface.
double length() const
Returns the length of the range object.
const DataSource * m_ntuple
The pointer to the data source being projected.
virtual bool inRange(int row) const
Checks if the entries in a given row are within the range of the axis model.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
unsigned int m_min_bindings
The minimum number of columns that must be bound.