14 #include "msdevstudio/MSconfig.h"
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
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 );
std::vector< std::string > m_pointreps
Vector of acceptable PointReps.
An NTupleProjector is a projector that projects data from an DataSource object.
virtual Range dataRangeOn(hippodraw::Axes::Type) const
Returns the range of the data on the specified axis.
virtual DataSource * createNTuple() const
Creates an NTuple representation of the projected values.
virtual void fillProjectedValues(DataSource *ntuple, bool in_range=false) const
Fills the NTuple with the projected values.
Map2Projector()
This default constructor binds to the first two columns.
std::vector< std::string > m_binding_options
The list of binding options for the Projector.
std::string ERROR
YERR column label.
virtual double getPosOn(hippodraw::Axes::Type axis) const
Returns the minimum positive value of the data on a specified axis.
hippodraw::Map2Projector class interface
void setLabels(const std::vector< std::string > &v)
Assigns the label to each column from the vector of strings.
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...
hippodraw::AxisModelBase class interface
error on X or half bin width
double getPos(int column) const
Returns the minimum positive value on the specified column.
Range dataRangeWithError(int data, int error) const
Returns a range considering both data and error.
unsigned int m_min_bindings
The minimum number of columns that must be bound.
hippodraw::DataPointTuple namespace interface
A derived class of NTupleProjector that maps 2 ntuple columns to a two dimensional projection...
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.
A DataSource class implemented with std::vector to store the column data. ...
hippodraw::Range class interface
virtual void addPointReps()
Function to add the acceptable point reps.
intp size(numeric::array arr)
virtual Range valueRange() const
Finds the range of the projected values.
hippodraw::NTuple class interface.
virtual ~Map2Projector()
The destructor.
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
Base class for DataSource.
DataSource * m_proj_values
The NTuple representing the result of the projection.
unsigned int columns() const
Returns the number of columns or data arrays available from this DataSource.
std::vector< unsigned int > m_columns
A vector containing indexes to the columns of the DataSource.
CutList_t m_cut_list
A list of cuts that filter the projection.
ProjectorBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
const DataSource * m_ntuple
The pointer to the data source being projected.
std::string m_x_option
The label for the X error binding option.
virtual bool inRange(int row) const
Checks if the entries in a given row are within the range of the axis model.
std::string WIDTH
XERR column label.
Range dataRange(int column) const
Returns the range of data on the specified column.
double getPosWithError(int data, int error) const
Returns the minimum positive values considering both data and error.
std::string m_y_option
The label for the Y error binding option.
virtual void setXErrorOption(bool enable)
Sets whether the X error options are to be enabled or not.
bool isDirty() const
Returns true if the projector has been marked dirty.
Expresses a range of values.
A namespace to set the standard for indexing into 2 dimension data point tuple.
The base class for the Projector hierarchy.
virtual void changedNTuple()
This function is called when the ntuple has been changed to a new one.