14 #include "msdevstudio/MSconfig.h" 84 bool have_weight = w_col < UINT_MAX;
91 for (
unsigned int i = 0; i <
size; i++ )
95 double x =
m_ntuple -> valueAt ( i, x_col );
96 double y =
m_ntuple -> valueAt ( i, y_col );
99 w =
m_ntuple -> valueAt ( i, w_col );
120 }
else if ( axis ==
Axes::Y ) {
161 if( new_offset == 0.0 )
return;
187 = dynamic_cast <
const DataSource * > ( object );
189 if ( datasource != 0 ) {
202 = dynamic_cast <
const DataSource * > ( object );
204 if ( datasource != 0 ) {
virtual void checkScaling()
Checks the axis scaling.
Range dataRangeOnValue() const
Returns the data range on the Z axis.
std::string m_z_label_density
The label of the z axis when displaying density.
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.
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
virtual void willDelete(const Observable *object)
Implements Observer pattern.
hippodraw::AxisModelBase class interface
virtual void willDelete(const Observable *object)
If object is the target of normalization, removes the target and sets normalization off...
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
virtual void setOffset(hippodraw::Axes::Type axis, double v)
Sets the bin offset.
BinsBase * m_binner
The binner object.
virtual void willDelete(const Observable *)
Responds to willDelete message from the observed data source.
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
std::string m_z_label_entries
The label of the z axis when displaying number of entries per bin.
virtual double calcBinWidth(hippodraw::Axes::Type axis, int parm, bool dragging) const =0
Calculates a new bin width base on dragging slider value.
virtual void setBinnerRange(hippodraw::Axes::Type axis, const Range &range, bool const_width)
Sets the Range of the binner.
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.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual void accumulate(double x, double w_or_y=1.0, double z=1.0, double w=1.0)=0
Accumulates the data point with weight w.
hippodraw::NTuple class interface.
Base class for DataSource.
virtual const Range & setBinWidth(hippodraw::Axes::Type axis, int parm, bool dragging)
Sets the bin width.
DyHist2DProjector()
The default constructor.
A derived class of BinningProjector projects to a two dimensional histogram.
virtual void update(const Observable *)
Responds to update message from the data source.
intp size(numeric::array arr)
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
Range m_value_range
The range of the accumulated values.
Type convert(const std::string &axis)
Converts from string representation ot Axes::Type representation.
DyHist2DProjector class implementation.
Expresses a range of values.
virtual bool isAxisBinned(const std::string &axis) const
Returns true if the destined axis is "X" or "Y", otherwise returns false.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of data on the specified axis.
The base class for the Projector hierarchy.
An NTupleProjector is a projector that projects data from an DataSource object.
virtual void reset()=0
Resets the accumulation to zero.
CutList_t m_cut_list
A list of cuts that filter the projection.
virtual Range valueRange() const
Finds the range of the projected values.
A derived class of Hist2DProjImp and NTupleProjector that reads two columns of data and projects them...
virtual void update(const Observable *object)
Updates the receiving projector.
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.
virtual const Range & setBinWidth(hippodraw::Axes::Type axis, double v)
This function sets the binWidth.
Range dataRange(int column) const
Returns the range of data on the specified column.
void setDirty()
Sets a flag to indicate that re-binning needs to be done.
hippodraw::BinnerAxis class interface
void execute()
Projects the data source into bins.
double pos() const
Returns the first positive element in range.
virtual void setOffset(const std::string &axis, int parm, bool dragging)
Sets the bin offset.
virtual void update(const Observable *object)
Implements Observer pattern.
virtual void setRange(hippodraw::Axes::Type axis, bool)
Sets the range of the selected axis.
hippodraw::BinsBase class interface
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
virtual double calcOffset(const std::string &, int parm, bool dragging) const =0
Calculates and returns a new range from dragging slider.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.