14 #include "msdevstudio/MSconfig.h" 32 #ifdef ITERATOR_MEMBER_DEFECT 44 m_x_option (
"X width (optional)" ),
45 m_y_option (
"Y width (optional)" )
82 vector< string >:: iterator first
101 vector< string >:: iterator first
163 return Range ( 0.0, 1.0, 0.5 );
167 return Range ( values );
215 vector < string > labels;
216 labels.push_back (
m_ntuple -> getLabelAt ( x_col ) );
217 labels.push_back (
m_ntuple -> getLabelAt ( y_col ) );
218 labels.push_back (
m_ntuple -> getLabelAt ( z_col ) );
220 if ( x_err < UINT_MAX ) {
221 labels.push_back (
m_ntuple -> getLabelAt ( x_err ) );
226 if ( y_err < UINT_MAX ) {
227 labels.push_back (
m_ntuple -> getLabelAt ( y_err ) );
231 labels.push_back (
" z error" );
236 ntuple -> reserve ( size );
263 const vector < string > & labels =
m_ntuple -> getLabels ();
264 unsigned int size = labels.size();
266 if ( x_err == UINT_MAX &&
269 if ( y_err == UINT_MAX &&
275 for (
unsigned int i = 0; i <
size; i++ ) {
277 ( in_range ==
true &&
inRange ( i ) ==
false ) )
continue;
285 = x_err < UINT_MAX ?
m_ntuple -> valueAt ( i, x_err ) : 0.0;
287 = y_err < UINT_MAX ?
m_ntuple -> valueAt( i, y_err ) : 0.0;
292 ntuple -> addRow ( row );
316 for (
unsigned int i = 0; i < 2; i++ ) {
321 double value =
m_ntuple -> valueAt ( row, vcolumn );
322 double width =
m_ntuple -> valueAt ( row, wcolumn );
323 bool in = range.
includes ( value + width ) ||
349 double low = DBL_MAX;
350 double pos = DBL_MAX;
351 double high = -DBL_MIN;
353 std::size_t rows =
m_ntuple -> rows ();
354 for (
unsigned int row = 0; row < rows; row++ ) {
358 low = std::min ( low, value );
360 pos = std::min ( pos, value );
362 high = std::max ( high, value );
396 unsigned int size = xs.size();
397 for (
unsigned int i = 0; i <
size; i++ ) {
398 if ( x>xs[i]-xerr[i] && x<xs[i]+xerr[i] &&
399 y>ys[i]-yerr[i] && y<ys[i]+yerr[i] ) {
AxisModelBase * m_x_axis
The AxisModel along the X axis.
Range dataRangeOnValue() const
Returns the Range of the projected values.
A namespace to set the standard for indexing into 2 dimension data point tuple.
virtual const Range & getRange(Axes::Type) const
Returns the Range along the specified 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...
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.
std::string YWIDTH
Y width label.
virtual void addPointReps()
Function to add the acceptable point reps.
virtual bool inRange(int row) const
Returns true if value at row is within range on all axis.
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
Fills the DataSource the projected values.
hippodraw::AxisModelBase class interface
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
void setLabels(const std::vector< std::string > &v)
Assigns the label to each column from the vector of strings.
virtual Range valueRange() const
Finds the range of the projected values.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
std::string m_y_option
The label for the Y width binding option.
DataSource * m_proj_values
The NTuple representing the result of the projection.
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
MeshProjector()
This default constructor binds to the first two columns.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
std::string XWIDTH
X width label.
hippodraw::MeshProjector class interface
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
const DataSource * m_ntuple
The pointer to the data source being projected.
double getPos(int column) const
Returns the minimum positive value on the specified column.
AxisModelBase * m_y_axis
The AxisModel along the Y axis.
hippodraw::NTuple class interface.
Base class for DataSource.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of the data on the specified axis.
Range dataRangeWithError(int data, int error) const
Returns a range considering both data and error.
intp size(numeric::array arr)
virtual void setYErrorOption(bool enable)
Sets whether the Y width options are to be enabled or not.
bool inRangeWithZ(int row, bool flag) const
Returns true if value at row is within range.
double getPosWithError(int data, int error) const
Returns the minimum positive values considering both data and error.
virtual Range preferredRange(hippodraw::Axes::Type axis) const
Returns the preferred Range on the given axis.
A DataSource class implemented with std::vector<double> to store the column data. ...
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.
void setRange(double low, double high, double pos)
Changes the current Range.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
Expresses a range of values.
The base class for the Projector hierarchy.
An NTupleProjector is a projector that projects data from an DataSource object.
virtual double getZValue(double x, double y) const
Get the z value at the specified point (x,y).
std::string m_x_option
The label for the X width binding option.
AxisModelBase * m_z_axis
The AxisModel along the Z axis.
virtual ~MeshProjector()
The destructor.
CutList_t m_cut_list
A list of cuts that filter the projection.
bool includes(double value) const
Returns true if the argument value is inside the range.
hippodraw::DataPointTuple namespace interface
bool isDirty() const
Returns true if the projector has been marked dirty.
A namespace to set the standard for indexing into 3 dimension data point tuple.
error on X or half bin width
Range dataRange(int column) const
Returns the range of data on the specified column.
const std::string & getZLabel() const
Returns the label (title) of the z axis.
virtual DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
The AxisModelBase class maintains the Range and scaling of an axis.
virtual void setXErrorOption(bool enable)
Sets whether the X width options are to be enabled or not.
virtual Range preferredRange(Axes::Type) const
Returns the preferred Range.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
hippodraw::Range class interface
A derived class of NTupleProjector that maps 3 DataSource columns to a two dimensional mesh projectio...
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.