17 using namespace hippodraw;
32 m_value ( projector.m_value ),
33 m_axis ( projector.m_axis )
110 double pos = DBL_MIN;
113 pos = std::max ( pos,
m_value );
126 pos = std::max ( pos,
m_value );
177 namespace dp = hippodraw::DataPoint2DTuple;
186 const char * values[] = {
"X",
"Y",
"nil",
"nil" };
187 vector < string > labels ( values, values + 4 );
188 ntuple -> setLabels ( labels );
209 ntuple -> addRow ( row );
211 ntuple -> addRow ( row );
217 ntuple -> addRow ( row );
219 ntuple -> addRow ( row );
double pos() const
Returns the first positive element in range.
The base class for the Projector hierarchy.
hippodraw::AxisModelBase class interface
double high() const
Returns the maximum of the range object.
AxisModelBase * m_y_axis
The AxisModel along the Y axis.
virtual DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
virtual const std::string & getXLabel() const
Finds the X axis label of the plot.
Expresses a range of values.
virtual bool isEmpty() const
Returns true if the data source used by this projector is empty.
std::string m_title
A label for the line.
Base class for DataSource.
virtual const std::string & getYLabel(bool flag=false) const
Finds the Y axis label of the plot.
LineProjector(const LineProjector &)
The copy constructor.
virtual void addPointReps()
Function to add the acceptable point reps.
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
virtual int getNumberOfEntries() const
Returns the total number of entries that went into creating the projected values. ...
virtual ~LineProjector()
The virtual destructor.
DataSource * m_proj_values
The NTuple representing the result of the projection.
AxisModelBase * m_x_axis
The AxisModel along the X axis.
virtual Range valueRange() const
Finds the range of the projected values.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
A DataSource class implemented with std::vector<double> to store the column data. ...
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of the raw data.
virtual double getPosOn(hippodraw::Axes::Type) const
Returns the minimum positive value.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
void setRange(double low, double high, double pos)
Changes the current Range.
hippodraw::LineProjector class interface
int getOverflow() const
Returns the number of overflow.
virtual const Range & getRange(Axes::Type) const
Returns the Range along the specified axis.
hippodraw::Axes::Type m_axis
The axis for the value.
void setValue(double value)
Sets the value that will be projected.
int getUnderflow() const
Returns the number of underflow.
virtual ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
hippodraw::NTuple class interface.
virtual const std::string & getTitle() const
Finds the title of the plot.
double low() const
Returns the minimum of the range object.
error on X or half bin width
double m_value
The value represented.
A projector that plots a value as a horizontal or vertical line.