| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
Gaudi::Histo1DDef Class Reference

Simple helper class for description of 1D-histogram The class is targeted to act as the primary "histogram property", but clearly have significantly wider application range. More...

`#include <GaudiKernel/HistoDef.h>`

Collaboration diagram for Gaudi::Histo1DDef:
[legend]

## Public Member Functions
| Histo1DDef (double low, double high, int bins=100, std::string title="")
| full constructor from edges, bins and the title More...
| Histo1DDef (std::string title="", double low=0.0, double high=1.0, int bins=100)
| full constructor from edges, bins and the title More...
virtual | ~Histo1DDef ()=default
| destructor More...
double | lowEdge () const
| get the low edge More...
double | highEdge () const
| get the high edge More...
int | bins () const
| get the number of bins More...
const std::string & | title () const
| get the title More...
void | setLowEdge (double value)
| set low edge More...
void | setHighEdge (double value)
| set high edge More...
void | setBins (int value)
| set number of bis More...
void | setTitle (std::string value)
| set the title More...
std::ostream & | fillStream (std::ostream &o) const
| printout of the histogram definition More...
bool | operator< (const Histo1DDef &right) const
| ordering operator (to please BoundedVerifier) More...
bool | operator== (const Histo1DDef &right) const
| equality operator More...
bool | operator!= (const Histo1DDef &right) const
| non-equality More...
bool | ok () const
| check if all fields are "reasonable" More...

## Private Attributes
std::string | m_title
| Histogram title. More...
double | m_low
| Low Edge. More...
double | m_high
| High Edge. More...
int | m_bins
| Number of bins. More...

## Detailed Description

Simple helper class for description of 1D-histogram The class is targeted to act as the primary "histogram property", but clearly have significantly wider application range.

Author
  Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u

Date
  2007-09-17

Definition at line 30 of file HistoDef.h.

## Constructor & Destructor Documentation

Gaudi::Histo1DDef::Histo1DDef | ( | double | low,
|  | double | high,
|  | int | bins = `100`,
|  | std::string | title = `""`
| ) |  |

full constructor from edges, bins and the title

Parameters

  low | the low edge of the histogram
  high | the high edge of the histogram
  bins | number of bins
  title | the historgam title

Definition at line 28 of file HistoDef.cpp.

32 : m_title ( std::move(title) )
33 , m_low ( low )
34 , m_high ( high )
35 , m_bins ( bins )
36 {}
Gaudi::Histo1DDef::m_high
double m_high
High Edge.
Definition: HistoDef.h:109
Gaudi::Histo1DDef::m_title
std::string m_title
Histogram title.
Definition: HistoDef.h:105
std::move
T move(T...args)
Gaudi::Histo1DDef::bins
int bins() const
get the number of bins
Definition: HistoDef.h:68
Gaudi::Histo1DDef::m_bins
int m_bins
Number of bins.
Definition: HistoDef.h:111
Gaudi::Histo1DDef::m_low
double m_low
Low Edge.
Definition: HistoDef.h:107

Gaudi::Histo1DDef::Histo1DDef | ( | std::string | title = `""`,
|  | double | low = `0.0`,
|  | double | high = `1.0`,
|  | int | bins = `100`
| ) |  |

full constructor from edges, bins and the title

Parameters

  title | the historgam title
  low | the low edge of the histogram
  high | the high edge of the histogram
  bins | number of bins

Definition at line 46 of file HistoDef.cpp.

50 : m_title ( std::move(title) )
51 , m_low ( low )
52 , m_high ( high )
53 , m_bins ( bins )
54 {}
Gaudi::Histo1DDef::m_high
double m_high
High Edge.
Definition: HistoDef.h:109
Gaudi::Histo1DDef::m_title
std::string m_title
Histogram title.
Definition: HistoDef.h:105
std::move
T move(T...args)
Gaudi::Histo1DDef::bins
int bins() const
get the number of bins
Definition: HistoDef.h:68
Gaudi::Histo1DDef::m_bins
int m_bins
Number of bins.
Definition: HistoDef.h:111
Gaudi::Histo1DDef::m_low
double m_low
Low Edge.
Definition: HistoDef.h:107

virtual Gaudi::Histo1DDef::~Histo1DDef | ( |  | ) |
| virtual default

destructor

virtual destructor

## Member Function Documentation

int Gaudi::Histo1DDef::bins | ( |  | ) | const
| inline

get the number of bins

Definition at line 68 of file HistoDef.h.

68 { return m_bins ; }
Gaudi::Histo1DDef::m_bins
int m_bins
Number of bins.
Definition: HistoDef.h:111

std::ostream & Gaudi::Histo1DDef::fillStream | ( | std::ostream & | o | ) | const

printout of the histogram definition

Definition at line 58 of file HistoDef.cpp.

59 {
60 return o << "(" << Gaudi::Utils::toString ( title () )
61 << "," << lowEdge ()
62 << "," << highEdge ()
63 << "," << bins () << ")" ;
64 }
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:367
Gaudi::Histo1DDef::highEdge
double highEdge() const
get the high edge
Definition: HistoDef.h:66
Gaudi::Histo1DDef::lowEdge
double lowEdge() const
get the low edge
Definition: HistoDef.h:64
Gaudi::Histo1DDef::title
const std::string & title() const
get the title
Definition: HistoDef.h:70
Gaudi::Histo1DDef::bins
int bins() const
get the number of bins
Definition: HistoDef.h:68

double Gaudi::Histo1DDef::highEdge | ( |  | ) | const
| inline

get the high edge

Definition at line 66 of file HistoDef.h.

66 { return m_high ; }
Gaudi::Histo1DDef::m_high
double m_high
High Edge.
Definition: HistoDef.h:109

double Gaudi::Histo1DDef::lowEdge | ( |  | ) | const
| inline

get the low edge

Definition at line 64 of file HistoDef.h.

64 { return m_low ; }
Gaudi::Histo1DDef::m_low
double m_low
Low Edge.
Definition: HistoDef.h:107

bool Gaudi::Histo1DDef::ok | ( |  | ) | const
| inline

check if all fields are "reasonable"

Definition at line 100 of file HistoDef.h.

100 { return 0 < bins() && lowEdge() < highEdge() ; }
Gaudi::Histo1DDef::highEdge
double highEdge() const
get the high edge
Definition: HistoDef.h:66
Gaudi::Histo1DDef::lowEdge
double lowEdge() const
get the low edge
Definition: HistoDef.h:64
Gaudi::Histo1DDef::bins
int bins() const
get the number of bins
Definition: HistoDef.h:68

bool Gaudi::Histo1DDef::operator!= | ( | const Histo1DDef & | right | ) | const

non-equality

Definition at line 102 of file HistoDef.cpp.

103 { return !( *this == right ) ; }
std::right
T right(T...args)

bool Gaudi::Histo1DDef::operator< | ( | const Histo1DDef & | right | ) | const

ordering operator (to please BoundedVerifier)

Definition at line 68 of file HistoDef.cpp.

69 {
70 return
71 this == &right ? false :
72 title () < right.title () ? true :
73 title () > right.title () ? false :
74 lowEdge () < right.lowEdge () ? true :
75 lowEdge () > right.lowEdge () ? false :
76 highEdge () < right.highEdge () ? true :
77 highEdge () > right.highEdge () ? false : bins () < right.bins () ;
78 }
std::right
T right(T...args)
Gaudi::Histo1DDef::highEdge
double highEdge() const
get the high edge
Definition: HistoDef.h:66
Gaudi::Histo1DDef::lowEdge
double lowEdge() const
get the low edge
Definition: HistoDef.h:64
Gaudi::Histo1DDef::title
const std::string & title() const
get the title
Definition: HistoDef.h:70
Gaudi::Histo1DDef::bins
int bins() const
get the number of bins
Definition: HistoDef.h:68

bool Gaudi::Histo1DDef::operator== | ( | const Histo1DDef & | right | ) | const

equality operator

Definition at line 87 of file HistoDef.cpp.

88 {
89 return ( this == &right ) ||
90 ( title () == right.title () &&
91 lowEdge () == right.lowEdge () &&
92 highEdge () == right.highEdge () &&
93 bins () == right.bins () );
94 }
std::right
T right(T...args)
Gaudi::Histo1DDef::highEdge
double highEdge() const
get the high edge
Definition: HistoDef.h:66
Gaudi::Histo1DDef::lowEdge
double lowEdge() const
get the low edge
Definition: HistoDef.h:64
Gaudi::Histo1DDef::title
const std::string & title() const
get the title
Definition: HistoDef.h:70
Gaudi::Histo1DDef::bins
int bins() const
get the number of bins
Definition: HistoDef.h:68

void Gaudi::Histo1DDef::setBins | ( | int | value | ) |
| inline

set number of bis

Definition at line 79 of file HistoDef.h.

79 { m_bins = value ; }
Gaudi::Histo1DDef::m_bins
int m_bins
Number of bins.
Definition: HistoDef.h:111

void Gaudi::Histo1DDef::setHighEdge | ( | double | value | ) |
| inline

set high edge

Definition at line 77 of file HistoDef.h.

77 { m_high = value ; }
Gaudi::Histo1DDef::m_high
double m_high
High Edge.
Definition: HistoDef.h:109

void Gaudi::Histo1DDef::setLowEdge | ( | double | value | ) |
| inline

set low edge

Definition at line 75 of file HistoDef.h.

75 { m_low = value ; }
Gaudi::Histo1DDef::m_low
double m_low
Low Edge.
Definition: HistoDef.h:107

void Gaudi::Histo1DDef::setTitle | ( | std::string | value | ) |
| inline

set the title

Definition at line 81 of file HistoDef.h.

81 { m_title = std::move(value); }
Gaudi::Histo1DDef::m_title
std::string m_title
Histogram title.
Definition: HistoDef.h:105
std::move
T move(T...args)

const std::string& Gaudi::Histo1DDef::title | ( |  | ) | const
| inline

get the title

Definition at line 70 of file HistoDef.h.

70 { return m_title ; }
Gaudi::Histo1DDef::m_title
std::string m_title
Histogram title.
Definition: HistoDef.h:105

## Member Data Documentation

int Gaudi::Histo1DDef::m_bins
| private

Number of bins.

Definition at line 111 of file HistoDef.h.

double Gaudi::Histo1DDef::m_high
| private

High Edge.

Definition at line 109 of file HistoDef.h.

double Gaudi::Histo1DDef::m_low
| private

Low Edge.

Definition at line 107 of file HistoDef.h.

std::string Gaudi::Histo1DDef::m_title
| private

Histogram title.

Definition at line 105 of file HistoDef.h.

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

- GaudiKernel/GaudiKernel/HistoDef.h
- GaudiKernel/src/Lib/HistoDef.cpp