15 #include "msdevstudio/MSconfig.h" 35 #ifdef ITERATOR_MEMBER_DEFECT 38 using std::accumulate;
49 m_y_label (
"Density" ),
155 unsigned int columns = 4;
158 vector < string > labels;
159 labels.push_back (
"X" );
160 labels.push_back (
"Value" );
183 vector < double > col =
m_ntuple -> getColumn ( x_col );
184 std::sort(col.begin(), col.end());
188 for (
unsigned int i = 0; i <
m_bin_num; i++ ) {
195 if (i==m_bin_num-1) row[
dp::XERR] = col[size-1]-col[k];
198 while ((row[
dp::XERR]==0) && (i!=m_bin_num-1)) {
202 if ( i==m_bin_num-1 ) row[
dp::XERR] = col[size-1]-col[k];
218 ntuple -> addRow (row);
276 return Range ( 0.0, 1.0, 0.5 );
280 return Range ( values );
virtual void changedNTuple()
This function is called when the NTuple has been changed to a new one.
A namespace to set the standard for indexing into 2 dimension data point tuple.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
virtual const Range & setBinWidth(Axes::Type axis, int parm, bool dragging)
Sets the number of bins in this class.
hippodraw;:EqualEntriesHist1Projector class interface
std::string m_y_label
The label for the y axis.
unsigned int m_min_bindings
The minimum number of columns that must be bound.
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
virtual double getAverage(hippodraw::Axes::Type axis) const
Get the Average of all projected values on the specified axis.
virtual bool isAxisBinned(const std::string &axis) const
Returns true if specified axis is binned.
hippodraw::AxisModelBase class interface
void setLabels(const std::vector< std::string > &v)
Assigns the label to each column from the vector of strings.
void adjustNumberOfBins()
Make sure the number of bins between 1 and number of rows.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
DataSource * m_proj_values
The NTuple representing the result of the projection.
virtual int getUnderflow() const
Returns underflow.
NTupleSorter class interface.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
virtual double getBinWidth(Axes::Type axis) const
Get the number of bins in this class.
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
unsigned int m_bin_num
The number of bins.
std::string ERROR
YERR column label.
const DataSource * m_ntuple
The pointer to the data source being projected.
double getPos(int column) const
Returns the minimum positive value on the specified column.
unsigned int m_start_num
The number of bins when dragging starts.
virtual int getOverflow() const
Returns overflow.
hippodraw::NTuple class interface.
Base class for DataSource.
intp size(numeric::array arr)
A derived class of NTupleProjector that projects a column of data into a one dimensional histogram...
std::string WIDTH
XERR column label.
A DataSource class implemented with std::vector<double> to store the column data. ...
Range m_range
The range of the data source.
virtual DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
EqualEntriesHist1DProjector()
The default constructor.
Expresses a range of values.
The base class for the Projector hierarchy.
An NTupleProjector is a projector that projects data from an DataSource object.
Range dataRangeOnValue() const
virtual const std::string & getYLabel(bool density=false) const
Returns the label of the axis.
hippodraw::DataPointTuple namespace interface
virtual void addPointReps()
Function to add the acceptable point reps.
error on X or half bin width
Range dataRange(int column) const
Returns the range of data on the specified column.
virtual Range dataRangeOn(hippodraw::Axes::Type axis) const
Returns the range of the data on a specified axis.
virtual Range valueRange() const
Finds the range of the projected values.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.