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