Belle II Software  release-05-02-19
MinMax Class Reference

small class for storing min and max. More...

#include <MinMax.h>

Public Member Functions

 MinMax ()
 construtor, starts with max for min and min for max (will later be replaced by valid entries).
 
void reset ()
 reset to start values.
 
bool checkAndReplaceIfMinMax (double newVal)
 checks value and replaces old ones if new one is better. More...
 

Protected Attributes

std::pair< double, double > m_minMax
 .first is min, .second is .max.
 

Detailed Description

small class for storing min and max.

Definition at line 33 of file MinMax.h.

Member Function Documentation

◆ checkAndReplaceIfMinMax()

bool checkAndReplaceIfMinMax ( double  newVal)
inline

checks value and replaces old ones if new one is better.

returns true if minMax was updated.

Definition at line 46 of file MinMax.h.

46  { return m_minMax.first; }
48  double getMax() const { return m_minMax.second; }
50  std::string print() const
51  {
52  std::string min = m_minMax.first == std::numeric_limits< double >::max() ? "max<double>" : std::to_string(m_minMax.first);

The documentation for this class was generated from the following file:
Belle2::MinMax::m_minMax
std::pair< double, double > m_minMax
.first is min, .second is .max.
Definition: MinMax.h:35