Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MapMatrixProjector Class Reference

#include <MapMatrixProjector.h>

Inheritance diagram for MapMatrixProjector:

Inheritance graph
[legend]
Collaboration diagram for MapMatrixProjector:

Collaboration graph
[legend]
List of all members.

Detailed Description

A derived class of NTupleProjector that maps 1 NTuple column to a Y axis of two dimensional projection.

The X axis is generated by the row number. A NTuple is created with the projected values for presentation to clients.

Todo:
Optionally, an additional column can be mapped to Y error bars.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 29 of file MapMatrixProjector.h.

Public Types

typedef void(hippodraw::Observer::* Action )(const Observable *)
 The member function of the Observer that is called.
typedef std::list< hippodraw::Observer * > ObserverList_t
 The type of STL container to maintain list of Observer objects.

Public Member Functions

bool acceptRow (unsigned int i) const
 For row i of the column, returns true if all the cuts accept the row.
virtual void addCut (const TupleCut *cut)
 Adds the cut to the list of cuts.
void addObserver (hippodraw::Observer *)
 Adds an Observer to the Observer list.
virtual void addValues (const std::vector< double > &v)
 Add values to the projection.
virtual const std::vector<
std::string > & 
bindingOptions () const
 Returns a vector of strings describing the binding options.
unsigned int calcColumnIndex (unsigned int row) const
 Calculates the index of the column of the matrix, given the row of the NTuple.
double calcColumnValue (unsigned int row) const
 Calculates the value of the column coordinate given the row of the NTuple.
unsigned int calcRowIndex (unsigned int row) const
 Calculates the index of the row of the matrix, given the row of the NTuple.
double calcRowValue (unsigned int row) const
 Calculates the value of the row coordinate given the row of the NTuple.
ProjectorBaseclone ()
 The clone function returns an object of its own kind which is a copy of this object at this moment.
virtual DataSourcecreateNTuple () const
 Creates an NTuple representation of the projected values.
virtual const DataSourcecreateOldStyleNTuple () const
virtual Range dataRangeOn (hippodraw::Axes::Type) const
 Returns the range of the data on the specified axis.
virtual double getAverage (hippodraw::Axes::Type axis) const
 Get the Average of all projected values on the specified axis.
virtual const std::vector<
std::string > & 
getAxisBindings () const
 Returns the current axis bindings.
virtual AxisModelBasegetAxisModel (hippodraw::Axes::Type axis) const
 Get the AxisModel for axis axis.
virtual double getBinWidth (hippodraw::Axes::Type axis) const
 Returns the step size along the axis axis.
const std::vector< const TupleCut * > & getCutList () const
 Returns the list of TupleCut objects used by this projector.
virtual DataSourcegetNTuple ()
 Returns the DataSource used by the projector.
virtual const DataSourcegetNTuple () const
 Returns the DataSoruce used by the projector.
virtual NTuplegetNTupleAfterCuts () const
 Template for projectors that can return subsets of the NTuple used by the DataRep.
virtual const std::stringgetNTupleName () const
 Returns the name of the NTuple used by this projector.
virtual int getNumberOfBins (hippodraw::Axes::Type axis) const
 Returns the number of bins.
int getNumberOfEntries () const
 Returns the number of entries in to the projected values list.
const ObserverList_tgetObservers () const
 Returns the list of observers.
virtual double getOffset (hippodraw::Axes::Type axis) const
 Returns the origin along the axis axis.
const std::vector< std::string > & getPointReps () const
 Return the vector of Point Reps.
virtual double getPosOn (hippodraw::Axes::Type axis) const
 Returns the minimum positive value of the data on a specified axis.
const DataSourcegetProjectedValues () const
 Returns ntuple representation of projected values.
virtual const RangegetRange (hippodraw::Axes::Type) const
 Returns the Range along the specified axis.
virtual double getRMS (hippodraw::Axes::Type axis)
 Returns the RMS.
virtual const std::stringgetTitle () const
 Finds the title of the plot.
const std::stringgetXLabel () const
 Returns the label (title) of the x axis.
double getXStep () const
 Returns the size of the step along the X axis.
const std::stringgetYLabel (bool flag) const
 Returns the label for the Y axis.
double getYStep () const
 Returns the size of the step along the Y axis.
const std::stringgetZLabel () const
 Returns the label of the z axis.
virtual double getZValue (double x, double y) const
 Returns the value at the coordinate.
int indexOf (const std::string &label) const
 Returns the index of the label.
unsigned int indexOfBindingOption (const std::string &axis) const
 Returns an index to the binding option.
virtual bool inRange (int row) const
 Checks if the entries in a given row are within the range of the axis model.
virtual bool isAxisBinned (const std::string &axis) const
 Returns true if specified axis is binned.
bool isDataValid () const
 Returns true if all the data in the bound DataSource is valid.
bool isDirty () const
 Returns true if the projector has been marked dirty.
virtual bool isEmpty () const
 Returns true if the data source used by this projector is empty.
virtual bool isValueBinned () const
 Returns true if the projected values are the result of binning.
 MapMatrixProjector ()
 This default constructor binds to the first two columns.
virtual void matrixTranspose (bool yes)
 Transposes the X and Y axis of the contained matrix.
virtual void normalizeTo (double norm)
 Sets a scale factor on the output so that the number of entries appears to be number.
virtual void normalizeTo (const ProjectorBase *target)
 Sets the target of normalization.
virtual void notifyObservers () const
 Notifies Observer objects of a change.
virtual Range preferredRange (hippodraw::Axes::Type) const
 Returns the preferred Range.
virtual void prepareValues ()
 Informs the projector to prepare its projected values for plotting.
virtual void removeCut (const TupleCut *cut)
 Removes the cut from the cut list.
void removeObserver (hippodraw::Observer *)
 Removes an Observer from the Observer list.
virtual void reset ()
 Resets the bins.
virtual void setAxisBinding (const std::string &axis, const std::string &label)
 Sets the axis binding.
virtual void setAxisBindings (const std::vector< std::string > &labels)
 Sets the axis bindings, Sets, in the order of the binding options, the binding to the NTuple by labels contained in labels.
virtual void setAxisModel (hippodraw::Axes::Type axis, AxisModelBase *)
 Sets the AxisModel for axis axis.
virtual void setBinWidth (const std::string &axis, int parm, bool dragging)
 Sets the bin width.
virtual void setBinWidth (hippodraw::Axes::Type axis, double step)
 Sets the bin width.
virtual void setDirty (bool value=true)
 Sets the dirty flag to value.
virtual void setNormalizing (bool on)
 Sets the scaling number of entries on if on is true, otherwise turns if off.
virtual void setNTuple (const DataSource *ntuple)
 Changes the DataSource used for the projections to source.
virtual void setNumberOfBins (hippodraw::Axes::Type axis, unsigned int number)
 Sets the number of steps.
virtual void setOffset (const std::string &axis, int parm, bool dragging)
 Sets the bin offset.
virtual void setOffset (hippodraw::Axes::Type axis, double origin)
 Sets the bin offset.
virtual void setRange (hippodraw::Axes::Type axis, bool const_width=true)
 Sets the range of the selected axis.
virtual void setXErrorOption (bool enable)
 Sets whether the X error options are to be enabled or not.
virtual void setYErrorOption (bool enable)
 Sets whether the Y error options are to be enabled or not.
virtual void update (const Observable *)
 Responds to update message from the data source.
virtual Range valueRange () const
 Finds the range of the projected values.
virtual bool wantsScaleFactor (const std::string &axis) const
 Returns whether the projector wants scale factor.
virtual void willDelete (const Observable *)
 Responds to willDelete message from the observed data source.
 ~MapMatrixProjector ()
 The destructor.

Protected Member Functions

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.
Range dataRange (int column) const
 Returns the range of data on the specified column.
Range dataRangeWithError (int data, int error) const
 Returns a range considering both data and error.
virtual void fillDataSource (DataSource *ntuple, bool in_range=false) const
 Fills the DataSource source with the projected values.
virtual void fillProjectedValues (DataSource *ntuple, bool in_range=false) const
 Fills the NTuple ntuple with the projected values.
double getPos (int column) const
 Returns the minimum positive value on the specified column.
double getPosWithError (int data, int error) const
 Returns the minimum positive values considering both data and error.
 MapMatrixProjector (const MapMatrixProjector &projector)
 The copy constructor.
void notifyObservers (Action action) const
 An internal method to iterate over all observers and to send the message action.
void setAxisBinding (int axis, const std::string &label)
 Sets the axis binding for axis binding option to the column with label label.

Protected Attributes

std::vector< std::stringm_binding_options
 The list of binding options for the Projector.
std::vector< std::stringm_bindings
 The list of current bindings.
std::vector< unsigned int > m_columns
 A vector containing indexes to the columns of the NTuple.
std::vector< const TupleCut * > m_cut_list
 A list of cuts that filter the projection.
unsigned int m_min_bindings
 The minimum number of columns that must be bound.
const DataSourcem_ntuple
 The pointer to the data source being projected.
std::vector< std::stringm_pointreps
 Vector of acceptable PointReps.
DataSourcem_proj_values
 The NTuple representing the result of the projection.
const ProjectorBasem_target
 The target projector.
AxisModelBasem_x_axis
 The AxisModel along the X axis.
AxisModelBasem_y_axis
 The AxisModel along the Y axis.
AxisModelBasem_z_axis
 The AxisModel along the Z axis.
std::string m_z_label
 Dummy member so that getZLabel can return a reference.

Private Attributes

unsigned int m_cols
 The number of columns for each row.
double m_null_value
 The value of the null value.
unsigned int m_rows
 The number of rows for each column.
double m_scale_factor
 The scale factor.
bool m_transpose
 A flag to indicate if the X-Y matrix should be transposed or not.
std::string m_x_label
 The label for the generated x axis.
double m_x_origin
 The origin along the X axis.
double m_x_step
 The step along the X axis.
std::string m_y_label
 The label for the generated y axis.
double m_y_origin
 The origin along the Y axis.
double m_y_step
 The step along the Y axis.


Member Typedef Documentation

typedef void( hippodraw::Observer::* Observable::Action)(const Observable *) [inherited]
 

The member function of the Observer that is called.

Definition at line 83 of file Observable.h.

typedef std::list< hippodraw::Observer * > Observable::ObserverList_t [inherited]
 

The type of STL container to maintain list of Observer objects.

Definition at line 46 of file Observable.h.


Constructor & Destructor Documentation

MapMatrixProjector::MapMatrixProjector const MapMatrixProjector projector  )  [protected]
 

The copy constructor.

Definition at line 71 of file MapMatrixProjector.cxx.

References addPointReps().

MapMatrixProjector::MapMatrixProjector  ) 
 

This default constructor binds to the first two columns.

Definition at line 53 of file MapMatrixProjector.cxx.

References addPointReps(), NTupleProjector::m_binding_options, and NTupleProjector::m_min_bindings.

Referenced by clone().

MapMatrixProjector::~MapMatrixProjector  ) 
 

The destructor.

Definition at line 87 of file MapMatrixProjector.cxx.


Member Function Documentation

bool NTupleProjector::acceptRow unsigned int  i  )  const [inherited]
 

For row i of the column, returns true if all the cuts accept the row.

Definition at line 159 of file NTupleProjector.cxx.

References NTupleProjector::m_cut_list, NTupleProjector::m_ntuple, and num_util::size().

Referenced by ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), fillDataSource(), Map3Projector::fillDataSource(), Map2Projector::fillDataSource(), Map1Projector::fillDataSource(), StripChartProjector::fillProjectedValues(), fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), NTupleProjector::getAverage(), DyHist1DProjector::getAverage(), NTupleProjector::getNTupleAfterCuts(), and NTupleProjector::getNumberOfEntries().

void NTupleProjector::addCut const TupleCut cut  )  [virtual, inherited]
 

Adds the cut to the list of cuts.

Definition at line 348 of file NTupleProjector.cxx.

References NTupleProjector::m_cut_list.

Referenced by NTupleProjectorXML::addCuts(), and CutController::linkCutAndRep().

void Observable::addObserver hippodraw::Observer  )  [inherited]
 

Adds an Observer to the Observer list.

Definition at line 49 of file Observable.cxx.

References Observable::m_list.

Referenced by CutPlotter::addCutTarget(), XyPlotter::addDataRep(), FunctionRep::FunctionRep(), BinningProjector::normalizeTo(), DataRepController::setAxisBindings(), DisplayController::setNTuple(), CutPlotter::setNTuple(), and TextPlotter::setParentDataRep().

void MapMatrixProjector::addPointReps  )  [protected, virtual]
 

Function to add the acceptable point reps.

Implements ProjectorBase.

Definition at line 328 of file MapMatrixProjector.cxx.

References ProjectorBase::m_pointreps.

Referenced by MapMatrixProjector().

void ProjectorBase::addValues const std::vector< double > &  v  )  [virtual, inherited]
 

Add values to the projection.

This method is provided as convenience for derived classes that respond to it. The implementation in this class does nothing.

Reimplemented in StHist1DProjector, and StHist2DProjector.

Definition at line 312 of file ProjectorBase.cxx.

const vector< string > & NTupleProjector::bindingOptions  )  const [virtual, inherited]
 

Returns a vector of strings describing the binding options.

Definition at line 97 of file NTupleProjector.cxx.

References NTupleProjector::m_binding_options.

Referenced by DataRepController::bindingOptions().

unsigned int MapMatrixProjector::calcColumnIndex unsigned int  row  )  const [inline]
 

Calculates the index of the column of the matrix, given the row of the NTuple.

Definition at line 240 of file MapMatrixProjector.h.

References m_rows.

Referenced by calcColumnValue(), calcRowIndex(), and inRange().

double MapMatrixProjector::calcColumnValue unsigned int  row  )  const [inline]
 

Calculates the value of the column coordinate given the row of the NTuple.

Definition at line 250 of file MapMatrixProjector.h.

References calcColumnIndex(), m_x_origin, and m_x_step.

unsigned int MapMatrixProjector::calcRowIndex unsigned int  row  )  const [inline]
 

Calculates the index of the row of the matrix, given the row of the NTuple.

Definition at line 260 of file MapMatrixProjector.h.

References calcColumnIndex(), and m_rows.

Referenced by calcRowValue(), and inRange().

double MapMatrixProjector::calcRowValue unsigned int  row  )  const [inline]
 

Calculates the value of the row coordinate given the row of the NTuple.

Definition at line 270 of file MapMatrixProjector.h.

References calcRowIndex(), m_y_origin, and m_y_step.

void MapMatrixProjector::changedNTuple  )  [protected, virtual]
 

This function is called when the NTuple has been changed to a new one.

The X and Y axis indexes are checked for validity and reset to the last column if invalid. The X and Y error indexes are checked for validity and reset to negative if they are invalid.

Implements NTupleProjector.

Definition at line 202 of file MapMatrixProjector.cxx.

References DataSource::columns(), NTupleProjector::m_columns, and NTupleProjector::m_ntuple.

ProjectorBase * MapMatrixProjector::clone  )  [virtual]
 

The clone function returns an object of its own kind which is a copy of this object at this moment.

Implements ProjectorBase.

Definition at line 91 of file MapMatrixProjector.cxx.

References MapMatrixProjector().

DataSource * MapMatrixProjector::createNTuple  )  const [virtual]
 

Creates an NTuple representation of the projected values.

Derived classes should create a representation appropriate for their projection. They should at least include the coordinates, the width of the coordinates, the value and the error on the value.

Implements ProjectorBase.

Definition at line 390 of file MapMatrixProjector.cxx.

References fillProjectedValues(), getXLabel(), getYLabel(), getZLabel(), NTupleProjector::m_columns, and NTupleProjector::m_ntuple.

Referenced by prepareValues().

const DataSource * ProjectorBase::createOldStyleNTuple  )  const [virtual, inherited]
 

Reimplemented in BinningProjector.

Definition at line 345 of file ProjectorBase.cxx.

References ProjectorBase::getProjectedValues(), and ProjectorBase::prepareValues().

Range NTupleProjector::dataRange int  column  )  const [protected, inherited]
 

Returns the range of data on the specified column.

The range may need to be calculated.

Definition at line 288 of file NTupleProjector.cxx.

References DataSource::columns(), NTupleProjector::m_is_valid, and NTupleProjector::m_ntuple.

Referenced by ProfileProjector::dataRangeOn(), Profile2DProjector::dataRangeOn(), dataRangeOn(), Map3Projector::dataRangeOn(), Map2Projector::dataRangeOn(), Map1Projector::dataRangeOn(), DyHist2DProjector::dataRangeOn(), DyHist1DProjector::dataRangeOn(), and Map3Projector::valueRange().

Range MapMatrixProjector::dataRangeOn hippodraw::Axes::Type   )  const [virtual]
 

Returns the range of the data on the specified axis.

The range may need to be calculated.

Implements NTupleProjector.

Definition at line 216 of file MapMatrixProjector.cxx.

References NTupleProjector::dataRange(), m_cols, NTupleProjector::m_columns, m_rows, m_x_origin, m_x_step, m_y_origin, m_y_step, Range::setRange(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by valueRange().

Range NTupleProjector::dataRangeWithError int  data,
int  error
const [protected, inherited]
 

Returns a range considering both data and error.

Definition at line 263 of file NTupleProjector.cxx.

References DataSource::columns(), NTupleProjector::getPosWithError(), NTupleProjector::m_ntuple, std::max(), std::min(), and num_util::size().

Referenced by Map2Projector::dataRangeOn(), and Map1Projector::dataRangeOn().

void MapMatrixProjector::fillDataSource DataSource ntuple,
bool  in_range = false
const [protected, virtual]
 

Fills the DataSource source with the projected values.

Fills the DataSource source with the results of projecting the data source to projected values. Derived classes must implement this method. Clients, such as plotters or fitters, can then use getProjectedValues method to access the projected value data. The default behavior is to fill the DataSource with all values that are accepted by the TupleCut objects, if any. If in_range is equal to true, then the values used to fill the DataSource are further restricted to be within the axes ranges. Some derived classes may always use the default behavior.

Implements ProjectorBase.

Definition at line 482 of file MapMatrixProjector.cxx.

References std::abs(), NTupleProjector::acceptRow(), m_cols, NTupleProjector::m_columns, NTupleProjector::m_ntuple, m_null_value, m_rows, m_transpose, m_x_origin, m_x_step, m_y_origin, m_y_step, num_util::shape(), hippodraw::DataPoint2DTuple::SIZE, hippodraw::Axes::X, hippodraw::DataPoint2DTuple::XERR, hippodraw::Axes::Y, hippodraw::DataPoint2DTuple::YERR, hippodraw::Axes::Z, and hippodraw::DataPoint3DTuple::ZERR.

void MapMatrixProjector::fillProjectedValues DataSource ntuple,
bool  in_range = false
const [protected, virtual]
 

Fills the NTuple ntuple with the projected values.

Fills the NTuple !ntuple with the results of projecting the data source to projected values. Derived classes must implement this method. Clients, such as plotters or fitters, can then use getProjectedValues method to access the projected value data. The default behavior is to fill the NTuple with all values that are accepted by the TupleCut objects, if any. If in_range is equal to true, then the values used to fill the NTuple are further restricted to be within the axes ranges. Some derived classes may always use the default behavior.

Implements ProjectorBase.

Definition at line 417 of file MapMatrixProjector.cxx.

References std::abs(), NTupleProjector::acceptRow(), m_cols, NTupleProjector::m_columns, NTupleProjector::m_ntuple, m_null_value, m_rows, m_transpose, m_x_origin, m_x_step, m_y_origin, m_y_step, num_util::shape(), hippodraw::DataPoint2DTuple::SIZE, hippodraw::Axes::X, hippodraw::DataPoint2DTuple::XERR, hippodraw::Axes::Y, hippodraw::DataPoint2DTuple::YERR, hippodraw::Axes::Z, and hippodraw::DataPoint3DTuple::ZERR.

Referenced by createNTuple(), and prepareValues().

double MapMatrixProjector::getAverage hippodraw::Axes::Type  axis  )  const [virtual]
 

Get the Average of all projected values on the specified axis.

Bug:
Averge value might be wrong, or data is bad.
In test_FitsImage.py, the left had EGRET plot gets overage x and y of 0.0, while the right hand plot is 0.25

Reimplemented from NTupleProjector.

Definition at line 292 of file MapMatrixProjector.cxx.

References std::accumulate(), num_util::data(), ProjectorBase::getProjectedValues(), prepareValues(), num_util::size(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

const std::vector< std::string > & NTupleProjector::getAxisBindings  )  const [virtual, inherited]
 

Returns the current axis bindings.

Returns the label for each column to which the projector is bound. If column is not bound, returns the string "nil" for that column.

Reimplemented from ProjectorBase.

Definition at line 124 of file NTupleProjector.cxx.

References DataSource::getLabelAt(), NTupleProjector::m_bindings, NTupleProjector::m_columns, NTupleProjector::m_ntuple, and num_util::size().

Referenced by DisplayController::axisBindings(), and NTupleProjectorXML::createElement().

AxisModelBase * ProjectorBase::getAxisModel hippodraw::Axes::Type  axis  )  const [virtual, inherited]
 

Get the AxisModel for axis axis.

Definition at line 204 of file ProjectorBase.cxx.

References ProjectorBase::m_x_axis, ProjectorBase::m_y_axis, ProjectorBase::m_z_axis, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by CompositePlotter::processReturnValue(), and ContourPointRep::setContourValues().

double MapMatrixProjector::getBinWidth hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the step size along the axis axis.

Reimplemented from ProjectorBase.

Definition at line 138 of file MapMatrixProjector.cxx.

References m_scale_factor, m_x_step, m_y_step, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by MapMatrixProjectorXML::createElement().

const vector< const TupleCut * > & NTupleProjector::getCutList  )  const [inherited]
 

Returns the list of TupleCut objects used by this projector.

Definition at line 362 of file NTupleProjector.cxx.

References NTupleProjector::m_cut_list.

Referenced by CutController::connectDataRep(), and NTupleProjectorXML::createChildren().

DataSource * NTupleProjector::getNTuple  )  [virtual, inherited]
 

Returns the DataSource used by the projector.

Todo:
Should be changed to getDatSource().

Definition at line 420 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

const DataSource * NTupleProjector::getNTuple  )  const [virtual, inherited]
 

Returns the DataSoruce used by the projector.

Todo:
Should be changed to getDatSource().

Definition at line 412 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

Referenced by NTupleProjectorXML::createElement(), NTupleProjector::getAverage(), DyHist1DProjector::getAverage(), DisplayController::getDataSourceLabels(), and DisplayController::getNTuple().

NTuple * NTupleProjector::getNTupleAfterCuts  )  const [virtual, inherited]
 

Template for projectors that can return subsets of the NTuple used by the DataRep.

Reimplemented from ProjectorBase.

Definition at line 492 of file NTupleProjector.cxx.

References NTupleProjector::acceptRow(), DataSource::columns(), DataSource::getLabels(), NTupleProjector::m_ntuple, DataSource::rows(), NTuple::setLabels(), and num_util::size().

const string & NTupleProjector::getNTupleName  )  const [virtual, inherited]
 

Returns the name of the NTuple used by this projector.

Definition at line 425 of file NTupleProjector.cxx.

References DataSource::getName(), and NTupleProjector::m_ntuple.

Referenced by DisplayController::getDataSourceName().

int MapMatrixProjector::getNumberOfBins hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the number of bins.

Returns the number of steps along the axis axis.

Reimplemented from ProjectorBase.

Definition at line 108 of file MapMatrixProjector.cxx.

References m_cols, m_rows, hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by MapMatrixProjectorXML::createElement().

int NTupleProjector::getNumberOfEntries  )  const [virtual, inherited]
 

Returns the number of entries in to the projected values list.

Implements ProjectorBase.

Definition at line 369 of file NTupleProjector.cxx.

References NTupleProjector::acceptRow(), NTupleProjector::inRange(), NTupleProjector::m_ntuple, DataSource::rows(), and num_util::size().

const Observable::ObserverList_t & Observable::getObservers  )  const [inherited]
 

Returns the list of observers.

Definition at line 57 of file Observable.cxx.

References Observable::m_list.

double MapMatrixProjector::getOffset hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the origin along the axis axis.

Reimplemented from ProjectorBase.

Definition at line 170 of file MapMatrixProjector.cxx.

References m_x_origin, m_y_origin, hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by MapMatrixProjectorXML::createElement().

const vector< string > & ProjectorBase::getPointReps  )  const [inherited]
 

Return the vector of Point Reps.

Definition at line 317 of file ProjectorBase.cxx.

References ProjectorBase::m_pointreps.

double NTupleProjector::getPos int  column  )  const [protected, inherited]
 

Returns the minimum positive value on the specified column.

Definition at line 330 of file NTupleProjector.cxx.

References DataSource::columns(), NTupleProjector::m_ntuple, and num_util::size().

Referenced by ProfileProjector::getPosOn(), Profile2DProjector::getPosOn(), getPosOn(), Map3Projector::getPosOn(), Map2Projector::getPosOn(), Map1Projector::getPosOn(), DyHist2DProjector::getPosOn(), and DyHist1DProjector::getPosOn().

double MapMatrixProjector::getPosOn hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the minimum positive value of the data on a specified axis.

Implements ProjectorBase.

Definition at line 250 of file MapMatrixProjector.cxx.

References std::abs(), NTupleProjector::getPos(), NTupleProjector::getPosWithError(), NTupleProjector::m_columns, m_x_step, m_y_step, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

double NTupleProjector::getPosWithError int  data,
int  error
const [protected, inherited]
 

Returns the minimum positive values considering both data and error.

Definition at line 301 of file NTupleProjector.cxx.

References DataSource::columns(), NTupleProjector::m_ntuple, std::min(), and num_util::size().

Referenced by NTupleProjector::dataRangeWithError(), getPosOn(), Map2Projector::getPosOn(), and Map1Projector::getPosOn().

const DataSource * ProjectorBase::getProjectedValues  )  const [inherited]
 

Returns ntuple representation of projected values.

Definition at line 338 of file ProjectorBase.cxx.

References ProjectorBase::m_proj_values.

Referenced by BinningProjectorXML::createChildren(), ProjectorBase::createOldStyleNTuple(), StHist2DProjector::getAverage(), StHist1DProjector::getAverage(), getAverage(), Map1Projector::getAverage(), ProjectorBase::getRMS(), and FunctionProjector::initializeFunction().

const Range & ProjectorBase::getRange hippodraw::Axes::Type   )  const [virtual, inherited]
 

Returns the Range along the specified axis.

The behavior implemented here is to return the range of the AxisModelBase owned by the PlotterBase. However, derived classes may override this function, such as projectors that have binners, if this behavior is incorrect.

Definition at line 145 of file ProjectorBase.cxx.

References AxisModelBase::getRange(), ProjectorBase::m_x_axis, ProjectorBase::m_y_axis, ProjectorBase::m_z_axis, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by LineProjector::dataRangeOn(), LineProjector::fillDataSource(), LineProjector::fillProjectedValues(), NTupleProjector::getAverage(), DyHist1DProjector::getAverage(), LineProjector::getPosOn(), and LineProjector::valueRange().

double ProjectorBase::getRMS hippodraw::Axes::Type  axis  )  [virtual, inherited]
 

Returns the RMS.

Returns the root mean square of the data points along the axis axis.

Definition at line 279 of file ProjectorBase.cxx.

References ProjectorBase::getProjectedValues(), ProjectorHelper::stdCoord(), and hippodraw::Axes::X.

const string & NTupleProjector::getTitle  )  const [virtual, inherited]
 

Finds the title of the plot.

This implementation gets the title from the NTuple.

Implements ProjectorBase.

Definition at line 248 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple, and DataSource::title().

const string & MapMatrixProjector::getXLabel  )  const [virtual]
 

Returns the label (title) of the x axis.

Gets it from the NTuple object.

Reimplemented from NTupleProjector.

Definition at line 267 of file MapMatrixProjector.cxx.

References m_x_label.

Referenced by createNTuple().

double MapMatrixProjector::getXStep  )  const [inline]
 

Returns the size of the step along the X axis.

Definition at line 280 of file MapMatrixProjector.h.

References m_x_step.

const string & MapMatrixProjector::getYLabel bool  flag  )  const [virtual]
 

Returns the label for the Y axis.

The argument flag is ignored.

Reimplemented from NTupleProjector.

Definition at line 272 of file MapMatrixProjector.cxx.

References m_y_label.

Referenced by createNTuple().

double MapMatrixProjector::getYStep  )  const [inline]
 

Returns the size of the step along the Y axis.

Definition at line 288 of file MapMatrixProjector.h.

References m_y_step.

const string & MapMatrixProjector::getZLabel  )  const [virtual]
 

Returns the label of the z axis.

Returns the column label from the NTuple.

Reimplemented from ProjectorBase.

Definition at line 279 of file MapMatrixProjector.cxx.

References DataSource::getLabelAt(), NTupleProjector::m_columns, and NTupleProjector::m_ntuple.

Referenced by createNTuple().

double MapMatrixProjector::getZValue double  x,
double  y
const [virtual]
 

Returns the value at the coordinate.

Bug:
Not sure we're picking up the right bin.
This might be cause of last two plots in test_FitsImage.py not having the same average value.

Reimplemented from ProjectorBase.

Definition at line 363 of file MapMatrixProjector.cxx.

References m_cols, NTupleProjector::m_columns, NTupleProjector::m_ntuple, m_rows, m_transpose, m_x_origin, m_x_step, m_y_origin, m_y_step, and num_util::size().

int NTupleProjector::indexOf const std::string label  )  const [inherited]
 

Returns the index of the label.

For example, the column index.

Definition at line 144 of file NTupleProjector.cxx.

References DataSource::indexOf(), and NTupleProjector::m_ntuple.

Referenced by NTupleProjector::getAverage(), and DyHist1DProjector::getAverage().

unsigned int NTupleProjector::indexOfBindingOption const std::string axis  )  const [inherited]
 

Returns an index to the binding option.

The parameter axis should match one of the strings returned by binding Options(). If not, an assertion is made.

Definition at line 103 of file NTupleProjector.cxx.

References std::find(), and NTupleProjector::m_binding_options.

Referenced by NTupleProjector::setAxisBinding().

bool MapMatrixProjector::inRange int  row  )  const [virtual]
 

Checks if the entries in a given row are within the range of the axis model.

Reimplemented from NTupleProjector.

Definition at line 184 of file MapMatrixProjector.cxx.

References calcColumnIndex(), calcRowIndex(), Range::excludes(), AxisModelBase::getRange(), NTupleProjector::m_columns, NTupleProjector::m_ntuple, ProjectorBase::m_x_axis, ProjectorBase::m_y_axis, and ProjectorBase::m_z_axis.

bool ProjectorBase::isAxisBinned const std::string axis  )  const [virtual, inherited]
 

Returns true if specified axis is binned.

An axis that is binned responds to the width and offset controls. This base class implementation returns false.

Reimplemented in DyHist1DProjector, DyHist2DProjector, Profile2DProjector, ProfileProjector, StHist1DProjector, and StHist2DProjector.

Definition at line 121 of file ProjectorBase.cxx.

Referenced by CompositePlotter::getBinWidth(), CompositePlotter::getOffset(), DisplayController::isAxisBinned(), DisplayController::setBinner(), and BinningProjector::setBinnerOn().

bool NTupleProjector::isDataValid  )  const [inherited]
 

Returns true if all the data in the bound DataSource is valid.

Definition at line 516 of file NTupleProjector.cxx.

References NTupleProjector::m_is_valid.

bool ProjectorBase::isDirty  )  const [inherited]
 

Returns true if the projector has been marked dirty.

A dirty projector is one whose projected values are invalid because of some change (e.g., an axis range has changed.)

Definition at line 70 of file ProjectorBase.cxx.

References ProjectorBase::m_isDirty.

Referenced by BinningProjector::createOldStyleNTuple(), Profile2DProjector::dataRangeOn(), DataRep::isDirty(), prepareValues(), Map2Projector::prepareValues(), FunctionProjector::prepareValues(), BinningProjector::prepareValues(), and Profile2DProjector::valueRange().

bool NTupleProjector::isEmpty  )  const [virtual, inherited]
 

Returns true if the data source used by this projector is empty.

Returns true if the data source used by this projector is empty, otherwise returns true. The data source is empty, i.e. has no data, then many member functions of this class can not respond with meaning full results.

Implements ProjectorBase.

Definition at line 485 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

bool ProjectorBase::isValueBinned  )  const [virtual, inherited]
 

Returns true if the projected values are the result of binning.

The implementation in this base class returns false. It maybe overridden in derived classes that do binning.

Reimplemented in Hist1DProjImp, and Hist2DProjImp.

Definition at line 126 of file ProjectorBase.cxx.

Referenced by BinningProjector::normalizeTo().

void MapMatrixProjector::matrixTranspose bool  yes  )  [virtual]
 

Transposes the X and Y axis of the contained matrix.

Transposes the X and Y axis of the contained matrix. When set true, consected elements of the vector are taken to be along the X axis, otherwise they are along the Y axis.

Reimplemented from ProjectorBase.

Definition at line 352 of file MapMatrixProjector.cxx.

References m_transpose.

void ProjectorBase::normalizeTo double  norm  )  [virtual, inherited]
 

Sets a scale factor on the output so that the number of entries appears to be number.

This feature might be used, for example, to compare two histograms that have different number of entires by normalizing one to the other.

Reimplemented in BinningProjector.

Definition at line 355 of file ProjectorBase.cxx.

void ProjectorBase::normalizeTo const ProjectorBase target  )  [virtual, inherited]
 

Sets the target of normalization.

The meaning of normalizing the projected values of one projector to another one depends on the derived class. This implementation in this base does nothing.

Reimplemented in BinningProjector.

Definition at line 376 of file ProjectorBase.cxx.

void Observable::notifyObservers Action  action  )  const [protected, inherited]
 

An internal method to iterate over all observers and to send the message action.

Definition at line 69 of file Observable.cxx.

References std::bind2nd(), std::for_each(), Observable::m_list, and std::mem_fun().

void Observable::notifyObservers  )  const [virtual, inherited]
 

Notifies Observer objects of a change.

If interval counting is disabled, then Observer::Update is sent immediately. If interval counting is enabled, then the current count is incremented. If the current count is equal to the interval count, then the Observer::update message is sent and the current count reset to 0.

Reimplemented in NTuple, FitsNTuple, RootNTuple, NumArrayTuple, ListTuple, and RootNTuple.

Definition at line 90 of file Observable.cxx.

References hippodraw::Observer::update().

Referenced by XyPlotter::addDataRep(), XyPlotter::addDataRepStacked(), FunctionController::addFunctionRep(), RTuple::addRow(), StHist2DProjector::addValues(), StHist1DProjector::addValues(), XyPlotter::autoScale(), Inspector::contourLevelsTextBox_returnPressed(), Inspector::contourSlider_valueChanged(), Inspector::contourTextBox_returnPressed(), FunctionRep::fitFunction(), NumArrayTuple::notifyObservers(), NTuple::notifyObservers(), ListTuple::notifyObservers(), RootNTuple::notifyObservers(), FitsNTuple::notifyObservers(), XyPlotter::removeDataRep(), FunctionRep::restoreParameters(), CutPlotter::setActive(), XyPlotter::setAutoRanging(), QtDisplay::setContourLevels(), CutPlotter::setCutColor(), XyPlotter::setCutEnabled(), XyPlotter::setCutInverted(), XyPlotter::setCutRangeAt(), ProjectorBase::setDirty(), DataRep::setErrorDisplay(), XyPlotter::setHighRange(), XyPlotter::setLabel(), PlotterBase::setLabel(), DataSource::setLabelAt(), DataSource::setLabels(), XyPlotter::setLowRange(), DataSource::setName(), DisplayController::setNTuple(), FunctionRep::setParameters(), DataRep::setRepColor(), DyHistogram::setRepresentation(), DataRep::setRepresentation(), DataRep::setRepSize(), DataRep::setRepStyle(), XyPlotter::setScaling(), PlotterBase::setTitle(), DataSource::setTitle(), XyPlotter::setTransform(), XyPlotter::setValueRep(), PlotterBase::update(), NTupleProjector::update(), DataRep::update(), CutPlotter::update(), BinningProjector::update(), CutPlotter::updateTargets(), DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple().

Range ProjectorBase::preferredRange hippodraw::Axes::Type   )  const [virtual, inherited]
 

Returns the preferred Range.

Returns the Range preferred by the projector. The default implementation in this base class is to return full range of the data on the axis. Derived classes, may need to override this implementation.

Reimplemented in Hist1DProjImp, and Hist2DProjImp.

Definition at line 163 of file ProjectorBase.cxx.

References ProjectorBase::dataRangeOn(), Range::length(), Range::low(), Range::setHigh(), Range::setLow(), and hippodraw::Axes::Y.

Referenced by DataRep::preferredRange().

void MapMatrixProjector::prepareValues  )  [virtual]
 

Informs the projector to prepare its projected values for plotting.

This base class implementation sets the dirty flag to false indicating that the values are already prepared. Projectors that need to calculate the projected values should override this method and also set the dirty flag to false. For example, a projector might accumulate data into bins, and the position of the bin and its number of entries are used for the projected values.

Reimplemented from ProjectorBase.

Definition at line 547 of file MapMatrixProjector.cxx.

References createNTuple(), fillProjectedValues(), ProjectorBase::isDirty(), ProjectorBase::m_proj_values, and ProjectorBase::setDirty().

Referenced by getAverage().

void NTupleProjector::removeCut const TupleCut cut  )  [virtual, inherited]
 

Removes the cut from the cut list.

Definition at line 353 of file NTupleProjector.cxx.

References std::find(), and NTupleProjector::m_cut_list.

void Observable::removeObserver hippodraw::Observer  )  [inherited]
 

Removes an Observer from the Observer list.

Definition at line 63 of file Observable.cxx.

References Observable::m_list.

Referenced by BinningProjector::normalizeTo(), CutPlotter::removeFromTarget(), DisplayController::removeTextObservers(), NTupleProjector::setNTuple(), FunctionRep::willDelete(), FunctionRep::~FunctionRep(), and NTupleProjector::~NTupleProjector().

void ProjectorBase::reset  )  [virtual, inherited]
 

Resets the bins.

This interface is for the StHist1DProjector

Reimplemented in BinningProjector, Hist1DProjImp, and StHist1DProjector.

Definition at line 252 of file ProjectorBase.cxx.

Referenced by CompositePlotter::reset().

void NTupleProjector::setAxisBinding const std::string axis,
const std::string label
[virtual, inherited]
 

Sets the axis binding.

The parameter axis should match one of the strings returned by bindingOptions(). The parameter label should match one of the column labels of the NTuple. If not, the corresponding axis becomes unbound.

Reimplemented from ProjectorBase.

Definition at line 194 of file NTupleProjector.cxx.

References NTupleProjector::indexOfBindingOption(), and NTupleProjector::setAxisBinding().

void NTupleProjector::setAxisBinding int  axis,
const std::string label
[protected, inherited]
 

Sets the axis binding for axis binding option to the column with label label.

If the label doesn't exist in the data source, then the axis becomes unbound.

Definition at line 180 of file NTupleProjector.cxx.

References DataSource::indexOf(), NTupleProjector::m_columns, NTupleProjector::m_is_valid, NTupleProjector::m_ntuple, and ProjectorBase::setDirty().

Referenced by NTupleProjector::setAxisBinding(), CutPlotter::setAxisBinding(), and NTupleProjector::setAxisBindings().

void NTupleProjector::setAxisBindings const std::vector< std::string > &  labels  )  [virtual, inherited]
 

Sets the axis bindings, Sets, in the order of the binding options, the binding to the NTuple by labels contained in labels.

If labels does not contain sufficient number of entries, the remaining bindings are unset.

Reimplemented from ProjectorBase.

Definition at line 204 of file NTupleProjector.cxx.

References NTupleProjector::m_columns, NTupleProjector::m_is_valid, NTupleProjector::m_min_bindings, NTupleProjector::setAxisBinding(), and num_util::size().

Referenced by DisplayController::setAxisBindings().

void ProjectorBase::setAxisModel hippodraw::Axes::Type  axis,
AxisModelBase
[virtual, inherited]
 

Sets the AxisModel for axis axis.

Reimplemented in BinningProjector, and FunctionProjector.

Definition at line 185 of file ProjectorBase.cxx.

References ProjectorBase::m_x_axis, ProjectorBase::m_y_axis, ProjectorBase::m_z_axis, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by DataRep::setAxisModel(), and BinningProjector::setAxisModel().

void ProjectorBase::setBinWidth const std::string axis,
int  parm,
bool  dragging
[virtual, inherited]
 

Sets the bin width.

This method is intended to be used in conjunction with a slider widget in a graphical user interface. The slider range is assumed to be 0 to 100 with the current value at parm. If the slider is still being dragged, then dragging is true, otherwise it is false. A derived class determines withs own bin width based on the width it had when slider dragging first started. and the current position of the slider. The implementation in this base class does nothing.

Reimplemented in BinningProjector, DyHist2DProjector, and Profile2DProjector.

Definition at line 232 of file ProjectorBase.cxx.

void MapMatrixProjector::setBinWidth hippodraw::Axes::Type  axis,
double  step
[virtual]
 

Sets the bin width.

Sets the distance between data points along the axis axis to step. For the special case that axis is equal to Z, sets the scale factor for data point values.

Reimplemented from ProjectorBase.

Definition at line 119 of file MapMatrixProjector.cxx.

References m_scale_factor, m_x_step, m_y_step, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

void ProjectorBase::setDirty bool  value = true  )  [virtual, inherited]
 

Sets the dirty flag to value.

Definition at line 75 of file ProjectorBase.cxx.

References ProjectorBase::m_isDirty, and Observable::notifyObservers().

Referenced by StHist2DProjector::addValues(), StHist1DProjector::addValues(), Profile2DProjector::dataRangeOn(), FunctionProjector::fitFunction(), StHist2DProjector::getAverage(), StHist1DProjector::getAverage(), BinningProjector::normalize(), FunctionProjector::prepareAxis(), ProjectorBase::prepareValues(), prepareValues(), Map3Projector::prepareValues(), Map2Projector::prepareValues(), Map1Projector::prepareValues(), LineProjector::prepareValues(), FunctionProjector::prepareValues(), BinningProjector::prepareValues(), StHist1DProjector::reset(), FunctionProjector::restoreParameters(), NTupleProjector::setAxisBinding(), BinningProjector::setBinnerOn(), StHist2DProjector::setBinnerRange(), StHist1DProjector::setBinnerRange(), ProfileProjector::setBinnerRange(), Profile2DProjector::setBinnerRange(), DyHist2DProjector::setBinnerRange(), DyHist1DProjector::setBinnerRange(), Profile2DProjector::setBinWidth(), Hist2DProjImp::setBinWidth(), BinningProjector::setBinWidth(), DataRep::setDirty(), NTupleProjector::setNTuple(), setNTuple(), Profile2DProjector::setOffset(), Hist2DProjImp::setOffset(), DyHist2DProjector::setOffset(), BinningProjector::setOffset(), FunctionProjector::setParameters(), ProjectorBase::setRange(), Profile2DProjector::setRange(), FunctionProjector::setRange(), NTupleProjector::update(), and BinningProjector::willDelete().

void ProjectorBase::setNormalizing bool  on  )  [virtual, inherited]
 

Sets the scaling number of entries on if on is true, otherwise turns if off.

Reimplemented in BinningProjector.

Definition at line 362 of file ProjectorBase.cxx.

void MapMatrixProjector::setNTuple const DataSource ntuple  )  [virtual]
 

Changes the DataSource used for the projections to source.

The column indexes remain the same if the new DataSource has at least as many columns as the old. Any indexes exceeding the number of columns of the new DataSource are reset to 0.

Reimplemented from NTupleProjector.

Definition at line 336 of file MapMatrixProjector.cxx.

References m_cols, m_rows, DataSource::rows(), ProjectorBase::setDirty(), NTupleProjector::setNTuple(), num_util::size(), and std::sqrt().

void MapMatrixProjector::setNumberOfBins hippodraw::Axes::Type  axis,
unsigned int  number
[virtual]
 

Sets the number of steps.

Sets the number of steps along axis axis to number. The X axis is taken to be the number of columns in the matrix and the Y axis the number of rows. Raises assertion if called with invalid axis parameter.

Reimplemented from ProjectorBase.

Definition at line 98 of file MapMatrixProjector.cxx.

References m_cols, m_rows, hippodraw::Axes::X, and hippodraw::Axes::Y.

void ProjectorBase::setOffset const std::string axis,
int  parm,
bool  dragging
[virtual, inherited]
 

Sets the bin offset.

See also:
setBinWidth ( const std::string &, int, bool )

Reimplemented in BinningProjector, DyHist2DProjector, and Profile2DProjector.

Definition at line 238 of file ProjectorBase.cxx.

Referenced by DisplayController::setOffset(), and CompositePlotter::setOffset().

void MapMatrixProjector::setOffset hippodraw::Axes::Type  axis,
double  origin
[virtual]
 

Sets the bin offset.

Sets the distance origin of the axis axis to origin. If axis is an invalid value, then raises an assertion.

Reimplemented from ProjectorBase.

Definition at line 155 of file MapMatrixProjector.cxx.

References m_x_origin, m_y_origin, hippodraw::Axes::X, and hippodraw::Axes::Y.

void ProjectorBase::setRange hippodraw::Axes::Type  axis,
bool  const_width = true
[virtual, inherited]
 

Sets the range of the selected axis.

The base class implementation only sets the dirty flag. Derived classes may need to do more. The option bool parameter if true indicates a binning projector should hold the bin width parameter constant.

Reimplemented in FunctionProjector, Hist1DProjImp, Hist2DProjImp, Profile2DProjector, and ProfileProjector.

Definition at line 133 of file ProjectorBase.cxx.

References ProjectorBase::m_z_axis, ProjectorBase::setDirty(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by DataRep::setRange().

void NTupleProjector::setXErrorOption bool  enable  )  [virtual, inherited]
 

Sets whether the X error options are to be enabled or not.

This base class implementation does nothing.

Reimplemented in Map2Projector.

Definition at line 149 of file NTupleProjector.cxx.

void NTupleProjector::setYErrorOption bool  enable  )  [virtual, inherited]
 

Sets whether the Y error options are to be enabled or not.

This base class implementation does nothing.

Reimplemented in Map1Projector, and Map2Projector.

Definition at line 153 of file NTupleProjector.cxx.

void NTupleProjector::update const Observable  )  [virtual, inherited]
 

Responds to update message from the data source.

Implementation of Observer pattern.

Reimplemented from ProjectorBase.

Reimplemented in DyHist1DProjector, DyHist2DProjector, Profile2DProjector, and ProfileProjector.

Definition at line 82 of file NTupleProjector.cxx.

References Observable::notifyObservers(), and ProjectorBase::setDirty().

Referenced by ProfileProjector::update(), Profile2DProjector::update(), DyHist2DProjector::update(), and DyHist1DProjector::update().

Range MapMatrixProjector::valueRange  )  const [virtual]
 

Finds the range of the projected values.

It is up to derived classes to determine what this means.

Todo:
Resolve if this method should be here.

Implements ProjectorBase.

Definition at line 209 of file MapMatrixProjector.cxx.

References dataRangeOn(), and hippodraw::Axes::Z.

bool ProjectorBase::wantsScaleFactor const std::string axis  )  const [virtual, inherited]
 

Returns whether the projector wants scale factor.

Returns true if the projector wants to scale the axis, otherwise returns false. A projector supporting a histogram, for example, would want to scale the Y axis by the bin width in order to show entries per bin instead of density. This base class implementation always returns false.

Reimplemented in Hist1DProjImp, and Hist2DProjImp.

Definition at line 331 of file ProjectorBase.cxx.

Referenced by CompositePlotter::checkAxisScaling().

void NTupleProjector::willDelete const Observable  )  [virtual, inherited]
 

Responds to willDelete message from the observed data source.

Replaces the currently referenced data source with a null one. This is an implementation of the Observer pattern.

Reimplemented from hippodraw::Observer.

Reimplemented in DyHist1DProjector, DyHist2DProjector, Profile2DProjector, and ProfileProjector.

Definition at line 90 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

Referenced by ProfileProjector::willDelete(), Profile2DProjector::willDelete(), DyHist2DProjector::willDelete(), and DyHist1DProjector::willDelete().


Member Data Documentation

std::vector< std::string > NTupleProjector::m_binding_options [protected, inherited]
 

The list of binding options for the Projector.

The binding refers to a connection to the data. For example, a 1D histogram binds to one axis and the option might be "X", while a scatter plot binds to two axes with the options "X" and "Y". The binding option is maintained as a string which can be interpreted by derived classes in various ways. For example, an NTuple projector could take the string as a label for a column. Derived classes should initialize this data member in their constructor.

Definition at line 61 of file NTupleProjector.h.

Referenced by NTupleProjector::bindingOptions(), DyHist1DProjector::DyHist1DProjector(), DyHist2DProjector::DyHist2DProjector(), NTupleProjector::indexOfBindingOption(), ProfileProjector::isAxisBinned(), Profile2DProjector::isAxisBinned(), DyHist2DProjector::isAxisBinned(), DyHist1DProjector::isAxisBinned(), Map1Projector::Map1Projector(), Map2Projector::Map2Projector(), Map3Projector::Map3Projector(), MapMatrixProjector(), NTupleProjector::NTupleProjector(), Profile2DProjector::Profile2DProjector(), ProfileProjector::ProfileProjector(), Map2Projector::setXErrorOption(), Map2Projector::setYErrorOption(), and Map1Projector::setYErrorOption().

std::vector< std::string > NTupleProjector::m_bindings [mutable, protected, inherited]
 

The list of current bindings.

Definition at line 64 of file NTupleProjector.h.

Referenced by NTupleProjector::getAxisBindings().

unsigned int MapMatrixProjector::m_cols [private]
 

The number of columns for each row.

The number of data points along the horizontal or X axis. A value of 0 indicates that the member has not yet been initialized.

Definition at line 45 of file MapMatrixProjector.h.

Referenced by dataRangeOn(), fillDataSource(), fillProjectedValues(), getNumberOfBins(), getZValue(), setNTuple(), and setNumberOfBins().

std::vector< unsigned int > NTupleProjector::m_columns [protected, inherited]
 

A vector containing indexes to the columns of the NTuple.

The value UINT_MAX indicates that the column is not bound. Derived classes use these indexes in conjunction with m_binding_options.

Definition at line 70 of file NTupleProjector.h.

Referenced by ProfileProjector::changedNTuple(), Profile2DProjector::changedNTuple(), changedNTuple(), Map3Projector::changedNTuple(), Map2Projector::changedNTuple(), Map1Projector::changedNTuple(), DyHist2DProjector::changedNTuple(), DyHist1DProjector::changedNTuple(), createNTuple(), Map3Projector::createNTuple(), Map2Projector::createNTuple(), ProfileProjector::dataRangeOn(), Profile2DProjector::dataRangeOn(), dataRangeOn(), Map3Projector::dataRangeOn(), Map2Projector::dataRangeOn(), Map1Projector::dataRangeOn(), DyHist2DProjector::dataRangeOn(), DyHist1DProjector::dataRangeOn(), ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), fillDataSource(), Map3Projector::fillDataSource(), Map2Projector::fillDataSource(), Map1Projector::fillDataSource(), StripChartProjector::fillProjectedValues(), fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), NTupleProjector::getAxisBindings(), ProfileProjector::getPosOn(), Profile2DProjector::getPosOn(), getPosOn(), Map3Projector::getPosOn(), Map2Projector::getPosOn(), Map1Projector::getPosOn(), DyHist2DProjector::getPosOn(), DyHist1DProjector::getPosOn(), NTupleProjector::getXLabel(), NTupleProjector::getYLabel(), Map1Projector::getYLabel(), Profile2DProjector::getZLabel(), getZLabel(), Map3Projector::getZLabel(), getZValue(), NTupleProjector::inRange(), inRange(), Map1Projector::inRange(), NTupleProjector::setAxisBinding(), NTupleProjector::setAxisBindings(), Map2Projector::setXErrorOption(), Map2Projector::setYErrorOption(), Map1Projector::setYErrorOption(), and Map3Projector::valueRange().

std::vector< const TupleCut * > NTupleProjector::m_cut_list [protected, inherited]
 

A list of cuts that filter the projection.

Definition at line 73 of file NTupleProjector.h.

Referenced by NTupleProjector::acceptRow(), NTupleProjector::addCut(), NTupleProjector::getCutList(), and NTupleProjector::removeCut().

unsigned int NTupleProjector::m_min_bindings [protected, inherited]
 

The minimum number of columns that must be bound.

The minimum number of columns that must be bound. This member must be set by derived class according to its needs. The default setting is zero.

Definition at line 84 of file NTupleProjector.h.

Referenced by DyHist1DProjector::DyHist1DProjector(), DyHist2DProjector::DyHist2DProjector(), Map1Projector::Map1Projector(), Map2Projector::Map2Projector(), Map3Projector::Map3Projector(), MapMatrixProjector(), Profile2DProjector::Profile2DProjector(), ProfileProjector::ProfileProjector(), and NTupleProjector::setAxisBindings().

const DataSource* NTupleProjector::m_ntuple [protected, inherited]
 

The pointer to the data source being projected.

It is a pointer because the same data can be shared by multiple projectors.

Definition at line 77 of file NTupleProjector.h.

Referenced by NTupleProjector::acceptRow(), ProfileProjector::changedNTuple(), Profile2DProjector::changedNTuple(), changedNTuple(), Map3Projector::changedNTuple(), Map2Projector::changedNTuple(), Map1Projector::changedNTuple(), DyHist2DProjector::changedNTuple(), DyHist1DProjector::changedNTuple(), createNTuple(), Map3Projector::createNTuple(), Map2Projector::createNTuple(), NTupleProjector::dataRange(), Map1Projector::dataRangeOn(), NTupleProjector::dataRangeWithError(), ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), fillDataSource(), Map3Projector::fillDataSource(), Map2Projector::fillDataSource(), Map1Projector::fillDataSource(), StripChartProjector::fillProjectedValues(), fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), NTupleProjector::getAverage(), NTupleProjector::getAxisBindings(), NTupleProjector::getNTuple(), NTupleProjector::getNTupleAfterCuts(), NTupleProjector::getNTupleName(), NTupleProjector::getNumberOfEntries(), NTupleProjector::getPos(), Map1Projector::getPosOn(), NTupleProjector::getPosWithError(), NTupleProjector::getTitle(), NTupleProjector::getXLabel(), NTupleProjector::getYLabel(), Map1Projector::getYLabel(), Profile2DProjector::getZLabel(), getZLabel(), Map3Projector::getZLabel(), getZValue(), NTupleProjector::indexOf(), NTupleProjector::inRange(), inRange(), Map1Projector::inRange(), NTupleProjector::isEmpty(), NTupleProjector::NTupleProjector(), NTupleProjector::setAxisBinding(), NTupleProjector::setNTuple(), NTupleProjector::willDelete(), and NTupleProjector::~NTupleProjector().

double MapMatrixProjector::m_null_value [private]
 

The value of the null value.

The null value is the value taken when no data is in an element of the matrix. In order to preserve the shape, something must be placed in the vector.

Requests:
Allow user to set and get this value.

Definition at line 81 of file MapMatrixProjector.h.

Referenced by fillDataSource(), and fillProjectedValues().

std::vector< std::string > ProjectorBase::m_pointreps [protected, inherited]
 

Vector of acceptable PointReps.

Definition at line 98 of file ProjectorBase.h.

Referenced by StripChartProjector::addPointReps(), ProfileProjector::addPointReps(), Profile2DProjector::addPointReps(), addPointReps(), Map3Projector::addPointReps(), Map2Projector::addPointReps(), Map1Projector::addPointReps(), Hist2DProjImp::addPointReps(), Hist1DProjImp::addPointReps(), and ProjectorBase::getPointReps().

DataSource* ProjectorBase::m_proj_values [protected, inherited]
 

The NTuple representing the result of the projection.

Note:
An NTuple object is probably too heavy for non-binning projectors. In the future, we'll create a class which behaves like one, but maps the data from the data source NTuple to required getRow().

Definition at line 73 of file ProjectorBase.h.

Referenced by BinningProjector::BinningProjector(), ProfileProjector::dataRangeOn(), Profile2DProjector::dataRangeOn(), Hist2DProjImp::dataRangeOnValue(), Hist1DProjImp::dataRangeOnValue(), DyHist1DProjector::getAverage(), ProfileProjector::getPosOn(), ProjectorBase::getProjectedValues(), Map3Projector::getZValue(), prepareValues(), Map3Projector::prepareValues(), Map2Projector::prepareValues(), Map1Projector::prepareValues(), LineProjector::prepareValues(), FunctionProjector::prepareValues(), BinningProjector::prepareValues(), BinningProjector::setBinner(), and ProjectorBase::~ProjectorBase().

unsigned int MapMatrixProjector::m_rows [private]
 

The number of rows for each column.

The number of data points along the vertical or Y axis. A value of 0 indicates that the member has not yet been initialized.

Definition at line 51 of file MapMatrixProjector.h.

Referenced by calcColumnIndex(), calcRowIndex(), dataRangeOn(), fillDataSource(), fillProjectedValues(), getNumberOfBins(), getZValue(), setNTuple(), and setNumberOfBins().

double MapMatrixProjector::m_scale_factor [private]
 

The scale factor.

The scale factor to be applied to the values of the elements in the NTuple.

Definition at line 74 of file MapMatrixProjector.h.

Referenced by getBinWidth(), and setBinWidth().

const ProjectorBase* ProjectorBase::m_target [protected, inherited]
 

The target projector.

Use of the target depends on derived classes. Target projector are observed, thus some of the implement is define in this base class.

Reimplemented in FunctionProjector.

Definition at line 104 of file ProjectorBase.h.

Referenced by BinningProjector::normalize(), BinningProjector::normalizeTo(), BinningProjector::update(), and BinningProjector::willDelete().

bool MapMatrixProjector::m_transpose [private]
 

A flag to indicate if the X-Y matrix should be transposed or not.

When set true, consecutive elements of the vector move along the X axis.

Definition at line 87 of file MapMatrixProjector.h.

Referenced by fillDataSource(), fillProjectedValues(), getZValue(), and matrixTranspose().

AxisModelBase* ProjectorBase::m_x_axis [protected, inherited]
 

The AxisModel along the X axis.

All Projectors have at least an X axis and maybe additional ones.

Todo:
Should be generalized to n-dimensions by having having a vector of AxisModelBase objects.

Definition at line 82 of file ProjectorBase.h.

Referenced by LineProjector::dataRangeOn(), FunctionProjector::dataRangeOn(), LineProjector::fillDataSource(), LineProjector::fillProjectedValues(), ProjectorBase::getAxisModel(), LineProjector::getPosOn(), ProjectorBase::getRange(), Map3Projector::getZValue(), NTupleProjector::inRange(), inRange(), Map1Projector::inRange(), FunctionProjector::prepareAxis(), ProjectorBase::setAxisModel(), FunctionProjector::setAxisModel(), Profile2DProjector::setOffset(), Hist2DProjImp::setOffset(), BinningProjector::setOffset(), ProfileProjector::setRange(), Profile2DProjector::setRange(), Hist2DProjImp::setRange(), Hist1DProjImp::setRange(), FunctionProjector::setRange(), and LineProjector::valueRange().

std::string MapMatrixProjector::m_x_label [private]
 

The label for the generated x axis.

Definition at line 35 of file MapMatrixProjector.h.

Referenced by getXLabel().

double MapMatrixProjector::m_x_origin [private]
 

The origin along the X axis.

Definition at line 65 of file MapMatrixProjector.h.

Referenced by calcColumnValue(), dataRangeOn(), fillDataSource(), fillProjectedValues(), getOffset(), getZValue(), and setOffset().

double MapMatrixProjector::m_x_step [private]
 

The step along the X axis.

The distance along the X axis between two columns. If 0.0, it has not yet been initialized.

Definition at line 56 of file MapMatrixProjector.h.

Referenced by calcColumnValue(), dataRangeOn(), fillDataSource(), fillProjectedValues(), getBinWidth(), getPosOn(), getXStep(), getZValue(), and setBinWidth().

AxisModelBase* ProjectorBase::m_y_axis [protected, inherited]
 

The AxisModel along the Y axis.

All Projectors have at least a Y axis and maybe additional ones.

Definition at line 86 of file ProjectorBase.h.

Referenced by Hist1DProjImp::checkScaling(), LineProjector::dataRangeOn(), FunctionProjector::dataRangeOn(), LineProjector::fillDataSource(), LineProjector::fillProjectedValues(), StHist1DProjector::getAverage(), DyHist1DProjector::getAverage(), ProjectorBase::getAxisModel(), LineProjector::getPosOn(), ProjectorBase::getRange(), DyHist1DProjector::getYLabel(), Map3Projector::getZValue(), NTupleProjector::inRange(), inRange(), Map1Projector::inRange(), FunctionProjector::prepareAxis(), ProjectorBase::setAxisModel(), FunctionProjector::setAxisModel(), Profile2DProjector::setOffset(), Hist2DProjImp::setOffset(), Profile2DProjector::setRange(), Hist2DProjImp::setRange(), FunctionProjector::setRange(), and LineProjector::valueRange().

std::string MapMatrixProjector::m_y_label [private]
 

The label for the generated y axis.

Definition at line 39 of file MapMatrixProjector.h.

Referenced by getYLabel().

double MapMatrixProjector::m_y_origin [private]
 

The origin along the Y axis.

Definition at line 69 of file MapMatrixProjector.h.

Referenced by calcRowValue(), dataRangeOn(), fillDataSource(), fillProjectedValues(), getOffset(), getZValue(), and setOffset().

double MapMatrixProjector::m_y_step [private]
 

The step along the Y axis.

The distance along the Y axis between two rows. If 0.0, it has not yet been initialized.

Definition at line 61 of file MapMatrixProjector.h.

Referenced by calcRowValue(), dataRangeOn(), fillDataSource(), fillProjectedValues(), getBinWidth(), getPosOn(), getYStep(), getZValue(), and setBinWidth().

AxisModelBase* ProjectorBase::m_z_axis [protected, inherited]
 

The AxisModel along the Z axis.

May not be used by all Projectors.

Definition at line 90 of file ProjectorBase.h.

Referenced by Hist2DProjImp::checkScaling(), StHist2DProjector::getAverage(), ProjectorBase::getAxisModel(), ProjectorBase::getRange(), Hist2DProjImp::getZLabel(), NTupleProjector::inRange(), inRange(), ProjectorBase::setAxisModel(), and ProjectorBase::setRange().

std::string ProjectorBase::m_z_label [protected, inherited]
 

Dummy member so that getZLabel can return a reference.

Todo:
Remove when getLabel takes axis argument

Reimplemented in FunctionProjector, and StHist2DProjector.

Definition at line 95 of file ProjectorBase.h.

Referenced by ProjectorBase::getZLabel().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3