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 bool isAxisBinned(const std::string &axis) const
Returns true if specified axis is binned.
double getPos(int column) const
Returns the minimum positive value on the specified column.
void adjustNumberOfBins()
Make sure the number of bins between 1 and number of rows.
unsigned int m_bin_num
The number of bins.
EqualEntriesHist1DProjector()
The default constructor.
NTupleSorter class interface.
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
std::string WIDTH
XERR column label.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
Range m_range
The range of the data source.
Range dataRange(int column) const
Returns the range of data on the specified column.
virtual void addPointReps()
Function to add the acceptable point reps.
Range dataRangeOnValue() const
unsigned int m_start_num
The number of bins when dragging starts.
void setLabels(const std::vector< std::string > &v)
Assigns the label to each column from the vector of strings.
An NTupleProjector is a projector that projects data from an DataSource object.
virtual const Range & setBinWidth(Axes::Type axis, int parm, bool dragging)
Sets the number of bins in this class.
hippodraw::NTuple class interface.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
virtual double getBinWidth(Axes::Type axis) const
Get the number of bins in this class.
error on X or half bin width
virtual int getOverflow() const
Returns overflow.
const DataSource * m_ntuple
The pointer to the data source being projected.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
A derived class of NTupleProjector that projects a column of data into a one dimensional histogram...
virtual Range valueRange() const
Finds the range of the projected values.
hippodraw::AxisModelBase class interface
A DataSource class implemented with std::vector<double> to store the column data. ...
The base class for the Projector hierarchy.
virtual Range dataRangeOn(hippodraw::Axes::Type axis) const
Returns the range of the data on a specified axis.
DataSource * m_proj_values
The NTuple representing the result of the projection.
hippodraw::DataPointTuple namespace interface
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
hippodraw;:EqualEntriesHist1Projector class interface
virtual int getUnderflow() const
Returns underflow.
std::string ERROR
YERR column label.
intp size(numeric::array arr)
virtual double getAverage(hippodraw::Axes::Type axis) const
Get the Average of all projected values on the specified axis.
virtual void changedNTuple()
This function is called when the NTuple has been changed to a new one.
Expresses a range of values.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
A namespace to set the standard for indexing into 2 dimension data point tuple.
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 DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
virtual const std::string & getYLabel(bool density=false) const
Returns the label of the axis.
Base class for DataSource.