Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
JTOOLS::JHistogram< JAbscissa_t, JContents_t > Class Template Referenceabstract

Template definition of histogram object interface. More...

#include <JHistogram.hh>

Inheritance diagram for JTOOLS::JHistogram< JAbscissa_t, JContents_t >:
JTOOLS::JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t >

Public Types

typedef JAbscissa_t abscissa_type
 
typedef JContents_t contents_type
 

Public Member Functions

virtual ~JHistogram ()
 Virtual destructor. More...
 
virtual void evaluate (const abscissa_type *pX, typename JLANG::JClass< contents_type >::argument_type w)=0
 Histogram filling. More...
 
JHistogramadd (const JHistogram &histogram)
 Add histogram. More...
 
JHistogramsub (const JHistogram &histogram)
 Subtract histogram. More...
 
JHistogrammul (const double value)
 Scale histogram. More...
 
JHistogramdiv (double value)
 Scale histogram. More...
 
const contents_typegetUnderflow () const
 Get contents below lower limit. More...
 
const contents_typegetOverflow () const
 Get contents above upper limit. More...
 
const contents_typegetIntegral () const
 Get contents above upper limit. More...
 

Protected Member Functions

 JHistogram ()
 Default constructor. More...
 

Protected Attributes

contents_type underflow
 
contents_type overflow
 
contents_type integral
 

Friends

JReaderoperator>> (JReader &in, JHistogram &object)
 Read histogram from input. More...
 
JWriteroperator<< (JWriter &out, const JHistogram &object)
 Write histogram to output. More...
 

Detailed Description

template<class JAbscissa_t, class JContents_t>
class JTOOLS::JHistogram< JAbscissa_t, JContents_t >

Template definition of histogram object interface.

This class also comprises auxiliary data.

Definition at line 27 of file JHistogram.hh.

Member Typedef Documentation

template<class JAbscissa_t, class JContents_t>
typedef JAbscissa_t JTOOLS::JHistogram< JAbscissa_t, JContents_t >::abscissa_type

Definition at line 42 of file JHistogram.hh.

template<class JAbscissa_t, class JContents_t>
typedef JContents_t JTOOLS::JHistogram< JAbscissa_t, JContents_t >::contents_type

Definition at line 43 of file JHistogram.hh.

Constructor & Destructor Documentation

template<class JAbscissa_t, class JContents_t>
JTOOLS::JHistogram< JAbscissa_t, JContents_t >::JHistogram ( )
inlineprotected

Default constructor.

Definition at line 33 of file JHistogram.hh.

33  :
37  {}
contents_type underflow
Definition: JHistogram.hh:195
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
contents_type integral
Definition: JHistogram.hh:197
contents_type overflow
Definition: JHistogram.hh:196
template<class JAbscissa_t, class JContents_t>
virtual JTOOLS::JHistogram< JAbscissa_t, JContents_t >::~JHistogram ( )
inlinevirtual

Virtual destructor.

Definition at line 49 of file JHistogram.hh.

50  {}

Member Function Documentation

template<class JAbscissa_t, class JContents_t>
virtual void JTOOLS::JHistogram< JAbscissa_t, JContents_t >::evaluate ( const abscissa_type pX,
typename JLANG::JClass< contents_type >::argument_type  w 
)
pure virtual

Histogram filling.

Parameters
pXpointer to abscissa values
wweight

Implemented in JTOOLS::JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t >.

template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::add ( const JHistogram< JAbscissa_t, JContents_t > &  histogram)
inline

Add histogram.

Parameters
histogramhistogram
Returns
this histogram

Definition at line 69 of file JHistogram.hh.

70  {
71  this->underflow += histogram.underflow;
72  this->overflow += histogram.overflow;
73  this->integral += histogram.integral;
74 
75  return *this;
76  }
contents_type underflow
Definition: JHistogram.hh:195
contents_type integral
Definition: JHistogram.hh:197
contents_type overflow
Definition: JHistogram.hh:196
template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::sub ( const JHistogram< JAbscissa_t, JContents_t > &  histogram)
inline

Subtract histogram.

Parameters
histogramhistogram
Returns
this histogram

Definition at line 85 of file JHistogram.hh.

86  {
87  this->underflow -= histogram.underflow;
88  this->overflow -= histogram.overflow;
89  this->integral -= histogram.integral;
90 
91  return *this;
92  }
contents_type underflow
Definition: JHistogram.hh:195
contents_type integral
Definition: JHistogram.hh:197
contents_type overflow
Definition: JHistogram.hh:196
template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::mul ( const double  value)
inline

Scale histogram.

Parameters
valuemultiplication factor
Returns
this histogram

Definition at line 101 of file JHistogram.hh.

102  {
103  this->underflow *= value;
104  this->overflow *= value;
105  this->integral *= value;
106 
107  return *this;
108  }
contents_type underflow
Definition: JHistogram.hh:195
contents_type integral
Definition: JHistogram.hh:197
contents_type overflow
Definition: JHistogram.hh:196
template<class JAbscissa_t, class JContents_t>
JHistogram& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::div ( double  value)
inline

Scale histogram.

Parameters
valuedivision factor
Returns
this histogram

Definition at line 117 of file JHistogram.hh.

118  {
119  this->underflow /= value;
120  this->overflow /= value;
121  this->integral /= value;
122 
123  return *this;
124  }
contents_type underflow
Definition: JHistogram.hh:195
contents_type integral
Definition: JHistogram.hh:197
contents_type overflow
Definition: JHistogram.hh:196
template<class JAbscissa_t, class JContents_t>
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getUnderflow ( ) const
inline

Get contents below lower limit.

Returns
contents

Definition at line 132 of file JHistogram.hh.

133  {
134  return underflow;
135  }
contents_type underflow
Definition: JHistogram.hh:195
template<class JAbscissa_t, class JContents_t>
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getOverflow ( ) const
inline

Get contents above upper limit.

Returns
contents

Definition at line 143 of file JHistogram.hh.

144  {
145  return overflow;
146  }
contents_type overflow
Definition: JHistogram.hh:196
template<class JAbscissa_t, class JContents_t>
const contents_type& JTOOLS::JHistogram< JAbscissa_t, JContents_t >::getIntegral ( ) const
inline

Get contents above upper limit.

Returns
contents

Definition at line 154 of file JHistogram.hh.

155  {
156  return integral;
157  }
contents_type integral
Definition: JHistogram.hh:197

Friends And Related Function Documentation

template<class JAbscissa_t, class JContents_t>
JReader& operator>> ( JReader in,
JHistogram< JAbscissa_t, JContents_t > &  object 
)
friend

Read histogram from input.

Parameters
inreader
objecthistogram
Returns
reader

Definition at line 167 of file JHistogram.hh.

168  {
169  in >> object.underflow;
170  in >> object.overflow;
171  in >> object.integral;
172 
173  return in;
174  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41
template<class JAbscissa_t, class JContents_t>
JWriter& operator<< ( JWriter out,
const JHistogram< JAbscissa_t, JContents_t > &  object 
)
friend

Write histogram to output.

Parameters
outwriter
objecthistogram
Returns
writer

Definition at line 184 of file JHistogram.hh.

185  {
186  out << object.underflow;
187  out << object.overflow;
188  out << object.integral;
189 
190  return out;
191  }

Member Data Documentation

template<class JAbscissa_t, class JContents_t>
contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::underflow
protected

Definition at line 195 of file JHistogram.hh.

template<class JAbscissa_t, class JContents_t>
contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::overflow
protected

Definition at line 196 of file JHistogram.hh.

template<class JAbscissa_t, class JContents_t>
contents_type JTOOLS::JHistogram< JAbscissa_t, JContents_t >::integral
protected

Definition at line 197 of file JHistogram.hh.


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