15 #include "msdevstudio/MSconfig.h" 212 return width_x * width_y;
220 assert ( width > 0.0 );
238 double new_width = -1.0;
253 bool dragging )
const 300 const Range & new_range = binner->
setRange ( range, hold_width );
344 for (
unsigned int i = 1; i <
m_data.size () -1; i++ ) {
345 sum += std::accumulate (
m_data[i].begin()+1,
m_data[i].end()-1, 0.0 );
348 return static_cast <
int > ( sum );
366 unsigned int columns = 6;
368 ntuple -> reserve ( rows );
371 ntuple -> setLabelAt (
"X", 0 );
372 ntuple -> setLabelAt (
"Y", 0 );
373 ntuple -> setLabelAt (
"Value", 0 );
374 ntuple -> setLabelAt (
"Width", 0 );
375 ntuple -> setLabelAt (
"Height", 0 );
376 ntuple -> setLabelAt (
"Error", 0 );
BinnerAxis * binner_axisY
The binner axis object for the Y axis.
virtual bool hasEqualWidths() const
Returns true if all bins have the same width.
void resize()
Resizes the internal arrays.
BinnerAxis * binner_axisX
The binner axis object for the X axis.
The base class for the BinnerAxis hierarchy.
virtual double calcOffset(int parm, bool dragging) const =0
Calculates and returns a double corresponding to a bin offset when dragging a slider control...
double calcBinWidth(hippodraw::Axes::Type axis, int parm, bool dragging) const
Calculates the bin width parameter from dragging slider.
virtual int getOverflow() const
Returns the overflow.
virtual bool hasEqualWidths() const
Returns true if all the bins have the same width.
virtual double axisBinWidth(int i) const =0
Returns the width of each bin.
std::vector< std::vector< double > > m_data
The accumulated sum of weights.
virtual int getUnderflow() const
Returns the underflow.
virtual double calcOffset(const std::string &, int parm, bool dragging) const
Calculates and returns a new range from dragging slider.
virtual const BinnerAxis * getBinnerOn(hippodraw::Axes::Type axis) const
Returns the BinnerAxis object used by this object.
virtual double getOffset() const =0
Returns the offset.
virtual const void setOffset(double offset)=0
Sets the offset and adjusts the range accordingly.
virtual double scaleFactor() const
Returns the scale factor.
virtual int axisBinNumber(double x) const =0
Returns the number of the bin in which the x value is situated.
virtual int getNumberOfAxes() const
Returns the number of axes handled by the BinsBase derived class.
bool m_values_dirty
A flag to indicate that the objects in m_values are not correct.
virtual const Range & setBinWidth(hippodraw::Axes::Type axis, double value)
Sets the bin width parameter on the specified axis.
virtual const Range & getRange(hippodraw::Axes::Type axis)
Returns range from binner axis.
int binNumberY(double y) const
Returns the number of the bin in which the y value is situated.
hippodraw::NTuple class interface.
virtual const Range & setRange(hippodraw::Axes::Type axis, const Range &, bool hold_width=true)
Sets the Range on the specified axis.
virtual void axisSetNumberOfBins(int nb)=0
Sets m_num_bins.
virtual const Range & setRange(const Range &, bool hold_width=true)=0
Sets the range.
int m_num_bins
Total number of bins not including overflow and underflow.
double axisGetLow() const
Returns the lower edge of the first bin.
Bins2DBase class interface.
~Bins2DBase()
The destructor.
virtual int getNumberOfEntries() const
Returns the true number of entries.
A DataSource class implemented with std::vector<double> to store the column data. ...
virtual void setNumberOfBins(hippodraw::Axes::Type axis, int number)
Sets the number of bins on the the specified axis.
virtual NTuple * prepareNTuple(unsigned int rows) const
Prepares the NTuple.
Bins2DBase(const char *name)
A constructor that takes bins container name as argument.
virtual double getConstWid() const =0
Returns the constant width parameter.
Expresses a range of values.
double binWidthX(int i) const
Gets the bin width of the X bin for the i bin.
virtual const Range & setBinWidth(double width)=0
Sets the bin width and adjusts the range and number of bins accordingly.
virtual double getLow(hippodraw::Axes::Type axis) const
Returns the low value of the bins on the specified axis.
virtual double getOffset(hippodraw::Axes::Type axis) const
Returns the offset parameter on specific axis.
int axisNumberOfBins() const
Returns the number of bins.
The base class for the binner hierarchy.
The base class for the 2D binner hierarchy.
int numberOfBins() const
Returns the number of bins.
void setBinnerOn(BinnerAxis *, hippodraw::Axes::Type axis)
Sets a new BinnerAxis on the axis axis for the binner to use.
virtual void setOffset(hippodraw::Axes::Type axis, double value)
Sets the offset parameter on the specified axis.
double calcBinWidth(int parm, bool dragging) const
Calculates the bin width parameter when dragging a slider control.
hippodraw::BinnerAxis class interface
virtual double binWidth(hippodraw::Axes::Type axis) const
Returns the bin width parameter on the specified axis.
virtual BinnerAxis * clone()=0
The clone function returns an object of its own kind which is a copy of this object at this moment...
const Range & getRange() const
Returns the range.
double binWidthY(int i) const
Gets the bin width of the Y bin for the i bin.
int binNumberX(double x) const
Returns the number of the bin in which the x value is situated.