Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Gaudi::Histo1DDef Class Referencefinal

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:

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...
 
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::stringtitle () 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::ostreamfillStream (std::ostream &o) const
 printout of the histogram definition 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...
 

Friends

bool operator< (const Histo1DDef &left, const Histo1DDef &right)
 ordering operator (to please BoundedVerifier) More...
 
bool operator== (const Histo1DDef &left, const Histo1DDef &right)
 equality operator More...
 
bool operator!= (const Histo1DDef &left, const Histo1DDef &right)
 non-equality More...
 
std::ostreamoperator<< (std::ostream &o, const Gaudi::Histo1DDef &histo)
 the streamer operator for class Gaudi::Histo1DDef 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 31 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
lowthe low edge of the histogram
highthe high edge of the histogram
binsnumber of bins
titlethe historgam title

Definition at line 27 of file HistoDef.cpp.

28  : m_title( std::move( title ) ), m_low( low ), m_high( high ), m_bins( bins ) {}
double m_high
High Edge.
Definition: HistoDef.h:101
std::string m_title
Histogram title.
Definition: HistoDef.h:97
T move(T...args)
int bins() const
get the number of bins
Definition: HistoDef.h:57
int m_bins
Number of bins.
Definition: HistoDef.h:103
double m_low
Low Edge.
Definition: HistoDef.h:99
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
titlethe historgam title
lowthe low edge of the histogram
highthe high edge of the histogram
binsnumber of bins

Definition at line 37 of file HistoDef.cpp.

38  : m_title( std::move( title ) ), m_low( low ), m_high( high ), m_bins( bins ) {}
double m_high
High Edge.
Definition: HistoDef.h:101
std::string m_title
Histogram title.
Definition: HistoDef.h:97
T move(T...args)
int bins() const
get the number of bins
Definition: HistoDef.h:57
int m_bins
Number of bins.
Definition: HistoDef.h:103
double m_low
Low Edge.
Definition: HistoDef.h:99

Member Function Documentation

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

get the number of bins

Definition at line 57 of file HistoDef.h.

57 { return m_bins; }
int m_bins
Number of bins.
Definition: HistoDef.h:103
std::ostream & Gaudi::Histo1DDef::fillStream ( std::ostream o) const

printout of the histogram definition

Definition at line 42 of file HistoDef.cpp.

42  {
43  return o << "(" << Gaudi::Utils::toString( title() ) << "," << lowEdge() << "," << highEdge() << "," << bins() << ")";
44 }
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:334
double highEdge() const
get the high edge
Definition: HistoDef.h:55
double lowEdge() const
get the low edge
Definition: HistoDef.h:53
const std::string & title() const
get the title
Definition: HistoDef.h:59
int bins() const
get the number of bins
Definition: HistoDef.h:57
double Gaudi::Histo1DDef::highEdge ( ) const
inline

get the high edge

Definition at line 55 of file HistoDef.h.

55 { return m_high; }
double m_high
High Edge.
Definition: HistoDef.h:101
double Gaudi::Histo1DDef::lowEdge ( ) const
inline

get the low edge

Definition at line 53 of file HistoDef.h.

53 { return m_low; }
double m_low
Low Edge.
Definition: HistoDef.h:99
bool Gaudi::Histo1DDef::ok ( ) const
inline

check if all fields are "reasonable"

Definition at line 92 of file HistoDef.h.

92 { return 0 < bins() && lowEdge() < highEdge(); }
double highEdge() const
get the high edge
Definition: HistoDef.h:55
double lowEdge() const
get the low edge
Definition: HistoDef.h:53
int bins() const
get the number of bins
Definition: HistoDef.h:57
void Gaudi::Histo1DDef::setBins ( int  value)
inline

set number of bis

Definition at line 68 of file HistoDef.h.

68 { m_bins = value; }
int m_bins
Number of bins.
Definition: HistoDef.h:103
void Gaudi::Histo1DDef::setHighEdge ( double  value)
inline

set high edge

Definition at line 66 of file HistoDef.h.

66 { m_high = value; }
double m_high
High Edge.
Definition: HistoDef.h:101
void Gaudi::Histo1DDef::setLowEdge ( double  value)
inline

set low edge

Definition at line 64 of file HistoDef.h.

64 { m_low = value; }
double m_low
Low Edge.
Definition: HistoDef.h:99
void Gaudi::Histo1DDef::setTitle ( std::string  value)
inline

set the title

Definition at line 70 of file HistoDef.h.

70 { m_title = std::move( value ); }
std::string m_title
Histogram title.
Definition: HistoDef.h:97
T move(T...args)
const std::string& Gaudi::Histo1DDef::title ( ) const
inline

get the title

Definition at line 59 of file HistoDef.h.

59 { return m_title; }
std::string m_title
Histogram title.
Definition: HistoDef.h:97

Friends And Related Function Documentation

bool operator!= ( const Histo1DDef left,
const Histo1DDef right 
)
friend

non-equality

Definition at line 72 of file HistoDef.cpp.

72 { return !( left == right ); }
T left(T...args)
bool operator< ( const Histo1DDef left,
const Histo1DDef right 
)
friend

ordering operator (to please BoundedVerifier)

Definition at line 49 of file HistoDef.cpp.

49  {
50  return std::tie( left.m_title, left.m_low, left.m_high, left.m_bins ) <
51  std::tie( right.m_title, right.m_low, right.m_high, right.m_bins );
52  }
T tie(T...args)
T left(T...args)
std::ostream& operator<< ( std::ostream o,
const Gaudi::Histo1DDef histo 
)
friend

the streamer operator for class Gaudi::Histo1DDef

Definition at line 76 of file HistoDef.cpp.

76 { return histo.fillStream( o ); }
std::ostream & fillStream(std::ostream &o) const
printout of the histogram definition
Definition: HistoDef.cpp:42
bool operator== ( const Histo1DDef left,
const Histo1DDef right 
)
friend

equality operator

Definition at line 61 of file HistoDef.cpp.

61  {
62  return std::tie( left.m_title, left.m_low, left.m_high, left.m_bins ) ==
63  std::tie( right.m_title, right.m_low, right.m_high, right.m_bins );
64  }
T tie(T...args)
T left(T...args)

Member Data Documentation

int Gaudi::Histo1DDef::m_bins
private

Number of bins.

Definition at line 103 of file HistoDef.h.

double Gaudi::Histo1DDef::m_high
private

High Edge.

Definition at line 101 of file HistoDef.h.

double Gaudi::Histo1DDef::m_low
private

Low Edge.

Definition at line 99 of file HistoDef.h.

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

Histogram title.

Definition at line 97 of file HistoDef.h.


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