#include <NTupleProjector.h>
Inheritance diagram for NTupleProjector:
The projector connects to the data via a pointer to the NTuple
and indexes to the columns that are used. This method allows changing the projection to another NTuple while keeping the column indexes the same.
This class supports the list of cuts and member functions for testing if a row of the data table should be accepted based on those cuts.
The class implements the Observer and Observable pattern. It is a Observer of the NTuple and responses to update messages from it by setting itself dirty and notifying its Observers.
Paul F. Kunz <paul_kunz@slac.stanford.edu>
Sanket B. Malde <sanket@stanford.edu>
Matan Shacham <matan@slac.stanford.edu>
Oded Wurman <owurman@stanford.edu>
Definition at line 43 of file NTupleProjector.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. | |
virtual void | changedNTuple ()=0 |
This function is called when the NTuple has been changed to a new one. | |
virtual ProjectorBase * | clone ()=0 |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
virtual DataSource * | createNTuple () const =0 |
Creates an NTuple representation of the projected values. | |
virtual const DataSource * | createOldStyleNTuple () const |
virtual Range | dataRangeOn (hippodraw::Axes::Type) const =0 |
Returns the range of 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 AxisModelBase * | getAxisModel (hippodraw::Axes::Type axis) const |
Get the AxisModel for axis axis. | |
virtual double | getBinWidth (hippodraw::Axes::Type axis) const |
Returns the bin width of the axis. | |
const std::vector< const TupleCut * > & | getCutList () const |
Returns the list of TupleCut objects used by this projector. | |
virtual DataSource * | getNTuple () |
Returns the DataSource used by the projector. | |
virtual const DataSource * | getNTuple () const |
Returns the DataSoruce used by the projector. | |
virtual NTuple * | getNTupleAfterCuts () 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 NTuple used by this projector. | |
virtual int | getNumberOfBins (hippodraw::Axes::Type) const |
Returns the number of bins. | |
int | getNumberOfEntries () const |
Returns the number of entries in to the projected values list. | |
const ObserverList_t & | getObservers () const |
Returns the list of observers. | |
virtual double | getOffset (hippodraw::Axes::Type axis) const |
Returns the offset of the axis. | |
const std::vector< std::string > & | getPointReps () const |
Return the vector of Point Reps. | |
virtual double | getPosOn (hippodraw::Axes::Type) const =0 |
Returns the minimum positive value. | |
const DataSource * | getProjectedValues () const |
Returns ntuple representation of projected values. | |
virtual const Range & | getRange (hippodraw::Axes::Type) const |
Returns the Range along the specified axis. | |
virtual double | getRMS (hippodraw::Axes::Type axis) |
Returns the RMS. | |
virtual const std::string & | getTitle () const |
Finds the title of the plot. | |
virtual const std::string & | getXLabel () const |
Finds the X axis label of the plot. | |
virtual const std::string & | getYLabel (bool flag=false) const |
Finds the Y axis label of the plot. | |
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). | |
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. | |
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 (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 width) |
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 *source) |
Changes the DataSource used for the projections to source. | |
virtual void | setNumberOfBins (hippodraw::Axes::Type axis, unsigned int number) |
Sets the number of bins. | |
virtual void | setOffset (hippodraw::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 (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 =0 |
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. | |
~NTupleProjector () | |
The destructor. | |
Protected Member Functions | |
virtual void | addPointReps ()=0 |
Function to add the acceptable point reps. | |
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 *source, bool in_range=false) const =0 |
Fills the DataSource source with the projected values. | |
virtual void | fillProjectedValues (DataSource *ntuple, bool in_range=false) const =0 |
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. | |
void | notifyObservers (Action action) const |
An internal method to iterate over all observers and to send the message action. | |
NTupleProjector (const NTupleProjector &projector) | |
The copy constructor. | |
NTupleProjector (unsigned int columns) | |
The following constructor takes the number of columns that the projector is capable of binding with. | |
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 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 DataSource * | m_ntuple |
The pointer to the data source being projected. | |
std::vector< std::string > | m_pointreps |
Vector of acceptable PointReps. | |
DataSource * | m_proj_values |
The NTuple representing the result of the projection. | |
const ProjectorBase * | m_target |
The target projector. | |
AxisModelBase * | m_x_axis |
The AxisModel along the X axis. | |
AxisModelBase * | m_y_axis |
The AxisModel along the Y axis. | |
AxisModelBase * | m_z_axis |
The AxisModel along the Z axis. | |
std::string | m_z_label |
Dummy member so that getZLabel can return a reference. | |
Private Attributes | |
bool | m_is_valid |
Set to false if any data is bound column is invalid. |
|
The member function of the Observer that is called.
Definition at line 83 of file Observable.h. |
|
The type of STL container to maintain list of Observer objects.
Definition at line 46 of file Observable.h. |
|
The following constructor takes the number of columns that the projector is capable of binding with.
Definition at line 46 of file NTupleProjector.cxx. References m_ntuple. |
|
The copy constructor.
Definition at line 56 of file NTupleProjector.cxx. References DataSource::isNull(), m_binding_options, and m_ntuple. |
|
The destructor.
Definition at line 71 of file NTupleProjector.cxx. References DataSource::isNull(), m_ntuple, and Observable::removeObserver(). |
|
For row i of the column, returns
Definition at line 159 of file NTupleProjector.cxx. References m_cut_list, m_ntuple, and num_util::size(). Referenced by ProfileProjector::execute(), Profile2DProjector::execute(), DyHist2DProjector::execute(), DyHist1DProjector::execute(), MapMatrixProjector::fillDataSource(), Map3Projector::fillDataSource(), Map2Projector::fillDataSource(), Map1Projector::fillDataSource(), StripChartProjector::fillProjectedValues(), MapMatrixProjector::fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), Map1Projector::fillProjectedValues(), getAverage(), DyHist1DProjector::getAverage(), getNTupleAfterCuts(), and getNumberOfEntries(). |
|
Adds the cut to the list of cuts.
Definition at line 348 of file NTupleProjector.cxx. References m_cut_list. Referenced by NTupleProjectorXML::addCuts(), and CutController::linkCutAndRep(). |
|
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(). |
|
Function to add the acceptable point reps.
Implemented in FunctionProjector, Hist1DProjImp, Hist2DProjImp, LineProjector, Map1Projector, Map2Projector, Map3Projector, MapMatrixProjector, Profile2DProjector, ProfileProjector, and StripChartProjector. |
|
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. |
|
Returns a vector of strings describing the binding options.
Definition at line 97 of file NTupleProjector.cxx. References m_binding_options. Referenced by DataRepController::bindingOptions(). |
|
This function is called when the NTuple has been changed to a new one. Derived classes must override this function and take appropriate action. Implemented in DyHist1DProjector, DyHist2DProjector, Map1Projector, Map2Projector, Map3Projector, MapMatrixProjector, Profile2DProjector, and ProfileProjector. Referenced by setNTuple(). |
|
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implemented in DyHist1DProjector, DyHist2DProjector, FunctionProjector, LineProjector, Map1Projector, Map2Projector, Map3Projector, MapMatrixProjector, Profile2DProjector, ProfileProjector, StHist1DProjector, StHist2DProjector, and StripChartProjector. Referenced by DataRep::DataRep(). |
|
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. Implemented in BinningProjector, FunctionProjector, LineProjector, Map1Projector, Map2Projector, Map3Projector, and MapMatrixProjector. |
|
Reimplemented in BinningProjector. Definition at line 345 of file ProjectorBase.cxx. References ProjectorBase::getProjectedValues(), and ProjectorBase::prepareValues(). |
|
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(), m_is_valid, and m_ntuple. Referenced by ProfileProjector::dataRangeOn(), Profile2DProjector::dataRangeOn(), MapMatrixProjector::dataRangeOn(), Map3Projector::dataRangeOn(), Map2Projector::dataRangeOn(), Map1Projector::dataRangeOn(), DyHist2DProjector::dataRangeOn(), DyHist1DProjector::dataRangeOn(), and Map3Projector::valueRange(). |
|
Returns the range of data on the specified axis. The range may need to be calculated. Implements ProjectorBase. Implemented in DyHist1DProjector, DyHist2DProjector, Map1Projector, Map2Projector, Map3Projector, MapMatrixProjector, Profile2DProjector, and ProfileProjector. |
|
Returns a range considering both data and error.
Definition at line 263 of file NTupleProjector.cxx. References DataSource::columns(), getPosWithError(), m_ntuple, std::max(), std::min(), and num_util::size(). Referenced by Map2Projector::dataRangeOn(), and Map1Projector::dataRangeOn(). |
|
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 Implemented in BinningProjector, FunctionProjector, LineProjector, Map1Projector, Map2Projector, Map3Projector, and MapMatrixProjector. |
|
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 Implemented in BinningProjector, FunctionProjector, LineProjector, Map1Projector, Map2Projector, Map3Projector, MapMatrixProjector, and StripChartProjector. |
|
Get the Average of all projected values on the specified axis.
Reimplemented from ProjectorBase. Reimplemented in DyHist1DProjector, Map1Projector, and MapMatrixProjector. Definition at line 432 of file NTupleProjector.cxx. References acceptRow(), getNTuple(), ProjectorBase::getRange(), getXLabel(), getYLabel(), ProjectorBase::getZLabel(), Range::includes(), indexOf(), m_ntuple, num_util::size(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z. |
|
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(), m_bindings, m_columns, m_ntuple, and num_util::size(). Referenced by DisplayController::axisBindings(), and NTupleProjectorXML::createElement(). |
|
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(). |
|
Returns the bin width 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 299 of file ProjectorBase.cxx. Referenced by PyDataRep::getBinWidth(), and CompositePlotter::getBinWidth(). |
|
Returns the list of TupleCut objects used by this projector.
Definition at line 362 of file NTupleProjector.cxx. References m_cut_list. Referenced by CutController::connectDataRep(), and NTupleProjectorXML::createChildren(). |
|
Returns the DataSource used by the projector.
Definition at line 420 of file NTupleProjector.cxx. References m_ntuple. |
|
Returns the DataSoruce used by the projector.
Definition at line 412 of file NTupleProjector.cxx. References m_ntuple. Referenced by NTupleProjectorXML::createElement(), getAverage(), DyHist1DProjector::getAverage(), DisplayController::getDataSourceLabels(), and DisplayController::getNTuple(). |
|
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 acceptRow(), DataSource::columns(), DataSource::getLabels(), m_ntuple, DataSource::rows(), NTuple::setLabels(), and num_util::size(). |
|
Returns the name of the NTuple used by this projector.
Definition at line 425 of file NTupleProjector.cxx. References DataSource::getName(), and m_ntuple. Referenced by DisplayController::getDataSourceName(). |
|
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(). |
|
Returns the number of entries in to the projected values list.
Implements ProjectorBase. Definition at line 369 of file NTupleProjector.cxx. References acceptRow(), inRange(), m_ntuple, DataSource::rows(), and num_util::size(). |
|
Returns the list of observers.
Definition at line 57 of file Observable.cxx. References Observable::m_list. |
|
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 258 of file ProjectorBase.cxx. Referenced by CompositePlotter::getOffset(). |
|
Return the vector of Point Reps.
Definition at line 317 of file ProjectorBase.cxx. References ProjectorBase::m_pointreps. |
|
Returns the minimum positive value on the specified column.
Definition at line 330 of file NTupleProjector.cxx. References DataSource::columns(), m_ntuple, and num_util::size(). Referenced by ProfileProjector::getPosOn(), Profile2DProjector::getPosOn(), MapMatrixProjector::getPosOn(), Map3Projector::getPosOn(), Map2Projector::getPosOn(), Map1Projector::getPosOn(), DyHist2DProjector::getPosOn(), and DyHist1DProjector::getPosOn(). |
|
Returns the minimum positive value.
Implemented in DyHist1DProjector, DyHist2DProjector, FunctionProjector, LineProjector, Map1Projector, Map2Projector, Map3Projector, MapMatrixProjector, Profile2DProjector, ProfileProjector, StHist1DProjector, and StHist2DProjector. Referenced by DataRep::getPosRange(), Hist2DProjImp::setRange(), and Hist1DProjImp::setRange(). |
|
Returns the minimum positive values considering both data and error.
Definition at line 301 of file NTupleProjector.cxx. References DataSource::columns(), m_ntuple, std::min(), and num_util::size(). Referenced by dataRangeWithError(), MapMatrixProjector::getPosOn(), Map2Projector::getPosOn(), and Map1Projector::getPosOn(). |
|
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(), MapMatrixProjector::getAverage(), Map1Projector::getAverage(), ProjectorBase::getRMS(), and FunctionProjector::initializeFunction(). |
|
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(), getAverage(), DyHist1DProjector::getAverage(), LineProjector::getPosOn(), and LineProjector::valueRange(). |
|
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. |
|
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 m_ntuple, and DataSource::title(). |
|
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 253 of file NTupleProjector.cxx. References DataSource::getLabelAt(), m_columns, and m_ntuple. Referenced by getAverage(), and DyHist1DProjector::getAverage(). |
|
Finds the Y axis label of the plot. Derived classes should return a label for the Y axis that is meaningful for the kind of projection. The argument flag can be used to distinguish between two possible labels, depending on some state of the projector. Implements ProjectorBase. Reimplemented in DyHist1DProjector, Map1Projector, and MapMatrixProjector. Definition at line 258 of file NTupleProjector.cxx. References DataSource::getLabelAt(), m_columns, and m_ntuple. Referenced by getAverage(). |
|
Finds the Z axis label of the plot. A plotter may ask the projector for the default label. Reimplemented in FunctionProjector, Hist2DProjImp, Map3Projector, MapMatrixProjector, and Profile2DProjector. Definition at line 292 of file ProjectorBase.cxx. References ProjectorBase::m_z_label. Referenced by getAverage(), and CompositePlotter::getLabel(). |
|
Get the z value at the specified point (x,y).
Reimplemented in BinningProjector, Map3Projector, and MapMatrixProjector. Definition at line 305 of file ProjectorBase.cxx. Referenced by CompositePlotter::getZValue(). |
|
Returns the index of the label. For example, the column index. Definition at line 144 of file NTupleProjector.cxx. References DataSource::indexOf(), and m_ntuple. Referenced by getAverage(), and DyHist1DProjector::getAverage(). |
|
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 m_binding_options. Referenced by setAxisBinding(). |
|
Checks if the entries in a given row are within the range of the axis model.
Reimplemented in Map1Projector, and MapMatrixProjector. Definition at line 386 of file NTupleProjector.cxx. References Range::excludes(), AxisModelBase::getRange(), m_columns, m_ntuple, ProjectorBase::m_x_axis, ProjectorBase::m_y_axis, ProjectorBase::m_z_axis, and num_util::size(). Referenced by Map3Projector::fillDataSource(), Map2Projector::fillDataSource(), StripChartProjector::fillProjectedValues(), Map3Projector::fillProjectedValues(), Map2Projector::fillProjectedValues(), and getNumberOfEntries(). |
|
Returns 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(). |
|
Returns
Definition at line 516 of file NTupleProjector.cxx. References m_is_valid. |
|
Returns 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(), MapMatrixProjector::prepareValues(), Map2Projector::prepareValues(), FunctionProjector::prepareValues(), BinningProjector::prepareValues(), and Profile2DProjector::valueRange(). |
|
Returns
Returns Implements ProjectorBase. Definition at line 485 of file NTupleProjector.cxx. References m_ntuple. |
|
Returns
The implementation in this base class returns Reimplemented in Hist1DProjImp, and Hist2DProjImp. Definition at line 126 of file ProjectorBase.cxx. Referenced by BinningProjector::normalizeTo(). |
|
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. |
|
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. |
|
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. |
|
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(). |
|
|
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(). |
|
Informs the projector to prepare its projected values for plotting.
This base class implementation sets the dirty flag to Reimplemented in BinningProjector, FunctionProjector, LineProjector, Map1Projector, Map2Projector, Map3Projector, and MapMatrixProjector. Definition at line 65 of file ProjectorBase.cxx. References ProjectorBase::setDirty(). Referenced by DataRep::createNTuple(), ProjectorBase::createOldStyleNTuple(), DataRep::getProjectedValues(), and FunctionProjector::initializeFunction(). |
|
Removes the cut from the cut list.
Definition at line 353 of file NTupleProjector.cxx. References std::find(), and m_cut_list. |
|
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(), setNTuple(), FunctionRep::willDelete(), FunctionRep::~FunctionRep(), and ~NTupleProjector(). |
|
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(). |
|
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 indexOfBindingOption(), and setAxisBinding(). |
|
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(), m_columns, m_is_valid, m_ntuple, and ProjectorBase::setDirty(). Referenced by setAxisBinding(), CutPlotter::setAxisBinding(), and setAxisBindings(). |
|
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 m_columns, m_is_valid, m_min_bindings, setAxisBinding(), and num_util::size(). Referenced by DisplayController::setAxisBindings(). |
|
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(). |
|
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 Reimplemented in BinningProjector, DyHist2DProjector, and Profile2DProjector. Definition at line 232 of file ProjectorBase.cxx. |
|
Sets the bin width. Sets the bin width to width along the axis 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, Hist2DProjImp, MapMatrixProjector, and Profile2DProjector. Definition at line 227 of file ProjectorBase.cxx. Referenced by DisplayController::setBinWidth(), and CompositePlotter::setBinWidth(). |
|
|
Sets the scaling number of entries on if on is
Reimplemented in BinningProjector. Definition at line 362 of file ProjectorBase.cxx. |
|
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 228 of file NTupleProjector.cxx. References changedNTuple(), DataSource::isNull(), m_is_valid, m_ntuple, Observable::removeObserver(), and ProjectorBase::setDirty(). Referenced by DataRepController::setAxisBindings(), MapMatrixProjector::setNTuple(), DisplayController::setNTuple(), and CutPlotter::setNTuple(). |
|
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 221 of file ProjectorBase.cxx. Referenced by CompositePlotter::setNumberOfBins(). |
|
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 246 of file ProjectorBase.cxx. |
|
Sets the bin offset.
Reimplemented in BinningProjector, DyHist2DProjector, and Profile2DProjector. Definition at line 238 of file ProjectorBase.cxx. Referenced by DisplayController::setOffset(), and CompositePlotter::setOffset(). |
|
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 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(). |
|
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. |
|
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. |
|
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(). |
|
Finds the range of the projected values. It is up to derived classes to determine what this means.
Implemented in FunctionProjector, Hist1DProjImp, Hist2DProjImp, LineProjector, Map1Projector, Map2Projector, Map3Projector, MapMatrixProjector, Profile2DProjector, and ProfileProjector. |
|
Returns whether the projector wants scale factor.
Returns Reimplemented in Hist1DProjImp, and Hist2DProjImp. Definition at line 331 of file ProjectorBase.cxx. Referenced by CompositePlotter::checkAxisScaling(). |
|
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 m_ntuple. Referenced by ProfileProjector::willDelete(), Profile2DProjector::willDelete(), DyHist2DProjector::willDelete(), and DyHist1DProjector::willDelete(). |
|
|
The list of current bindings.
Definition at line 64 of file NTupleProjector.h. Referenced by getAxisBindings(). |
|
|
A list of cuts that filter the projection.
Definition at line 73 of file NTupleProjector.h. Referenced by acceptRow(), addCut(), getCutList(), and removeCut(). |
|
Set to false if any data is bound column is invalid.
Definition at line 48 of file NTupleProjector.h. Referenced by dataRange(), isDataValid(), setAxisBinding(), setAxisBindings(), and setNTuple(). |
|
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::MapMatrixProjector(), Profile2DProjector::Profile2DProjector(), ProfileProjector::ProfileProjector(), and setAxisBindings(). |
|
|
Vector of acceptable PointReps.
Definition at line 98 of file ProjectorBase.h. Referenced by StripChartProjector::addPointReps(), ProfileProjector::addPointReps(), Profile2DProjector::addPointReps(), MapMatrixProjector::addPointReps(), Map3Projector::addPointReps(), Map2Projector::addPointReps(), Map1Projector::addPointReps(), Hist2DProjImp::addPointReps(), Hist1DProjImp::addPointReps(), and ProjectorBase::getPointReps(). |
|
The NTuple representing the result of the projection.
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(), MapMatrixProjector::prepareValues(), Map3Projector::prepareValues(), Map2Projector::prepareValues(), Map1Projector::prepareValues(), LineProjector::prepareValues(), FunctionProjector::prepareValues(), BinningProjector::prepareValues(), BinningProjector::setBinner(), and ProjectorBase::~ProjectorBase(). |
|
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(). |
|
The
All
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(), inRange(), MapMatrixProjector::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(). |
|
The
All 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(), inRange(), MapMatrixProjector::inRange(), Map1Projector::inRange(), FunctionProjector::prepareAxis(), ProjectorBase::setAxisModel(), FunctionProjector::setAxisModel(), Profile2DProjector::setOffset(), Hist2DProjImp::setOffset(), Profile2DProjector::setRange(), Hist2DProjImp::setRange(), FunctionProjector::setRange(), and LineProjector::valueRange(). |
|
The 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(), inRange(), MapMatrixProjector::inRange(), ProjectorBase::setAxisModel(), and ProjectorBase::setRange(). |
|
Dummy member so that getZLabel can return a reference.
Reimplemented in FunctionProjector, and StHist2DProjector. Definition at line 95 of file ProjectorBase.h. Referenced by ProjectorBase::getZLabel(). |