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

ProjectorHelper Class Reference

#include <ProjectorHelper.h>

Inheritance diagram for ProjectorHelper:

Inheritance graph
[legend]
Collaboration diagram for ProjectorHelper:

Collaboration graph
[legend]
List of all members.

Detailed Description

A concreate implementation of the FunctionHelper class.

This has access to the ntuple of the dataset via which it gets informations about various aspects of the datasets asked for.

See also:
FunctionHelper.
Author:
Kaustuv <kaustuv@stanford.edu>

Definition at line 31 of file ProjectorHelper.h.

Public Member Functions

virtual double getTotal () const
 Returns the sum of the values of the data set.
virtual double maxCoord () const
 Returns the largest coordinate value along the X axis in the data set.
virtual double maxValue () const
 Returns the largest value in the data set.
virtual double meanCoord () const
 Returns the mean of the coordinates along the X axis in the data set.
virtual double meanValue () const
 Returns the mean of the values in the data set.
virtual double minCoord () const
 Returns the smallest coordinate value along the X axis in the data set.
virtual double minValue () const
 Returns the smallest value in the data set.
 ProjectorHelper (const DataSource *ntuple)
 The constructor taking ntuple pointer as arguments.
virtual int size () const
 Returns the number of points in the data set.
virtual double stdCoord () const
 Returns the standard deviation of the coordinates along the X axis in the data set.
virtual double valueAt (double x) const
 Returns the value at a given coordinate.

Private Attributes

const DataSourcem_ntuple
 The pointer to the ntuple (of the appropriate data set) for which it is called to help.


Constructor & Destructor Documentation

ProjectorHelper::ProjectorHelper const DataSource ntuple  ) 
 

The constructor taking ntuple pointer as arguments.

Definition at line 36 of file ProjectorHelper.cxx.


Member Function Documentation

double ProjectorHelper::getTotal  )  const [virtual]
 

Returns the sum of the values of the data set.

Implements FunctionHelper.

Definition at line 50 of file ProjectorHelper.cxx.

References m_ntuple, and hippodraw::Axes::Y.

Referenced by stdCoord().

double ProjectorHelper::maxCoord  )  const [virtual]
 

Returns the largest coordinate value along the X axis in the data set.

Implements FunctionHelper.

Definition at line 66 of file ProjectorHelper.cxx.

References m_ntuple, std::max_element(), and hippodraw::Axes::X.

double ProjectorHelper::maxValue  )  const [virtual]
 

Returns the largest value in the data set.

Implements FunctionHelper.

Definition at line 84 of file ProjectorHelper.cxx.

References m_ntuple, std::max_element(), and hippodraw::Axes::Y.

double ProjectorHelper::meanCoord  )  const [virtual]
 

Returns the mean of the coordinates along the X axis in the data set.

Implements FunctionHelper.

Definition at line 105 of file ProjectorHelper.cxx.

References std::accumulate(), inner_product(), m_ntuple, hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by StHist1DProjector::getAverage(), and stdCoord().

double ProjectorHelper::meanValue  )  const [virtual]
 

Returns the mean of the values in the data set.

Implements FunctionHelper.

Definition at line 93 of file ProjectorHelper.cxx.

References std::accumulate(), m_ntuple, and hippodraw::Axes::Y.

Referenced by StHist1DProjector::getAverage().

double ProjectorHelper::minCoord  )  const [virtual]
 

Returns the smallest coordinate value along the X axis in the data set.

Implements FunctionHelper.

Definition at line 57 of file ProjectorHelper.cxx.

References m_ntuple, std::min_element(), and hippodraw::Axes::X.

double ProjectorHelper::minValue  )  const [virtual]
 

Returns the smallest value in the data set.

Implements FunctionHelper.

Definition at line 75 of file ProjectorHelper.cxx.

References m_ntuple, std::min_element(), and hippodraw::Axes::Y.

int ProjectorHelper::size  )  const [virtual]
 

Returns the number of points in the data set.

Implements FunctionHelper.

Definition at line 43 of file ProjectorHelper.cxx.

References m_ntuple.

double ProjectorHelper::stdCoord  )  const [virtual]
 

Returns the standard deviation of the coordinates along the X axis in the data set.

Implements FunctionHelper.

Definition at line 121 of file ProjectorHelper.cxx.

References getTotal(), m_ntuple, mean, meanCoord(), std::sqrt(), hippodraw::Axes::X, and hippodraw::Axes::Y.

Referenced by ProjectorBase::getRMS().

double ProjectorHelper::valueAt double  x  )  const [virtual]
 

Returns the value at a given coordinate.

Implements FunctionHelper.

Definition at line 138 of file ProjectorHelper.cxx.

References m_ntuple, hippodraw::Axes::X, and hippodraw::Axes::Y.


Member Data Documentation

const DataSource* ProjectorHelper::m_ntuple [private]
 

The pointer to the ntuple (of the appropriate data set) for which it is called to help.

Definition at line 38 of file ProjectorHelper.h.

Referenced by getTotal(), maxCoord(), maxValue(), meanCoord(), meanValue(), minCoord(), minValue(), size(), stdCoord(), and valueAt().


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