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