14 #include "msdevstudio/MSconfig.h"
32 using namespace hippodraw;
34 #ifdef ITERATOR_MEMBER_DEFECT
46 m_x_option (
"X error (optional)" ),
47 m_y_option (
"Y error (optional)" )
81 vector< string >:: iterator first
100 vector< string >:: iterator first
176 namespace dp = hippodraw::DataPoint2DTuple;
189 unsigned int columns = 4;
192 vector < string > labels;
193 labels.push_back (
m_ntuple -> getLabelAt ( x_col ) );
194 labels.push_back (
m_ntuple -> getLabelAt ( y_col ) );
196 if ( x_err < UINT_MAX ) {
197 labels.push_back (
m_ntuple -> getLabelAt ( x_err ) );
202 if ( y_err < UINT_MAX ) {
203 labels.push_back (
m_ntuple -> getLabelAt ( y_err ) );
210 ntuple -> reserve ( size );
236 const vector < string > & labels =
m_ntuple -> getLabels ();
237 unsigned int size = labels.size();
239 if ( x_err == UINT_MAX &&
242 if ( y_err == UINT_MAX &&
248 for (
unsigned int i = 0;
i <
size;
i++ ) {
250 ( in_range ==
true &&
inRange (
i ) ==
false ) )
continue;
257 = x_err < UINT_MAX ?
m_ntuple -> valueAt (
i, x_err ) : 0.0;
259 = y_err < UINT_MAX ?
m_ntuple -> valueAt(
i, y_err ) : 0.0;
264 ntuple -> addRow ( row );
double getPos(int column) const
Returns the minimum positive value on the specified column.
CutList_t m_cut_list
A list of cuts that filter the projection.
std::string ERROR
YERR column label.
virtual bool inRange(int row) const
Checks if the entries in a given row are within the range of the axis model.
A derived class of NTupleProjector that maps 2 ntuple columns to a two dimensional projection...
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...
std::string m_x_option
The label for the X error binding option.
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
Fills the NTuple with the projected values.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
double getPosWithError(int data, int error) const
Returns the minimum positive values considering both data and error.
Range dataRange(int column) const
Returns the range of data on the specified column.
void setLabels(const std::vector< std::string > &v)
Assigns the label to each column from the vector of strings.
bool isDirty() const
Returns true if the projector has been marked dirty.
An NTupleProjector is a projector that projects data from an DataSource object.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual ~Map2Projector()
The destructor.
virtual void setYErrorOption(bool enable)
Sets whether the Y error options are to be enabled or not.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
hippodraw::NTuple class interface.
error on X or half bin width
virtual void addPointReps()
Function to add the acceptable point reps.
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.
intp size(numeric::array arr)
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.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
virtual DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
virtual void setXErrorOption(bool enable)
Sets whether the X error options are to be enabled or not.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of the data on the specified axis.
virtual Range valueRange() const
Finds the range of the projected values.
A DataSource class implemented with std::vector<double> to store the column data. ...
The base class for the Projector hierarchy.
hippodraw::AxisModelBase class interface
DataSource * m_proj_values
The NTuple representing the result of the projection.
hippodraw::Range class interface
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
Range dataRangeWithError(int data, int error) const
Returns a range considering both data and error.
Expresses a range of values.
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
std::string m_y_option
The label for the Y error binding option.
hippodraw::DataPointTuple namespace interface
unsigned int m_min_bindings
The minimum number of columns that must be bound.
std::string WIDTH
XERR column label.
Map2Projector()
This default constructor binds to the first two columns.
Base class for DataSource.
hippodraw::Map2Projector class interface