EqualEntriesHist1DProjector Class Reference

#include <EqualEntriesHist1DProjector.h>

Inheritance diagram for EqualEntriesHist1DProjector:

Inheritance graph
NTupleProjectorProjectorBaseObservableObserver
[legend]
Collaboration diagram for EqualEntriesHist1DProjector:

Collaboration graph
NTupleProjectorProjectorBaseObservableDataSourceObserverAxisModelBaseRange
[legend]
List of all members.

Detailed Description

A derived class of NTupleProjector that projects a column of data into a one dimensional histogram.

This class is different from DyHist1DProjector in that the bin width is a variable and the entries in any bins are equal. However, since some bins may have zero width, we combine bins together to avoid such bins.

Author:
Xie Fang <xiefang@stanford.edu>

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

Definition at line 34 of file EqualEntriesHist1DProjector.h.

Public Types

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

Public Member Functions

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.
virtual void addCut (const TupleCut *cut)
 Adds the cut to the list of cuts.
void addObserver (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.
virtual void checkScaling ()
 Checks for scaling the display of the axis range.
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 NTuplecreateNTupleWith (const std::vector< TupleCut > &cut_list) const
 Creates a NTuple from the projector's DataSource object using cut_list for not including rows that do not pass the cuts.
virtual const DataSourcecreateOldStyleNTuple () const
virtual Range dataRangeOn (hippodraw::Axes::Type axis) const
 Returns the range of the data on a specified axis.
Range dataRangeOnValue () const
 EqualEntriesHist1DProjector ()
 The default constructor.
virtual void fillColumnAfterCuts (const std::string &column, std::vector< double > &columnData) const
 Fill a vector with the data from the named column with the current set of cuts applied.
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 (Axes::Type axis) const
 Get the AxisModel for axis axis.
virtual double getBinWidth (Axes::Type axis) const
 Get the number of bins in this class.
const std::vector< const TupleCut * > & getCutList () const
 Returns the list of TupleCut objects used by this projector.
virtual int getMinEntries ()
 Get the minimum entries/bin.
virtual DataSourcegetNTuple ()
 Returns the DataSource used by the projector.
virtual const DataSourcegetNTuple () const
 Returns the DataSource used by the projector.
virtual NTuplegetNTupleAfterCuts () const
 Template for projectors that can return subsets of the NTuple used by the DataRep.
virtual const std::string & getNTupleName () const
 Returns the name of the DataSource used by this projector.
virtual int getNumberOfBins (Axes::Type) 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 (Axes::Type axis) const
 Returns the offset of the axis.
virtual int getOverflow () const
 Returns overflow.
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 DataSource representation of projected values.
virtual const RangegetRange (Axes::Type) const
 Returns the Range along the specified axis.
virtual double getRMS (Axes::Type axis)
 Returns the RMS.
const std::vector< unsigned
int > & 
getShape ()
 Get the shape of the projected values.
virtual const std::string & getTitle () const
 Finds the title of the plot.
virtual int getUnderflow () const
 Returns underflow.
virtual const std::string & getXLabel () const
 Finds the X axis label of the plot.
virtual const std::string & getYLabel (bool density=false) const
 Returns the label of the axis.
const std::vector< double > & getZAfterTransform (TransformBase *transform)
 Return Z values after binary transform.
virtual const std::string & getZLabel () const
 Finds the Z axis label of the plot.
virtual double getZValue (double x, double y) const
 Get the z value at the specified point (x,y).
const std::vector< double > & getZValues ()
 Return all Z values.
virtual bool hasDataSourceBindings () const
 Returns true.
virtual 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 isImageConvertable () const
 Returns true if the projected values can converted to an image.
virtual bool isValueBinned () const
 Returns true if the projected values are the result of binning.
virtual void matrixTranspose (bool yes)
 Transposes the X and Y axis.
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 (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 (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 DataSource by labels contained in labels.
virtual void setAxisModel (Axes::Type axis, AxisModelBase *)
 Sets the AxisModel for axis axis.
virtual const RangesetBinWidth (Axes::Type axis, double number)
 Sets the number of bins in this class.
virtual const RangesetBinWidth (Axes::Type axis, int parm, bool dragging)
 Sets the number of bins in this class.
virtual void setDirty (bool value=true)
 Sets the dirty flag to value.
virtual void setMinEntries (int entries)
 Set the minimum entries/bin.
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 *source)
 Changes the DataSource used for the projections to source.
virtual void setNumberOfBins (Axes::Type axis, unsigned int number)
 Sets the number of bins.
virtual void setOffset (Axes::Type axis, double offset)
 Sets the bin offset.
virtual void setOffset (const std::string &axis, int parm, bool dragging)
 Sets the bin offset.
virtual void setRange (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.

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.
 EqualEntriesHist1DProjector (const EqualEntriesHist1DProjector &projector)
 The copy constructor.
virtual void fillProjectedValues (DataSource *ntuple, bool in_range=false) const
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.
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::string > m_binding_options
 The list of binding options for the Projector.
std::vector< std::string > m_bindings
 The list of current bindings.
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.
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::string > m_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.
std::vector< double > m_zval
 Sorted Z values in this projector.

Private Member Functions

void adjustNumberOfBins ()
 Make sure the number of bins between 1 and number of rows.

Private Attributes

unsigned int m_bin_num
 The number of bins.
Range m_range
 The range of the data source.
unsigned int m_start_num
 The number of bins when dragging starts.
std::string m_y_label
 The label for the y axis.


Member Typedef Documentation

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

The member function of the Observer that is called.

Definition at line 86 of file Observable.h.

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

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

Definition at line 45 of file Observable.h.


Constructor & Destructor Documentation

EqualEntriesHist1DProjector ( const EqualEntriesHist1DProjector projector  )  [protected]

The copy constructor.

Definition at line 63 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::addPointReps().

EqualEntriesHist1DProjector (  ) 

The default constructor.

Definition at line 46 of file EqualEntriesHist1DProjector.cxx.

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

Referenced by EqualEntriesHist1DProjector::clone().


Member Function Documentation

bool acceptRow ( unsigned int  i,
const CutList_t cut_list 
) const [inherited]

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

Definition at line 158 of file NTupleProjector.cxx.

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

Referenced by ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), NTupleProjector::fillColumnAfterCuts(), NTupleProjector::fillNTuple(), StripChartProjector::fillProjectedValues(), MeshProjector::fillProjectedValues(), MapMatrixProjector::fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), NTupleProjector::getAverage(), DyHist1DProjector::getAverage(), and NTupleProjector::getNumberOfEntries().

void addCut ( const TupleCut cut  )  [virtual, inherited]

Adds the cut to the list of cuts.

Definition at line 350 of file NTupleProjector.cxx.

References NTupleProjector::m_cut_list.

Referenced by CutController::linkCutAndRep().

void addObserver ( Observer  )  [inherited]

Adds an Observer to the Observer list.

Definition at line 52 of file Observable.cxx.

References Observable::m_list.

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

void addPointReps (  )  [protected, virtual]

Function to add the acceptable point reps.

Implements ProjectorBase.

Definition at line 244 of file EqualEntriesHist1DProjector.cxx.

References ProjectorBase::m_pointreps.

Referenced by EqualEntriesHist1DProjector::EqualEntriesHist1DProjector().

void 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 330 of file ProjectorBase.cxx.

void adjustNumberOfBins (  )  [private]

Make sure the number of bins between 1 and number of rows.

Definition at line 315 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::m_bin_num, NTupleProjector::m_ntuple, EqualEntriesHist1DProjector::m_start_num, and num_util::size().

Referenced by EqualEntriesHist1DProjector::prepareValues(), and EqualEntriesHist1DProjector::setBinWidth().

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

Returns a vector of strings describing the binding options.

Definition at line 96 of file NTupleProjector.cxx.

References NTupleProjector::m_binding_options.

Referenced by DataRepController::bindingOptions().

void changedNTuple (  )  [protected, virtual]

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

The column indexes are checked for validity, and they are reset to the last column if they are invalid. The weight index is set to negative if it was invalid.

Implements NTupleProjector.

Definition at line 77 of file EqualEntriesHist1DProjector.cxx.

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

void checkScaling (  )  [virtual, inherited]

Checks for scaling the display of the axis range.

This base class implementation does nothing. Derived classes should override this method if scaling of the axis is meaningful to them.

Reimplemented in BinningProjector, Hist1DProjImp, and Hist2DProjImp.

Definition at line 416 of file ProjectorBase.cxx.

ProjectorBase * 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 72 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::EqualEntriesHist1DProjector().

DataSource * 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 152 of file EqualEntriesHist1DProjector.cxx.

References hippodraw::DataPoint2DTuple::ERROR(), EqualEntriesHist1DProjector::fillProjectedValues(), NTuple::setLabels(), and hippodraw::DataPoint2DTuple::WIDTH().

Referenced by EqualEntriesHist1DProjector::prepareValues().

NTuple * createNTupleWith ( const std::vector< TupleCut > &  cut_list  )  const [virtual, inherited]

Creates a NTuple from the projector's DataSource object using cut_list for not including rows that do not pass the cuts.

Note:
This base class implementation returns a null pointer.

Reimplemented from ProjectorBase.

Definition at line 564 of file NTupleProjector.cxx.

References NTupleProjector::createEmptyNTuple(), and NTupleProjector::fillNTuple().

const DataSource * createOldStyleNTuple (  )  const [virtual, inherited]

Definition at line 378 of file ProjectorBase.cxx.

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

Range 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 290 of file NTupleProjector.cxx.

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

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

Range dataRangeOn ( hippodraw::Axes::Type  axis  )  const [virtual]

Returns the range of the data on a specified axis.

For the X axis, it returns the range of the data. For the Y axis, it returns the range of the binned data.

Implements NTupleProjector.

Definition at line 105 of file EqualEntriesHist1DProjector.cxx.

References NTupleProjector::dataRange(), EqualEntriesHist1DProjector::dataRangeOnValue(), NTupleProjector::m_columns, hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by EqualEntriesHist1DProjector::valueRange().

Range dataRangeOnValue (  )  const

Definition at line 270 of file EqualEntriesHist1DProjector.cxx.

References ProjectorBase::m_proj_values, EqualEntriesHist1DProjector::prepareValues(), and hippodraw::DataPoint3DTuple::Y.

Referenced by EqualEntriesHist1DProjector::dataRangeOn().

Range dataRangeWithError ( int  data,
int  error 
) const [protected, inherited]

Returns a range considering both data and error.

Definition at line 265 of file NTupleProjector.cxx.

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

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

void fillColumnAfterCuts ( const std::string &  column,
std::vector< double > &  columnData 
) const [virtual, inherited]

Fill a vector with the data from the named column with the current set of cuts applied.

Reimplemented from ProjectorBase.

Definition at line 549 of file NTupleProjector.cxx.

References NTupleProjector::acceptRow(), DataSource::getColumn(), NTupleProjector::m_cut_list, NTupleProjector::m_ntuple, and DataSource::rows().

void fillProjectedValues ( DataSource ntuple,
bool  in_range = false 
) const [protected, virtual]

Definition at line 172 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::m_bin_num, NTupleProjector::m_columns, NTupleProjector::m_ntuple, num_util::size(), hippodraw::DataPoint3DTuple::SIZE, hippodraw::DataPoint3DTuple::X, hippodraw::DataPoint3DTuple::XERR, hippodraw::DataPoint3DTuple::Y, and hippodraw::DataPoint3DTuple::YERR.

Referenced by EqualEntriesHist1DProjector::createNTuple(), and EqualEntriesHist1DProjector::prepareValues().

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

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

Reimplemented from NTupleProjector.

Definition at line 129 of file EqualEntriesHist1DProjector.cxx.

const std::vector< std::string > & 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 123 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 * getAxisModel ( Axes::Type  axis  )  const [virtual, inherited]

Get the AxisModel for axis axis.

Definition at line 211 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 getBinWidth ( Axes::Type  axis  )  const [virtual]

Get the number of bins in this class.

To update the inspector.

Reimplemented from ProjectorBase.

Definition at line 308 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::m_bin_num.

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

Returns the list of TupleCut objects used by this projector.

Definition at line 364 of file NTupleProjector.cxx.

References NTupleProjector::m_cut_list.

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

int getMinEntries (  )  [virtual, inherited]

Get the minimum entries/bin.

Reimplemented in BinningProjector.

Definition at line 531 of file ProjectorBase.cxx.

Referenced by CompositePlotter::getMinEntries().

DataSource * getNTuple (  )  [virtual, inherited]

Returns the DataSource used by the projector.

Definition at line 437 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

const DataSource * getNTuple (  )  const [virtual, inherited]

Returns the DataSource used by the projector.

Definition at line 429 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

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

NTuple * getNTupleAfterCuts (  )  const [virtual, inherited]

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

Reimplemented from ProjectorBase.

Definition at line 539 of file NTupleProjector.cxx.

References NTupleProjector::createEmptyNTuple(), NTupleProjector::fillNTuple(), and NTupleProjector::m_cut_list.

const string & getNTupleName (  )  const [virtual, inherited]

Returns the name of the DataSource used by this projector.

Definition at line 442 of file NTupleProjector.cxx.

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

int getNumberOfBins ( Axes::Type   )  const [virtual, inherited]

Returns the number of bins.

Returns the number of bins on the specified axis. The result is 0 if the axis is not binned.

Reimplemented in BinningProjector, and MapMatrixProjector.

Definition at line 116 of file ProjectorBase.cxx.

Referenced by BinningProjector::getNumberOfBins().

int getNumberOfEntries (  )  const [virtual, inherited]

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

Implements ProjectorBase.

Definition at line 371 of file NTupleProjector.cxx.

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

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

Returns the list of observers.

Definition at line 60 of file Observable.cxx.

References Observable::m_list.

double getOffset ( Axes::Type  axis  )  const [virtual, inherited]

Returns the offset of the axis.

Not all projectors has a notation of a bin width. This interface is declared for those that do. The implementation in this base class is to does nothing.

Reimplemented in BinningProjector, and MapMatrixProjector.

Definition at line 268 of file ProjectorBase.cxx.

Referenced by CompositePlotter::getOffset().

int getOverflow (  )  const [virtual]

Returns overflow.

Reimplemented from NTupleProjector.

Definition at line 144 of file EqualEntriesHist1DProjector.cxx.

const vector< string > & getPointReps (  )  const [inherited]

Return the vector of Point Reps.

Definition at line 335 of file ProjectorBase.cxx.

References ProjectorBase::m_pointreps.

double getPos ( int  column  )  const [protected, inherited]

Returns the minimum positive value on the specified column.

Definition at line 332 of file NTupleProjector.cxx.

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

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

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

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

Implements ProjectorBase.

Definition at line 89 of file EqualEntriesHist1DProjector.cxx.

References NTupleProjector::getPos(), NTupleProjector::m_columns, hippodraw::Axes::X, and hippodraw::Axes::Y.

double getPosWithError ( int  data,
int  error 
) const [protected, inherited]

Returns the minimum positive values considering both data and error.

Definition at line 303 of file NTupleProjector.cxx.

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

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

const DataSource * getProjectedValues (  )  const [inherited]

Returns DataSource representation of projected values.

Definition at line 371 of file ProjectorBase.cxx.

References ProjectorBase::m_proj_values.

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

const Range & getRange ( 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(), FunctionProjector::dataRangeOn(), LineProjector::fillProjectedValues(), NTupleProjector::getAverage(), DyHist1DProjector::getAverage(), LineProjector::getPosOn(), MeshProjector::inRangeWithZ(), MapMatrixProjector::inRangeWithZ(), ProjectorBase::setBinWidth(), MapMatrixProjector::setBinWidth(), and LineProjector::valueRange().

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

Returns the RMS.

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

Definition at line 289 of file ProjectorBase.cxx.

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

const std::vector< unsigned int > & getShape (  )  [inherited]

Get the shape of the projected values.

Used to export FITS file.

Definition at line 444 of file ProjectorBase.cxx.

References ProjectorBase::getProjectedValues(), and DataSource::getShape().

Referenced by ProjectorBase::getZValues().

const string & getTitle (  )  const [virtual, inherited]

Finds the title of the plot.

This implementation gets the title from the DataSource.

Implements ProjectorBase.

Definition at line 250 of file NTupleProjector.cxx.

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

int getUnderflow (  )  const [virtual]

Returns underflow.

Reimplemented from NTupleProjector.

Definition at line 137 of file EqualEntriesHist1DProjector.cxx.

const std::string & getXLabel (  )  const [virtual, inherited]

Finds the X axis label of the plot.

A plotter may ask the projector for the default label.

Implements ProjectorBase.

Reimplemented in Map1Projector, and MapMatrixProjector.

Definition at line 255 of file NTupleProjector.cxx.

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

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

const string & getYLabel ( bool  density = false  )  const [virtual]

Returns the label of the axis.

Reimplemented from NTupleProjector.

Definition at line 117 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::m_y_label.

const std::vector< double > & getZAfterTransform ( TransformBase transform  )  [inherited]

Return Z values after binary transform.

Todo:
This is the only method in all the classes of this directory that needs a heder file from transform directory. Is there a better way?

Definition at line 456 of file ProjectorBase.cxx.

References ProjectorBase::getZValue(), BinaryTransform::inverseTransform(), and ProjectorBase::m_zval.

const std::string & getZLabel (  )  const [virtual, inherited]

Finds the Z axis label of the plot.

A plotter may ask the projector for the default label.

Reimplemented in FunctionProjector, Hist2DProjImp, Map3Projector, MapMatrixProjector, MeshProjector, and Profile2DProjector.

Definition at line 302 of file ProjectorBase.cxx.

References ProjectorBase::m_z_label.

Referenced by NTupleProjector::getAverage(), and CompositePlotter::getLabel().

double getZValue ( double  x,
double  y 
) const [virtual, inherited]

Get the z value at the specified point (x,y).

Reimplemented in BinningProjector, Map3Projector, MapMatrixProjector, and MeshProjector.

Definition at line 323 of file ProjectorBase.cxx.

Referenced by ProjectorBase::getZAfterTransform(), and CompositePlotter::getZValue().

const std::vector< double > & getZValues (  )  [inherited]

Return all Z values.

Definition at line 423 of file ProjectorBase.cxx.

References DataSource::getColumn(), ProjectorBase::getProjectedValues(), ProjectorBase::getShape(), ProjectorBase::m_zval, and num_util::shape().

bool hasDataSourceBindings (  )  const [virtual, inherited]

Returns true.

Returns true as this projector or derived classes form it have DataSource binding.

Reimplemented from ProjectorBase.

Definition at line 586 of file NTupleProjector.cxx.

int indexOf ( const std::string &  label  )  const [virtual, inherited]

Returns the index of the label.

For example, the column index.

Reimplemented from ProjectorBase.

Definition at line 143 of file NTupleProjector.cxx.

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

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

unsigned int 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 102 of file NTupleProjector.cxx.

References NTupleProjector::m_binding_options.

Referenced by NTupleProjector::setAxisBinding().

bool inRange ( int  row  )  const [virtual, inherited]

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

Reimplemented in Map1Projector, MapMatrixProjector, and MeshProjector.

Definition at line 403 of file NTupleProjector.cxx.

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

Referenced by StripChartProjector::fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), and NTupleProjector::getNumberOfEntries().

bool isAxisBinned ( const std::string &  axis  )  const [virtual]

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 from ProjectorBase.

Definition at line 253 of file EqualEntriesHist1DProjector.cxx.

References NTupleProjector::m_binding_options.

bool isDataValid (  )  const [inherited]

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

Definition at line 579 of file NTupleProjector.cxx.

References NTupleProjector::m_is_valid.

bool 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 Profile2DProjector::dataRangeOn(), DataRep::isDirty(), MeshProjector::prepareValues(), MapMatrixProjector::prepareValues(), Map2Projector::prepareValues(), BinningProjector::prepareValues(), and Profile2DProjector::valueRange().

bool 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 502 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

bool isImageConvertable (  )  const [virtual, inherited]

Returns true if the projected values can converted to an image.

Returns true if this projected values can be converted to an image. An image is defined as a regular grid of values. As a convenience to implementers of derived classes, this base class method returns false.

Reimplemented in BinningProjector, and MapMatrixProjector.

Definition at line 538 of file ProjectorBase.cxx.

bool 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 matrixTranspose ( bool  yes  )  [virtual, inherited]

Transposes the X and Y axis.

The implementation in this base class does nothing.

Reimplemented in MapMatrixProjector.

Definition at line 109 of file ProjectorBase.cxx.

void 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 entries by normalizing one to the other.

Reimplemented in BinningProjector.

Definition at line 388 of file ProjectorBase.cxx.

void 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 409 of file ProjectorBase.cxx.

void notifyObservers ( Action  action  )  const [protected, inherited]

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

Definition at line 72 of file Observable.cxx.

References Observable::m_list.

void 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, NumArrayTuple, ListTuple, and RootNTuple.

Definition at line 93 of file Observable.cxx.

References Observer::update().

Referenced by XyPlotter::addDataRep(), XyPlotter::addDataRepStacked(), FunctionController::addFunctionRep(), StHist2DProjector::addValues(), StHist1DProjector::addValues(), XyPlotter::autoScale(), Inspector::contourLevelsTextBox_returnPressed(), Inspector::contourSlider_valueChanged(), Inspector::contourTextBox_returnPressed(), FunctionRep::fitFunction(), RootNTuple::notifyObservers(), NumArrayTuple::notifyObservers(), NTuple::notifyObservers(), ListTuple::notifyObservers(), FitsNTuple::notifyObservers(), XyPlotter::removeDataRep(), FunctionRep::restoreParameters(), DataRep::set(), CutPlotter::setActive(), PlotterBase::setAspectRatio(), XyPlotter::setAutoRanging(), XyPlotter::setBoxEdge(), 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(), DyHistogramEqualEntries::setPointRep(), DyHistogram::setPointRep(), DataRep::setPointRep(), TextPlotter::setRepColor(), DataRep::setRepColor(), DataRep::setRepSize(), DataRep::setRepStyle(), XyPlotter::setReverse(), XyPlotter::setScaling(), XyPlotter::setShowGrid(), 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(), PlotterBase::~PlotterBase(), RootNTuple::~RootNTuple(), and RTuple::~RTuple().

Range preferredRange ( 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, Hist2DProjImp, MapMatrixProjector, and MeshProjector.

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 MeshProjector::preferredRange(), MapMatrixProjector::preferredRange(), and DataRep::preferredRange().

void 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 227 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::adjustNumberOfBins(), EqualEntriesHist1DProjector::createNTuple(), NTupleProjector::dataRange(), EqualEntriesHist1DProjector::fillProjectedValues(), NTupleProjector::m_columns, ProjectorBase::m_proj_values, EqualEntriesHist1DProjector::m_range, and ProjectorBase::setDirty().

Referenced by EqualEntriesHist1DProjector::dataRangeOnValue().

void removeCut ( const TupleCut cut  )  [virtual, inherited]

Removes the cut from the cut list.

Definition at line 355 of file NTupleProjector.cxx.

References NTupleProjector::m_cut_list.

void removeObserver ( Observer  )  [inherited]

Removes an Observer from the Observer list.

Definition at line 66 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 reset (  )  [virtual, inherited]

Resets the bins.

This interface is for the StHist1DProjector

Reimplemented in BinningProjector, Hist1DProjImp, and StHist1DProjector.

Definition at line 262 of file ProjectorBase.cxx.

void 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 DataSource. If not, the corresponding axis becomes unbound.

Reimplemented from ProjectorBase.

Definition at line 196 of file NTupleProjector.cxx.

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

void 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 182 of file NTupleProjector.cxx.

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

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

void 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 DataSource 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 206 of file NTupleProjector.cxx.

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

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

void setAxisModel ( Axes::Type  axis,
AxisModelBase  
) [virtual, inherited]

Sets the AxisModel for axis axis.

Reimplemented in BinningProjector.

Definition at line 192 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().

const Range & setBinWidth ( Axes::Type  axis,
double  number 
) [virtual]

Sets the number of bins in this class.

By entering the number.

Reimplemented from ProjectorBase.

Definition at line 297 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::adjustNumberOfBins(), EqualEntriesHist1DProjector::m_bin_num, EqualEntriesHist1DProjector::m_range, and ProjectorBase::setDirty().

const Range & setBinWidth ( Axes::Type  axis,
int  parm,
bool  dragging 
) [virtual]

Sets the number of bins in this class.

By dragging the slider.

Reimplemented from ProjectorBase.

Definition at line 284 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::adjustNumberOfBins(), EqualEntriesHist1DProjector::m_bin_num, EqualEntriesHist1DProjector::m_range, EqualEntriesHist1DProjector::m_start_num, and ProjectorBase::setDirty().

void 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(), ProjectorBase::prepareValues(), MeshProjector::prepareValues(), MapMatrixProjector::prepareValues(), Map3Projector::prepareValues(), Map2Projector::prepareValues(), Map1Projector::prepareValues(), LineProjector::prepareValues(), EqualEntriesHist1DProjector::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(), EqualEntriesHist1DProjector::setBinWidth(), BinningProjector::setBinWidth(), DataRep::setDirty(), BinningProjector::setMinEntries(), NTupleProjector::setNTuple(), MapMatrixProjector::setNTuple(), Profile2DProjector::setOffset(), Hist2DProjImp::setOffset(), DyHist2DProjector::setOffset(), BinningProjector::setOffset(), FunctionProjector::setParameters(), ProjectorBase::setRange(), Profile2DProjector::setRange(), FunctionProjector::setRange(), NTupleProjector::update(), and BinningProjector::willDelete().

void setMinEntries ( int  entries  )  [virtual, inherited]

Set the minimum entries/bin.

Reimplemented in BinningProjector.

Definition at line 525 of file ProjectorBase.cxx.

void 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 395 of file ProjectorBase.cxx.

void setNTuple ( const DataSource source  )  [virtual, inherited]

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 in MapMatrixProjector.

Definition at line 230 of file NTupleProjector.cxx.

References NTupleProjector::changedNTuple(), DataSource::isNull(), NTupleProjector::m_is_valid, NTupleProjector::m_ntuple, Observable::removeObserver(), and ProjectorBase::setDirty().

Referenced by DataRepController::setAxisBindings(), MapMatrixProjector::setNTuple(), DisplayController::setNTuple(), and CutPlotter::setNTuple().

void setNumberOfBins ( Axes::Type  axis,
unsigned int  number 
) [virtual, inherited]

Sets the number of bins.

Sets the number of bins along the axis axis to number.

Not all projectors has a notation of a bin width. This interface is declared for those that do. The implementation in this base class is to does nothing.

Reimplemented in MapMatrixProjector.

Definition at line 228 of file ProjectorBase.cxx.

void setOffset ( Axes::Type  axis,
double  offset 
) [virtual, inherited]

Sets the bin offset.

Sets the offset of bins by fraction offset of the bin width.

Not all projectors has a notation of a bin width. This interface is declared for those that do. The implementation in this base class is to does nothing.

Reimplemented in BinningProjector, Hist2DProjImp, MapMatrixProjector, and Profile2DProjector.

Definition at line 256 of file ProjectorBase.cxx.

void 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 248 of file ProjectorBase.cxx.

Referenced by DisplayController::setOffset().

void setRange ( 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 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, and MeshProjector.

Definition at line 148 of file NTupleProjector.cxx.

void 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, Map2Projector, and MeshProjector.

Definition at line 152 of file NTupleProjector.cxx.

void 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 81 of file NTupleProjector.cxx.

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

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

Range 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 263 of file EqualEntriesHist1DProjector.cxx.

References EqualEntriesHist1DProjector::dataRangeOn(), and hippodraw::Axes::Y.

bool 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 364 of file ProjectorBase.cxx.

Referenced by CompositePlotter::checkAxisScaling().

void 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 Observer.

Reimplemented in DyHist1DProjector, DyHist2DProjector, Profile2DProjector, and ProfileProjector.

Definition at line 89 of file NTupleProjector.cxx.

References NTupleProjector::m_ntuple.

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


Member Data Documentation

unsigned int m_bin_num [private]

The number of bins.

Definition at line 45 of file EqualEntriesHist1DProjector.h.

Referenced by EqualEntriesHist1DProjector::adjustNumberOfBins(), EqualEntriesHist1DProjector::fillProjectedValues(), EqualEntriesHist1DProjector::getBinWidth(), and EqualEntriesHist1DProjector::setBinWidth().

std::vector< std::string > 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, a DataSource projector could take the string as a label for a column. Derived classes should initialize this data member in their constructor.

Definition at line 77 of file NTupleProjector.h.

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

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

The list of current bindings.

Definition at line 80 of file NTupleProjector.h.

Referenced by NTupleProjector::getAxisBindings().

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

A vector containing indexes to the columns of the DataSource.

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 86 of file NTupleProjector.h.

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

CutList_t m_cut_list [protected, inherited]

A list of cuts that filter the projection.

Definition at line 89 of file NTupleProjector.h.

Referenced by NTupleProjector::addCut(), ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), NTupleProjector::fillColumnAfterCuts(), StripChartProjector::fillProjectedValues(), MeshProjector::fillProjectedValues(), MapMatrixProjector::fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), NTupleProjector::getAverage(), DyHist1DProjector::getAverage(), NTupleProjector::getCutList(), NTupleProjector::getNTupleAfterCuts(), NTupleProjector::getNumberOfEntries(), and NTupleProjector::removeCut().

unsigned int 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 100 of file NTupleProjector.h.

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

const DataSource* 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 93 of file NTupleProjector.h.

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

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

Vector of acceptable PointReps.

Definition at line 104 of file ProjectorBase.h.

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

DataSource* 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 80 of file ProjectorBase.h.

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

Range m_range [private]

The range of the data source.

Definition at line 53 of file EqualEntriesHist1DProjector.h.

Referenced by EqualEntriesHist1DProjector::prepareValues(), and EqualEntriesHist1DProjector::setBinWidth().

unsigned int m_start_num [private]

The number of bins when dragging starts.

Definition at line 49 of file EqualEntriesHist1DProjector.h.

Referenced by EqualEntriesHist1DProjector::adjustNumberOfBins(), and EqualEntriesHist1DProjector::setBinWidth().

const 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 110 of file ProjectorBase.h.

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

AxisModelBase* 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 88 of file ProjectorBase.h.

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

AxisModelBase* 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 92 of file ProjectorBase.h.

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

std::string m_y_label [private]

The label for the y axis.

Definition at line 41 of file EqualEntriesHist1DProjector.h.

Referenced by EqualEntriesHist1DProjector::getYLabel().

AxisModelBase* m_z_axis [protected, inherited]

The AxisModel along the Z axis.

May not be used by all Projectors.

Definition at line 96 of file ProjectorBase.h.

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

std::string 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 101 of file ProjectorBase.h.

Referenced by ProjectorBase::getZLabel().

std::vector< double > m_zval [mutable, protected, inherited]

Sorted Z values in this projector.

Used to export FITS file.

Definition at line 119 of file ProjectorBase.h.

Referenced by ProjectorBase::getZAfterTransform(), and ProjectorBase::getZValues().


The documentation for this class was generated from the following files:
Generated for HippoDraw Class Library by doxygen