48 BinnerAxis * x = binner_factory -> create (
"BinnerLinear" );
49 BinnerAxis * y = binner_factory -> create (
"BinnerLinear" );
68 m_value_range( projector.m_value_range )
96 bool have_weight =
false;
107 for (
unsigned int i = 0; i <
size; i++ )
111 double x =
m_ntuple -> valueAt ( i, ix );
112 double y =
m_ntuple -> valueAt ( i, iy );
113 double z =
m_ntuple -> valueAt ( i, iz );
163 return Range ( values );
195 }
else if ( axis ==
Axes::Y ) {
201 if( model->
isLog() ) {
202 if ( range.
low() < 0.0 )
return;
251 if ( ( axis ==
"X" || axis ==
"Y" ) ==
false )
return;
263 if( new_offset == 0.0 )
return;
303 const Range & range,
bool const_width )
316 = dynamic_cast <
const DataSource * > ( object );
318 if ( datasource != 0 ) {
331 = dynamic_cast <
const DataSource * > ( object );
333 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.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
AxisModelBase * m_x_axis
The AxisModel along the X axis.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of data on the specified axis.
An NTupleProjector is a projector that projects data from an DataSource object.
virtual void update(const Observable *object)
Updates the receiving projector.
virtual void setOffset(hippodraw::Axes::Type axis, double value)=0
Sets the offset parameter on the specified axis.
The base class for the BinnerAxis hierarchy.
BinsBase * m_binner
The binner object.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
virtual const Range & setBinWidth(hippodraw::Axes::Type axis, double v)
This function sets the binWidth.
The BinningProjector is an abstract class provides most of the functionality for a projector that doe...
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...
hippodraw::AxisModelBase class interface
virtual void setBinnerRange(hippodraw::Axes::Type axis, const Range &range, bool const_width)
Sets the Range of the binner.
virtual void setOffset(const std::string &axis, int parm, bool dragging)
virtual void update(const Observable *)
Responds to update message from the data source.
AxisModelBase * m_y_axis
The AxisModel along the Y axis.
double getPos(int column) const
Returns the minimum positive value on the specified column.
void setDirty()
Sets a flag to indicate that re-binning needs to be done.
unsigned int m_min_bindings
The minimum number of columns that must be bound.
const std::string & getZLabel() const
Returns the label (title) of the z axis.
virtual double calcBinWidth(hippodraw::Axes::Type axis, int parm, bool dragging) const =0
Calculates a new bin width base on dragging slider value.
hippodraw::DataPointTuple namespace interface
virtual void prepareValues()
Prepares the projector for plotting by executing, if needed, the binning procedure.
virtual void addPointReps()
Function to add the acceptable point reps.
bool isNull() const
Returns true if the receiving objects is a null object.
void setRange(double low, double high, double pos)
Sets the Range to the low and high values.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
Profile2DProjector class interface.
double low() const
Returns the minimum of the range object.
virtual void willDelete(const Observable *object)
If object is the target of normalization, removes the target and sets normalization off...
intp size(numeric::array arr)
Profile2DProjector()
The default constructor.
hippodraw::NTuple class interface.
A Factory singleton class for creating objects whose class derives from BinsBase. ...
virtual const std::string & getLabelAt(unsigned int index) const
Returns the label for the column at index index.
void execute()
Projects the data source into bins.
hippodraw::BinsBase class interface
Base class for DataSource.
virtual void update(const Observable *object)
Implements Observer pattern.
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
hippodraw::BinnerAxis class interface
DataSource * m_proj_values
The NTuple representing the result of the projection.
virtual void reset()=0
Resets the accumulation to zero.
virtual bool isAxisBinned(const std::string &axis) const
Returns true if the destined axis is "X" or "Y", otherwise returns false.
A derived class of BinningProjector that reads three columns of data and projects them to a two dimen...
static BinnerAxisFactory * instance()
Returns a pointer to the singleton instance.
virtual const Range & getRange(hippodraw::Axes::Type axis)=0
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
const Range & getRange(bool scaled) const
Returns the range represented by this AxisModel.
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
double high() const
Returns the maximum of the range object.
CutList_t m_cut_list
A list of cuts that filter the projection.
A namespace to set the standard for indexing into 3 dimension data point tuple.
const DataSource * m_ntuple
The pointer to the data source being projected.
A Factory singleton class for creating objects whose class derives from BinnerAxis.
virtual void setRange(hippodraw::Axes::Type axis, bool)
virtual void willDelete(const Observable *object)
Implements Observer pattern.
virtual bool isLog() const =0
Returns a boolean describing the type of the scale of the axis.
static BinsFactory * instance()
Returns a pointer to the singleton instance.
virtual const Range & setBinWidth(hippodraw::Axes::Type axis, double value)=0
Sets the bin width parameter on the specified axis.
Range dataRange(int column) const
Returns the range of data on the specified column.
The AxisModelBase class maintains the Range and scaling of an axis.
virtual void checkScaling()
Checks and sets if an AxisModelBase object on an axis should be scaled.
Type * create(const std::string &name)
Creates a new object from a prototype named name.
virtual double calcOffset(const std::string &, int parm, bool dragging) const =0
Calculates and returns a new range from dragging slider.
virtual void setBinnerOn(BinnerAxis *, hippodraw::Axes::Type axis)=0
Sets the bin calculator on specified axis.
virtual void willDelete(const Observable *)
Responds to willDelete message from the observed data source.
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.
bool isDirty() const
Returns true if the projector has been marked dirty.
Expresses a range of values.
A namespace to set the standard for indexing into 2 dimension data point tuple.
virtual Range valueRange() const
Finds the range of the projected values.
The base class for the Projector hierarchy.