14 #include "msdevstudio/MSconfig.h"
32 using namespace hippodraw;
58 m_z_label_entries ( projector.m_z_label_entries ),
59 m_z_label_density ( projector.m_z_label_density ),
60 m_value_range( projector.m_value_range )
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 );
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 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.
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
void execute()
Projects the data source into bins.
double getPos(int column) const
Returns the minimum positive value on the specified column.
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.
virtual void willDelete(const Observable *object)
If object is the target of normalization, removes the target and sets normalization off...
CutList_t m_cut_list
A list of cuts that filter the projection.
A derived class of Hist2DProjImp and NTupleProjector that reads two columns of data and projects them...
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...
DyHist2DProjector class implementation.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of data on the specified axis.
virtual bool isAxisBinned(const std::string &axis) const
Returns true if the destined axis is "X" or "Y", otherwise returns false.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
Range dataRange(int column) const
Returns the range of data on the specified column.
virtual Range valueRange() const
Finds the range of the projected values.
DyHist2DProjector()
The default constructor.
An NTupleProjector is a projector that projects data from an DataSource object.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
virtual void setOffset(const std::string &axis, int parm, bool dragging)
Sets the bin offset.
hippodraw::NTuple class interface.
hippodraw::BinsBase class interface
BinsBase * m_binner
The binner object.
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.
virtual void willDelete(const Observable *)
Responds to willDelete message from the observed data source.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual void setRange(hippodraw::Axes::Type axis, bool)
Sets the range of the selected axis.
Range dataRangeOnValue() const
Returns the data range on the Z axis.
void setDirty()
Sets a flag to indicate that re-binning needs to be done.
The base class for the Projector hierarchy.
virtual double calcOffset(const std::string &, int parm, bool dragging) const =0
Calculates and returns a new range from dragging slider.
virtual void update(const Observable *object)
Updates the receiving projector.
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 checkScaling()
Checks the axis scaling.
hippodraw::AxisModelBase class interface
A derived class of BinningProjector projects to a two dimensional histogram.
virtual const Range & setBinWidth(hippodraw::Axes::Type axis, int parm, bool dragging)
Sets the bin width.
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
virtual const Range & setBinWidth(hippodraw::Axes::Type axis, double v)
This function sets the binWidth.
Expresses a range of values.
virtual void setOffset(hippodraw::Axes::Type axis, double v)
Sets the bin offset.
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
unsigned int m_min_bindings
The minimum number of columns that must be bound.
Type convert(const std::string &axis)
Converts from string representation ot Axes::Type representation.
virtual void willDelete(const Observable *object)
Implements Observer pattern.
virtual void reset()=0
Resets the accumulation to zero.
virtual void update(const Observable *)
Responds to update message from the data source.
hippodraw::BinnerAxis class interface
virtual void setBinnerRange(hippodraw::Axes::Type axis, const Range &range, bool const_width)
Sets the Range of the binner.
double pos() const
Returns the first positive element in range.
virtual void update(const Observable *object)
Implements Observer pattern.
Base class for DataSource.