ATLAS Offline Software
Loading...
Searching...
No Matches
CalibrationDataMappedHistogramContainer::Bin Class Reference

Helper class for the specification of custom binning. More...

#include <CalibrationDataContainer.h>

Collaboration diagram for CalibrationDataMappedHistogramContainer::Bin:

Public Member Functions

 Bin ()
 Bin (unsigned int dimension, const double *low, const double *up)
 Bin (const Bin &other)
Binoperator= (const Bin &other)
 ~Bin ()
unsigned int getDimension () const
bool contains (const double *x) const
double getUpperBound (unsigned int dim) const
double getLowerBound (unsigned int dim) const

Private Attributes

unsigned int m_dimension
double * m_low
double * m_up

Detailed Description

Helper class for the specification of custom binning.

This is a very simple class, containing only the bin specification and associated access methods.

Definition at line 367 of file CalibrationDataContainer.h.

Constructor & Destructor Documentation

◆ Bin() [1/3]

◆ Bin() [2/3]

CalibrationDataMappedHistogramContainer::Bin::Bin ( unsigned int dimension,
const double * low,
const double * up )

Definition at line 1458 of file CalibrationDataContainer.cxx.

1458 :
1459 m_dimension(dimension)
1460{
1461 // Normal constructor, containing a full specification of the bin boundaries
1462
1463 m_up = new double[dimension];
1464 m_low = new double[dimension];
1465 for (unsigned int dim = 0; dim < dimension; ++dim) {
1466 m_up[dim] = up[dim];
1467 m_low[dim] = low[dim];
1468 }
1469}

◆ Bin() [3/3]

Definition at line 1472 of file CalibrationDataContainer.cxx.

1472 :
1473 m_dimension(other.m_dimension)
1474{
1475 m_up = new double[m_dimension];
1476 m_low = new double[m_dimension];
1477 for (unsigned int dim = 0; dim < m_dimension; ++dim) {
1478 m_up[dim] = other.m_up[dim];
1479 m_low[dim] = other.m_low[dim];
1480 }
1481}

◆ ~Bin()

Definition at line 1502 of file CalibrationDataContainer.cxx.

1503{
1504 delete[] m_up;
1505 delete[] m_low;
1506}

Member Function Documentation

◆ contains()

Definition at line 1510 of file CalibrationDataContainer.cxx.

1511{
1512 // Determine whether the given set of variables is within the bin boundaries.
1513
1514 for (unsigned int dim = 0; dim < m_dimension; ++dim)
1515 if (x[dim] < m_low[dim] || x[dim] > m_up[dim]) return false;
1516 return true;
1517}
#define x

◆ getDimension()

Definition at line 375 of file CalibrationDataContainer.h.

375{ return m_dimension; }

◆ getLowerBound()

Definition at line 1529 of file CalibrationDataContainer.cxx.

1530{
1531 // Return the lower bound for the specified dimension
1532 return m_low[dim];
1533}

◆ getUpperBound()

Definition at line 1521 of file CalibrationDataContainer.cxx.

1522{
1523 // Return the upper bound for the specified dimension
1524 return m_up[dim];
1525}

◆ operator=()

CalibrationDataMappedHistogramContainer::Bin & CalibrationDataMappedHistogramContainer::Bin::operator= ( const Bin & other)

Definition at line 1485 of file CalibrationDataContainer.cxx.

1486{
1487 if (this != &other) {
1488 m_dimension = other.m_dimension;
1489 delete[] m_up;
1490 delete[] m_low;
1491 m_up = new double[m_dimension];
1492 m_low = new double[m_dimension];
1493 for (unsigned int dim = 0; dim < m_dimension; ++dim) {
1494 m_up[dim] = other.m_up[dim];
1495 m_low[dim] = other.m_low[dim];
1496 }
1497 }
1498 return *this;
1499}

Member Data Documentation

◆ m_dimension

◆ m_low

◆ m_up


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