thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
LWH::DataPoint Class Reference

An DataPoint represents a binned histogram axis. More...

#include <DataPoint.h>

Inheritance diagram for LWH::DataPoint:

Public Member Functions

 DataPoint (int dim=2)
 Construct a data point with a given number of dimensions.
 
 DataPoint (const DataPoint &d)
 Copy constructor.
 
 DataPoint (const IDataPoint &id)
 Copy from any IDataPoint.
 
DataPointoperator= (const DataPoint &)=default
 Default assignment operator (to avoid compiler warnings).
 
virtual ~DataPoint ()
 Destructor.
 
int dimension () const
 Get the dimension of the IDataPoint, i.e.
 
IMeasurement * coordinate (int coord)
 Get the IMeasurement for a given coordinate.
 
const IMeasurement * coordinate (int coord) const
 Get the IMeasurement for a given coordinate.
 

Private Attributes

std::vector< Measurementm
 The included measurements.
 

Detailed Description

An DataPoint represents a binned histogram axis.

A 1D Histogram would have one DataPoint representing the X axis, while a 2D Histogram would have two axes representing the X and Y DataPoint.

Definition at line 31 of file DataPoint.h.

Constructor & Destructor Documentation

◆ DataPoint() [1/3]

LWH::DataPoint::DataPoint ( int  dim = 2)
inline

Construct a data point with a given number of dimensions.

Definition at line 38 of file DataPoint.h.

◆ DataPoint() [2/3]

LWH::DataPoint::DataPoint ( const DataPoint d)
inline

Copy constructor.

Definition at line 44 of file DataPoint.h.

◆ DataPoint() [3/3]

LWH::DataPoint::DataPoint ( const IDataPoint &  id)
inline

Copy from any IDataPoint.

Definition at line 50 of file DataPoint.h.

References coordinate(), and m.

◆ ~DataPoint()

virtual LWH::DataPoint::~DataPoint ( )
inlinevirtual

Destructor.

Definition at line 66 of file DataPoint.h.

Member Function Documentation

◆ coordinate() [1/2]

IMeasurement * LWH::DataPoint::coordinate ( int  coord)
inline

Get the IMeasurement for a given coordinate.

Parameters
coordThe coordinate.
Returns
The corresponding IMeasurement.

Definition at line 82 of file DataPoint.h.

References m.

Referenced by DataPoint().

◆ coordinate() [2/2]

const IMeasurement * LWH::DataPoint::coordinate ( int  coord) const
inline

Get the IMeasurement for a given coordinate.

Parameters
coordThe coordinate.
Returns
The corresponding IMeasurement.

Definition at line 91 of file DataPoint.h.

References m.

◆ dimension()

int LWH::DataPoint::dimension ( ) const
inline

Get the dimension of the IDataPoint, i.e.

the number of coordinates the point has.

Returns
The dimension.

Definition at line 73 of file DataPoint.h.

References m.

Member Data Documentation

◆ m

std::vector<Measurement> LWH::DataPoint::m
private

The included measurements.

Definition at line 100 of file DataPoint.h.

Referenced by coordinate(), DataPoint(), and dimension().


The documentation for this class was generated from the following file: