cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches

A two-dimensional graph object. More...

#include <CepGen/Utils/Graph.h>

+ Inheritance diagram for Graph2D:
+ Collaboration diagram for Graph2D:

Public Types

typedef std::map< coord_t, Valueaxis_t
 Metadata for an axis (coordinates and bins value)
 
typedef std::map< coord_t, axis_tdualaxis_t
 Metadata for a two-dimensional axis definition (coordinates and bins values)
 

Public Member Functions

 Graph2D (const std::string &name="", const std::string &title="")
 
Graph2DaddPoint (double x, double y, double z)
 Add one value to the graph.
 
Graph2DaddPoint (double x, double y, double z, double ex, double ey, double ez)
 Add one value and its uncertainties to the graph.
 
const dualaxis_tpoints () const
 Retrieve all values in the graph.
 
void dumpPoints (std::ostream &) const
 List all values registered in the graph.
 
std::set< double > xCoords () const
 List of horizontal axis coordinates.
 
std::set< double > yCoords () const
 List of vertical axis coordinates.
 
const Value valueAt (double, double) const
 Retrieve the value of the graph at the given coordinates.
 
bool isGraph2D () const override
 Is this drawable a two-dimensional graph?
 
const std::string & name () const
 Drawable name.
 
void setName (const std::string &name)
 Set the drawable name.
 
const std::string & title () const
 Drawable name.
 
void setTitle (const std::string &title)
 Set the drawable title.
 
AxisInfoxAxis ()
 
const AxisInfoxAxis () const
 
AxisInfoyAxis ()
 
const AxisInfoyAxis () const
 
AxisInfozAxis ()
 
const AxisInfozAxis () const
 
virtual bool isHist1D () const
 Is this drawable a one-dimensional histogram?
 
virtual bool isHist2D () const
 Is this drawable a two-dimensional histogram?
 
virtual bool isGraph1D () const
 Is this drawable a one-dimensional graph?
 

Protected Attributes

std::string name_
 Computer-readable name.
 
std::string title_
 Human-readable title.
 
AxisInfo xaxis_
 x-axis metadata
 
AxisInfo yaxis_
 y-axis metadata
 
AxisInfo zaxis_
 z-axis metadata
 

Detailed Description

Definition at line 58 of file Graph.h.

Member Typedef Documentation

◆ axis_t

typedef std::map<coord_t, Value> axis_t
inherited

Definition at line 95 of file Drawable.h.

◆ dualaxis_t

typedef std::map<coord_t, axis_t> dualaxis_t
inherited

Definition at line 103 of file Drawable.h.

Constructor & Destructor Documentation

◆ Graph2D()

Graph2D ( const std::string &  name = "",
const std::string &  title = "" 
)
explicit

Definition at line 80 of file Graph.cpp.

Member Function Documentation

◆ addPoint() [1/2]

Graph2D & addPoint ( double  x,
double  y,
double  z 
)

Definition at line 82 of file Graph.cpp.

◆ addPoint() [2/2]

Graph2D & addPoint ( double  x,
double  y,
double  z,
double  ex,
double  ey,
double  ez 
)

Definition at line 87 of file Graph.cpp.

◆ dumpPoints()

void dumpPoints ( std::ostream &  os) const

Definition at line 92 of file Graph.cpp.

◆ isGraph1D()

virtual bool isGraph1D ( ) const
virtualinherited

Reimplemented in Graph1D.

Definition at line 107 of file Drawable.h.

◆ isGraph2D()

bool isGraph2D ( ) const
overridevirtual

Reimplemented from Drawable.

Definition at line 78 of file Graph.h.

◆ isHist1D()

virtual bool isHist1D ( ) const
virtualinherited

Reimplemented in Hist1D.

Definition at line 105 of file Drawable.h.

◆ isHist2D()

virtual bool isHist2D ( ) const
virtualinherited

Reimplemented in Hist2D.

Definition at line 106 of file Drawable.h.

◆ name()

const std::string & name ( ) const
inherited

Definition at line 37 of file Drawable.h.

◆ points()

const dualaxis_t & points ( ) const

Definition at line 67 of file Graph.h.

◆ setName()

void setName ( const std::string &  name)
inherited

Definition at line 39 of file Drawable.h.

◆ setTitle()

void setTitle ( const std::string &  title)
inherited

Definition at line 44 of file Drawable.h.

◆ title()

const std::string & title ( ) const
inherited

Definition at line 42 of file Drawable.h.

◆ valueAt()

const Value valueAt ( double  xval,
double  yval 
) const

Definition at line 115 of file Graph.cpp.

◆ xAxis() [1/2]

AxisInfo & xAxis ( )
inherited

Definition at line 79 of file Drawable.h.

◆ xAxis() [2/2]

const AxisInfo & xAxis ( ) const
inherited

Definition at line 80 of file Drawable.h.

◆ xCoords()

std::set< double > xCoords ( ) const

Definition at line 100 of file Graph.cpp.

◆ yAxis() [1/2]

AxisInfo & yAxis ( )
inherited

Definition at line 81 of file Drawable.h.

◆ yAxis() [2/2]

const AxisInfo & yAxis ( ) const
inherited

Definition at line 82 of file Drawable.h.

◆ yCoords()

std::set< double > yCoords ( ) const

Definition at line 107 of file Graph.cpp.

◆ zAxis() [1/2]

AxisInfo & zAxis ( )
inherited

Definition at line 83 of file Drawable.h.

◆ zAxis() [2/2]

const AxisInfo & zAxis ( ) const
inherited

Definition at line 84 of file Drawable.h.

Member Data Documentation

◆ name_

std::string name_
protectedinherited

Definition at line 111 of file Drawable.h.

◆ title_

std::string title_
protectedinherited

Definition at line 112 of file Drawable.h.

◆ xaxis_

AxisInfo xaxis_
protectedinherited

Definition at line 113 of file Drawable.h.

◆ yaxis_

AxisInfo yaxis_
protectedinherited

Definition at line 114 of file Drawable.h.

◆ zaxis_

AxisInfo zaxis_
protectedinherited

Definition at line 115 of file Drawable.h.