diff --git a/Device/Histo/IHistogram.cpp b/Device/Histo/IHistogram.cpp index b18b2b80fea3a42647118c5f6d6141bd8677016e..c6d8cfd5dd775b7011a1cffa899dd48d4d0108c8 100644 --- a/Device/Histo/IHistogram.cpp +++ b/Device/Histo/IHistogram.cpp @@ -54,14 +54,12 @@ size_t IHistogram::getTotalNumberOfBins() const const IAxis& IHistogram::xAxis() const { - check_x_axis(); - return m_data->axis(0); + return m_frame->axis(0); } const IAxis& IHistogram::yAxis() const { - check_y_axis(); - return m_data->axis(1); + return m_frame->axis(1); } double IHistogram::xMin() const @@ -114,24 +112,22 @@ size_t IHistogram::findGlobalBin(double x, double y) const size_t IHistogram::xAxisIndex(size_t i) const { - return m_data->projectedIndex(i, 0); + return m_frame->projectedIndex(i, 0); } size_t IHistogram::yAxisIndex(size_t i) const { - return m_data->projectedIndex(i, 1); + return m_frame->projectedIndex(i, 1); } double IHistogram::xAxisValue(size_t i) { - check_x_axis(); - return m_data->projectedCoord(i, 0); + return m_frame->projectedCoord(i, 0); } double IHistogram::yAxisValue(size_t i) { - check_y_axis(); - return m_data->projectedCoord(i, 1); + return m_frame->projectedCoord(i, 1); } double IHistogram::binContent(size_t i) const @@ -242,26 +238,6 @@ std::vector<double> IHistogram::meanVector() const return result; } -void IHistogram::check_x_axis() const -{ - if (rank() < 1) { - std::ostringstream message; - message << "IHistogram::check_x_axis() -> Error. X-xis does not exist. "; - message << "Rank of histogram " << rank() << "." << std::endl; - throw std::runtime_error(message.str()); - } -} - -void IHistogram::check_y_axis() const -{ - if (rank() < 2) { - std::ostringstream message; - message << "IHistogram::check_y_axis() -> Error. Y-axis does not exist. "; - message << "Rank of histogram " << rank() << "." << std::endl; - throw std::runtime_error(message.str()); - } -} - void IHistogram::init_from_data(const Powerfield<double>& source) { if (rank() != source.rank()) { diff --git a/Device/Histo/IHistogram.h b/Device/Histo/IHistogram.h index e51409a001d2cdb954407eba905fe61d67d07eec..1e249a349c4972f370402889e39f1f85f8bbf22f 100644 --- a/Device/Histo/IHistogram.h +++ b/Device/Histo/IHistogram.h @@ -170,8 +170,6 @@ public: std::vector<double> meanVector() const; protected: - void check_x_axis() const; - void check_y_axis() const; void init_from_data(const Powerfield<double>& source); double binData(size_t i, DataType dataType) const; std::vector<double> getDataVector(DataType dataType) const;